Example #1
0
        public byte[] Get_Tlv(QQUser user)
        {
            var data = new BinaryWriter(new MemoryStream());

            if (WSubVer == 0x0002)
            {
                data.BeWrite(WSubVer); //wSubVer
                var newbyte = user.TXProtocol.BufTgt;
                var flag    = EncodeLoginFlag(newbyte, QQGlobal.QqexeMD5);
                data.Write(user.MD51);
                data.Write(flag);
                data.Write((byte)0x10);
                data.BeWrite(0);
                data.BeWrite(2);
                var qddata = QdData.GetQdData(user);
                data.WriteKey(qddata);
                data.BeWrite(0);
            }
            else
            {
                throw new Exception($"{Name} 无法识别的版本号 {WSubVer}");
            }

            FillHead(Command);
            FillBody(data.BaseStream.ToBytesArray(), data.BaseStream.Length);
            SetLength();
            return(GetBuffer());
        }
Example #2
0
        public Byte[] Get_Tlv(QQAccount user)
        {
            var data = new BinaryWriter(new MemoryStream());

            if (this.WSubVer == 0x0002)
            {
                data.BeWrite(this.WSubVer); //wSubVer
                var newbyte = user.TXProtocol.BufTgt;
                var flag    = this.EncodeLoginFlag(newbyte, ClientDefines.QqexeMD5);
                data.Write(user.MD51);
                data.Write(flag);
                data.Write((Byte)0x10);
                data.BeWrite(0);
                data.BeWrite(2);
                var qddata = QdData.GetQdData(user);
                data.WriteKey(qddata);
                data.BeWrite(0);
            }
            else
            {
                throw new Exception($"{this.Name} 无法识别的版本号 {this.WSubVer}");
            }

            this.FillHead(this.Command);
            this.FillBody(data.ToByteArray(), data.BaseStream.Length);
            this.SetLength();
            return(this.GetBuffer());
        }
Example #3
0
        public byte[] Get_Tlv(QQUser user)
        {
            var qddata = QdData.GetQdData(user);

            FillHead(Command);
            FillBody(qddata, qddata.Length);
            SetLength();
            return(GetBuffer());
        }
Example #4
0
        public System.Byte[] Get_Tlv(QQAccount user)
        {
            var qddata = QdData.GetQdData(user);

            this.FillHead(this.Command);
            this.FillBody(qddata, qddata.Length);
            this.SetLength();
            return(this.GetBuffer());
        }