예제 #1
0
        public static void DeleteGroup(long thisQQ, long GroupId)
        {
            var bytes = JceStruct.writeFlag(JceStruct.JceType.TYPE_STRUCT_BEGIN, 0);

            bytes = bytes.Concat(JceStruct.writeByte(9, 0)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(thisQQ, 1)).ToArray();
            bytes = bytes.Concat(JceStruct.writeSimpleList(API.HexStrToByteArray(GroupId.ToString("X")).Concat(API.QQ.user).ToArray(), 2)).ToArray();
            bytes = bytes.Concat(JceStruct.writeZero(3)).ToArray();
            bytes = bytes.Concat(JceStruct.writeString("", 4)).ToArray();
            bytes = bytes.Concat(JceStruct.writeZero(5)).ToArray();
            bytes = bytes.Concat(JceStruct.writeZero(6)).ToArray();
            bytes = bytes.Concat(JceStruct.writeZero(7)).ToArray();
            bytes = bytes.Concat(JceStruct.writeZero(8)).ToArray();
            bytes = bytes.Concat(JceStruct.writeZero(9)).ToArray();
            bytes = bytes.Concat(JceStruct.writeZero(10)).ToArray();
            bytes = bytes.Concat(JceStruct.writeString("", 11)).ToArray();
            bytes = bytes.Concat(JceStruct.writeString("", 12)).ToArray();
            bytes = bytes.Concat(JceStruct.writeFlag(JceStruct.JceType.TYPE_STRUCT_END, 0)).ToArray();
            var dic = new Dictionary <object, object>()
            {
                { "GroupMngReq", bytes }
            };

            bytes = JceStruct.writeMap(dic, 0);
            //Debug.Print("解散群:" + Environment.NewLine + BitConverter.ToString(bytes).Replace("-", " "))
            bytes = JceStructSDK.Pack_HeadJce(API.QQ.mRequestID, "KQQ.ProfileService.ProfileServantObj", "GroupMngReq", bytes);
            bytes = API.PackCmdHeader("ProfileService.GroupMngReq", bytes);
            API.TClient.SendData(API.PackAllHeader(bytes));
        }
예제 #2
0
        public static void GetNick(long QQId)
        {
            var bytes = JceStruct.writeFlag(JceStruct.JceType.TYPE_STRUCT_BEGIN, 0);

            bytes = bytes.Concat(JceStruct.writeByte(0, 1)).ToArray();
            bytes = bytes.Concat(JceStruct.writeString("", 2)).ToArray();
            bytes = bytes.Concat(JceStruct.writeList(JceStruct.writeLong(QQId, 0), 3)).ToArray();
            bytes = bytes.Concat(JceStruct.writeByte(1, 4)).ToArray();
            bytes = bytes.Concat(JceStruct.writeByte(1, 5)).ToArray();
            bytes = bytes.Concat(JceStruct.writeByte(0, 6)).ToArray();
            bytes = bytes.Concat(JceStruct.writeByte(0, 7)).ToArray();
            bytes = bytes.Concat(JceStruct.writeByte(0, 8)).ToArray();
            bytes = bytes.Concat(JceStruct.writeByte(1, 9)).ToArray();
            bytes = bytes.Concat(JceStruct.writeByte(0, 10)).ToArray();
            bytes = bytes.Concat(JceStruct.writeByte(1, 11)).ToArray();
            bytes = bytes.Concat(JceStruct.writeFlag(JceStruct.JceType.TYPE_STRUCT_END, 0)).ToArray();

            var dic = new Dictionary <object, object>()
            {
                { "req", bytes }
            };

            bytes = JceStruct.writeMap(dic, 0);
            bytes = JceStructSDK.Pack_HeadJce(API.QQ.mRequestID, "KQQ.ProfileService.ProfileServantObj", "GetSimpleInfo", bytes);
            bytes = API.PackCmdHeader("ProfileService.GetSimpleInfo", bytes);
            API.TClient.SendData(API.PackAllHeader(bytes));
        }
예제 #3
0
        public static byte[] GetGroupMemberList(long GroupId)
        {
            var bytes = JceStruct.writeFlag(JceStruct.JceType.TYPE_STRUCT_BEGIN, 0);

            bytes = bytes.Concat(JceStruct.writeLong(API.QQ.LongQQ, 0)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(GroupId, 1)).ToArray();
            bytes = bytes.Concat(JceStruct.writeZero(2)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(API.Gid2Int(GroupId), 3)).ToArray();
            bytes = bytes.Concat(JceStruct.writeByte(2, 4)).ToArray();
            bytes = bytes.Concat(JceStruct.writeByte(1, 5)).ToArray();
            bytes = bytes.Concat(JceStruct.writeZero(6)).ToArray();
            bytes = bytes.Concat(JceStruct.writeFlag(JceStruct.JceType.TYPE_STRUCT_END, 7)).ToArray();
            Dictionary <object, object> dic = new Dictionary <object, object>()
            {
                { "GTML", bytes }
            };

            bytes = JceStruct.writeMap(dic, 0);
            bytes = Pack_HeadJce(API.QQ.mRequestID, "mqq.IMService.FriendListServiceServantObj", "GetTroopMemberListReq", bytes);
            //Debug.Print("GetGroupMemberList" + Environment.NewLine  + BitConverter.ToString(bytes).Replace("-", " "))
            bytes = API.PackCmdHeader("friendlist.GetTroopMemberList", bytes);
            bytes = API.PackAllHeader(bytes);
            API.TClient.SendData(bytes);
            return(bytes);
        }
예제 #4
0
        public static byte[] StatSvcRegister()
        {
            var bytes = JceStruct.writeFlag(JceStruct.JceType.TYPE_STRUCT_BEGIN, 0);

            bytes = bytes.Concat(JceStruct.writeLong(API.QQ.LongQQ, 0)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(7, 1)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(0, 2)).ToArray();
            bytes = bytes.Concat(JceStruct.writeString("", 3)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong((long)API.OnlineStaus.hide, 4)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(0, 5)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(0, 6)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(0, 7)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(0, 8)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(0, 9)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(0, 10)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(21, 11)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(1, 12)).ToArray();
            bytes = bytes.Concat(JceStruct.writeString("", 13)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(0, 14)).ToArray();
            bytes = bytes.Concat(JceStruct.writeSimpleList(API.Device.GUIDBytes, 16)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(2052, 17)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(0, 18)).ToArray();
            bytes = bytes.Concat(JceStruct.writeString(API.Device.model, 19)).ToArray();
            bytes = bytes.Concat(JceStruct.writeString(API.Device.model, 20)).ToArray();
            bytes = bytes.Concat(JceStruct.writeString(API.Device.os_version, 21)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(1, 22)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(14798, 23)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(0, 24)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(0, 26)).ToArray();
            bytes = bytes.Concat(JceStruct.writeInt(API.IPToInt32("111.30.181.202"), 27)).ToArray();
            bytes = bytes.Concat(JceStruct.writeFlag(JceStruct.JceType.TYPE_STRUCT_END, 6)).ToArray();

            Dictionary <object, object> dic = new Dictionary <object, object>()
            {
                { "SvcReqRegister", bytes }
            };

            bytes = JceStruct.writeMap(dic, 0);

            bytes = Pack_HeadJce(0, "PushService", "SvcReqRegister", bytes);
            //Debug.Print("StatSvcRegister" + Environment.NewLine  + BitConverter.ToString(bytes).Replace("-", " "))
            bytes = API.PackCmdHeader("StatSvc.register", bytes);

            HashTea Hash = new HashTea();

            byte[] EncodeByte = Hash.HashTEA(bytes, API.UN_Tlv.T305_SessionKey, 0, true);

            bytes = new byte[] { 0x0, 0x0, 0x0, 0xB, 1 };
            bytes = bytes.Concat(BitConverter.GetBytes(API.QQ.mRequestID + 1).Reverse().ToArray()).ToArray();
            bytes = bytes.Concat(new byte[] { 0x0 }).ToArray();
            bytes = bytes.Concat(API.QQ.UTF8).ToArray();
            bytes = bytes.Concat(EncodeByte).ToArray();
            bytes = BitConverter.GetBytes(bytes.Length + 4).Reverse().ToArray().Concat(bytes).ToArray();

            API.TClient.SendData(bytes);
            return(bytes);
        }
예제 #5
0
 public static void ReplyConfigPushSvc(byte[] BytesIn, int ssoseq)
 {
     JceStruct.StartDecode(BytesIn);
     if (JceStruct.DicSimpleList.Count > 0)
     {
         var Hex = JceStruct.DicSimpleList[0].ElementAt(0).Value;
         JceStruct.StartDecode(API.HexStrToByteArray(Hex));
         if (JceStruct.DicSimpleList.Count > 0)
         {
             Hex = JceStruct.DicSimpleList[0].ElementAt(0).Value;
             JceStruct.StartDecode(API.HexStrToByteArray(Hex));
             byte P1 = new byte();
             long P2 = 0;
             if (JceStruct.DicByte.Count > 0)
             {
                 byte.TryParse(JceStruct.DicByte[0].ElementAt(0).Value, out P1);
                 if (P1 != 2)
                 {
                     return;
                 }
             }
             if (JceStruct.DicInt.Count > 0)
             {
                 P2 = int.Parse(JceStruct.DicInt[0].ElementAt(0).Value);
             }
             else if (JceStruct.DicLong.Count > 0)
             {
                 P2 = long.Parse(JceStruct.DicLong[0].ElementAt(0).Value);
             }
             var bytes = JceStruct.writeFlag(JceStruct.JceType.TYPE_STRUCT_BEGIN, 0);
             bytes = bytes.Concat(JceStruct.writeByte(P1, 1)).ToArray();
             bytes = bytes.Concat(JceStruct.writeLong(P2, 2)).ToArray();
             var dic = new Dictionary <object, object>()
             {
                 { "PushResp", bytes }
             };
             bytes = JceStruct.writeMap(dic, 1);
             Debug.Print("ReplyConfigPushSvc:" + bytes.Length.ToString() + "\r\n" + BitConverter.ToString(bytes).Replace("-", " "));
             bytes = JceStructSDK.Pack_HeadJce(API.QQ.mRequestID, "QQService.ConfigPushSvc.MainServant", "PushResp", bytes);
             bytes = API.PackCmdHeader("ConfigPushSvc.PushResp", bytes);
             API.TClient.SendData(API.PackAllHeader(bytes));
         }
     }
 }
예제 #6
0
        public static byte[] GetFriendList(int start, int amount)
        {
            var bytes = JceStruct.writeFlag(JceStruct.JceType.TYPE_STRUCT_BEGIN, 0);

            bytes = bytes.Concat(JceStruct.writeByte(3, 0)).ToArray();
            bytes = bytes.Concat(JceStruct.writeByte(1, 1)).ToArray();
            bytes = bytes.Concat(JceStruct.writeLong(API.QQ.LongQQ, 2)).ToArray();
            if (start == 0)
            {
                bytes = bytes.Concat(JceStruct.writeZero(3)).ToArray();
            }
            else
            {
                bytes = bytes.Concat(JceStruct.writeByte((byte)start, 3)).ToArray();
            }
            bytes = bytes.Concat(JceStruct.writeByte((byte)amount, 4)).ToArray();
            bytes = bytes.Concat(JceStruct.writeZero(5)).ToArray();
            bytes = bytes.Concat(JceStruct.writeByte(1, 6)).ToArray();
            bytes = bytes.Concat(JceStruct.writeZero(7)).ToArray();
            bytes = bytes.Concat(JceStruct.writeZero(8)).ToArray();
            bytes = bytes.Concat(JceStruct.writeZero(9)).ToArray();
            bytes = bytes.Concat(JceStruct.writeByte(1, 10)).ToArray();
            bytes = bytes.Concat(JceStruct.writeByte(16, 11)).ToArray();
            bytes = bytes.Concat(JceStruct.writeFlag(JceStruct.JceType.TYPE_STRUCT_END, 12)).ToArray();

            Dictionary <object, object> dic = new Dictionary <object, object>()
            {
                { "FL", bytes }
            };

            bytes = JceStruct.writeMap(dic, 0);
            bytes = Pack_HeadJce(API.QQ.mRequestID, "mqq.IMService.FriendListServiceServantObj", "GetFriendListReq", bytes);
            //Debug.Print("GetFriendList" + Environment.NewLine  + BitConverter.ToString(bytes).Replace("-", " "))

            bytes = API.PackCmdHeader("friendlist.getFriendGroupList", bytes);
            bytes = API.PackAllHeader(bytes);
            API.TClient.SendData(bytes);
            return(bytes);
        }
예제 #7
0
        public static byte[] GetGroupList(long thisQQ)
        {
            var bytes = JceStruct.writeFlag(JceStruct.JceType.TYPE_STRUCT_BEGIN, 0);

            bytes = bytes.Concat(JceStruct.writeLong(thisQQ, 0)).ToArray();
            bytes = bytes.Concat(JceStruct.writeZero(1)).ToArray();
            bytes = bytes.Concat(JceStruct.writeByte(1, 4)).ToArray();
            bytes = bytes.Concat(JceStruct.writeByte(5, 5)).ToArray();
            bytes = bytes.Concat(JceStruct.writeFlag(JceStruct.JceType.TYPE_STRUCT_END, 6)).ToArray();

            Dictionary <object, object> dic = new Dictionary <object, object>()
            {
                { "GetTroopListReqV2", bytes }
            };

            bytes = JceStruct.writeMap(dic, 0);
            bytes = Pack_HeadJce(API.QQ.mRequestID, "mqq.IMService.FriendListServiceServantObj", "GetTroopListReqV2", bytes);
            bytes = API.PackCmdHeader("friendlist.GetTroopListReqV2", bytes);
            bytes = API.PackAllHeader(bytes);
            API.TClient.SendData(bytes);
            return(bytes);
        }