public XCaptcha(string sigSission, string sigTicket) : base() { TlvPacker tlvs = new TlvPacker(); { tlvs.PutTlv(new Tlv(0x0193, new T193Body(sigTicket))); tlvs.PutTlv(new Tlv(0x0008, new T8Body())); tlvs.PutTlv(new Tlv(0x0104, new T104Body(sigSission))); tlvs.PutTlv(new Tlv(0x0116, new T116Body(AppInfo.wtLoginMiscBitmap, AppInfo.wtLoginSubSigBitmap, AppInfo.wtLoginSubAppIdList))); } PutUshortBE(OicqSubCommand); PutBytes(tlvs.GetBytes(true)); }
public XRefreshSms(string sigSession, string smsToken) : base() { TlvPacker tlvs = new TlvPacker(); { tlvs.PutTlv(new Tlv(0x0008, new T8Body(2052))); tlvs.PutTlv(new Tlv(0x0104, new T104Body(sigSession))); tlvs.PutTlv(new Tlv(0x0116, new T116Body(AppInfo.wtLoginMiscBitmap, AppInfo.wtLoginSubSigBitmap, AppInfo.wtLoginSubAppIdList))); tlvs.PutTlv(new Tlv(0x0174, new T174Body(smsToken))); tlvs.PutTlv(new Tlv(0x017a, new T17aBody(9))); tlvs.PutTlv(new Tlv(0x0197, new T197Body(0))); } PutUshortBE(OicqSubCommand); PutBytes(tlvs.GetBytes(true)); }
public XCheckSms(string sigSession, byte[] gSecret, string smsToken, string smsCode) { TlvPacker tlvs = new TlvPacker(); { tlvs.PutTlv(new Tlv(0x0008, new T8Body(2052))); tlvs.PutTlv(new Tlv(0x0104, new T104Body(sigSession))); tlvs.PutTlv(new Tlv(0x0116, new T116Body(AppInfo.wtLoginMiscBitmap, AppInfo.wtLoginSubSigBitmap, AppInfo.wtLoginSubAppIdList))); tlvs.PutTlv(new Tlv(0x0174, new T174Body(smsToken))); tlvs.PutTlv(new Tlv(0x017c, new T17cBody(smsCode))); tlvs.PutTlv(new Tlv(0x0198, new T198Body(0))); tlvs.PutTlv(new Tlv(0x0401, new T401Body(gSecret)));// G } PutUshortBE(OicqSubCommand); PutBytes(tlvs.GetBytes(true)); }
public TlvBody(ushort subCmd, uint uin, string password, uint ssoseq, byte[] tgtgKey) : base() { // 設備訊息上報 var deviceReport = new DeviceReport { Bootloader = Encoding.UTF8.GetBytes(DeviceInfo.Build.Bootloader), Version = new byte[0], // Encoding.UTF8.GetBytes(DeviceInfo.System.OsVersion), CodeName = Encoding.UTF8.GetBytes(DeviceInfo.Build.CodeName), Incremental = Encoding.UTF8.GetBytes(DeviceInfo.Build.Incremental), Fingerprint = Encoding.UTF8.GetBytes(DeviceInfo.Build.Fingerprint), BootId = new byte[0], // Encoding.UTF8.GetBytes(DeviceInfo.BootId), AndroidId = Encoding.UTF8.GetBytes(DeviceInfo.System.AndroidId), BaseBand = Encoding.UTF8.GetBytes(DeviceInfo.Build.BaseBand), InnerVersion = Encoding.UTF8.GetBytes(DeviceInfo.Build.InnerVersion) }; MemoryStream reportData = new MemoryStream(); Serializer.Serialize(reportData, deviceReport); var passwordMd5 = new Md5Cryptor().Encrypt(Encoding.UTF8.GetBytes(password)); // 構建 tlv TlvPacker tlvs = new TlvPacker(); tlvs.PutTlv(new T18(AppInfo.appId, AppInfo.appClientVersion, uin)); tlvs.PutTlv(new T1(uin, DeviceInfo.Network.Wifi.IpAddress)); tlvs.PutTlv(new T106(AppInfo.appId, AppInfo.subAppId, AppInfo.appClientVersion, uin, new byte[4], true, passwordMd5, 0, tgtgKey, true, DeviceInfo.Guid, LoginType.Password)); tlvs.PutTlv(new T116(184024956, 66560)); tlvs.PutTlv(new T100(AppInfo.appId, AppInfo.subAppId, AppInfo.appClientVersion)); tlvs.PutTlv(new T107(0, 0, 0)); tlvs.PutTlv(new T142(AppInfo.apkPackageName)); tlvs.PutTlv(new T144(DeviceInfo.System.AndroidId, reportData.ToArray(), DeviceInfo.System.Os, DeviceInfo.System.OsVersion, DeviceInfo.Network.Type, DeviceInfo.Network.Mobile.OperatorName, DeviceInfo.Network.Wifi.ApnName, true, true, false, DeviceInfo.Guid, 285212672, DeviceInfo.System.ModelName, DeviceInfo.System.Manufacturer, tgtgKey)); tlvs.PutTlv(new T145(DeviceInfo.Guid)); tlvs.PutTlv(new T147(AppInfo.appId, AppInfo.apkVersionName, AppInfo.apkSignature)); // tlvs.PushTlv(new 166()); tlvs.PutTlv(new T154(ssoseq)); tlvs.PutTlv(new T141(DeviceInfo.Network.Mobile.OperatorName, DeviceInfo.Network.Type, DeviceInfo.Network.Wifi.ApnName)); tlvs.PutTlv(new T8()); tlvs.PutTlv(new T511(new string[] { "office.qq.com", "qun.qq.com", "gamecenter.qq.com", "docs.qq.com", "mail.qq.com", "ti.qq.com", "vip.qq.com", "tenpay.com", "qqweb.qq.com", "qzone.qq.com", "mma.qq.com", "game.qq.com", "openmobile.qq.com", "connect.qq.com", })); tlvs.PutTlv(new T187(DeviceInfo.Network.Wifi.MacAddress)); tlvs.PutTlv(new T188(DeviceInfo.System.AndroidId)); // tlvs.PushTlv(Tlv.194()); tlvs.PutTlv(new T191()); tlvs.PutTlv(new T202(DeviceInfo.Network.Wifi.ApMacAddress, DeviceInfo.Network.Wifi.Ssid)); tlvs.PutTlv(new T177(AppInfo.WtLoginSdk.buildTime, AppInfo.WtLoginSdk.sdkVersion)); tlvs.PutTlv(new T516()); tlvs.PutTlv(new T521()); tlvs.PutTlv(new T525(new T536(new byte[] { 0x01, 0x00 }))); // tlvs.PushTlv(new T544()); // tlvs.PushTlv(new T545()); PutUshortBE(subCmd); PutBytes(tlvs.GetBytes(true)); }
public XTGTGT(uint uin, uint ssoseq, byte[] passwordMd5, byte[] tgtgKey, byte[] t106Key) : base() { // 設備訊息上報 var report = new DeviceReport( DeviceInfo.Build.Bootloader, DeviceInfo.System.OsVersion, DeviceInfo.Build.CodeName, DeviceInfo.Build.Incremental, DeviceInfo.Build.Fingerprint, DeviceInfo.BootId, DeviceInfo.System.AndroidId, DeviceInfo.Build.BaseBand, DeviceInfo.Build.InnerVersion); // 構建 tlv TlvPacker tlvs = new TlvPacker(); { tlvs.PutTlv(new Tlv(0x0018, new T18Body(AppInfo.appId, AppInfo.appClientVersion, uin))); tlvs.PutTlv(new Tlv(0x0001, new T1Body(uin, DeviceInfo.Network.Wifi.IpAddress))); tlvs.PutTlv(new Tlv(0x0106, new T106Body(AppInfo.appId, AppInfo.subAppId, AppInfo.appClientVersion, uin, new byte[4], true, passwordMd5, 0, true, DeviceInfo.Guid, LoginType.Password, tgtgKey), t106Key)); tlvs.PutTlv(new Tlv(0x0116, new T116Body(AppInfo.wtLoginMiscBitmap | (uint)WtLoginSigType.WLOGIN_DA2, AppInfo.wtLoginSubSigBitmap, AppInfo.wtLoginSubAppIdList))); tlvs.PutTlv(new Tlv(0x0100, new T100Body(AppInfo.appId, AppInfo.subAppId, AppInfo.appClientVersion))); tlvs.PutTlv(new Tlv(0x0107, new T107Body())); tlvs.PutTlv(new Tlv(0x0142, new T142Body(AppInfo.apkPackageName))); tlvs.PutTlv(new Tlv(0x0144, new T144Body(DeviceInfo.System.AndroidId, report, DeviceInfo.System.Os, DeviceInfo.System.OsVersion, DeviceInfo.Network.Type, DeviceInfo.Network.Mobile.OperatorName, DeviceInfo.Network.Wifi.ApnName, true, true, false, DeviceInfo.Guid, 285212672, DeviceInfo.System.ModelName, DeviceInfo.System.Manufacturer), tgtgKey)); tlvs.PutTlv(new Tlv(0x0145, new T145Body(DeviceInfo.Guid))); tlvs.PutTlv(new Tlv(0x0147, new T147Body(AppInfo.appId, AppInfo.apkVersionName, AppInfo.apkSignatureMd5))); // tlvs.PushTlv(new 166()); tlvs.PutTlv(new Tlv(0x0154, new T154Body(ssoseq))); tlvs.PutTlv(new Tlv(0x0141, new T141Body(DeviceInfo.Network.Mobile.OperatorName, DeviceInfo.Network.Type, DeviceInfo.Network.Wifi.ApnName))); tlvs.PutTlv(new Tlv(0x0008, new T8Body())); tlvs.PutTlv(new Tlv(0x0511, new T511Body(new string[] { "office.qq.com", "qun.qq.com", "gamecenter.qq.com", "docs.qq.com", "mail.qq.com", "ti.qq.com", "vip.qq.com", "tenpay.com", "qqweb.qq.com", "qzone.qq.com", "mma.qq.com", "game.qq.com", "openmobile.qq.com", "connect.qq.com", }))); tlvs.PutTlv(new Tlv(0x0187, new T187Body(DeviceInfo.Network.Wifi.MacAddress, 0))); tlvs.PutTlv(new Tlv(0x0188, new T188Body(DeviceInfo.System.AndroidId))); tlvs.PutTlv(new Tlv(0x0194, new T194Body(DeviceInfo.System.Imsi))); tlvs.PutTlv(new Tlv(0x0191, new T191Body())); tlvs.PutTlv(new Tlv(0x0202, new T202Body(DeviceInfo.Network.Wifi.ApMacAddress, DeviceInfo.Network.Wifi.Ssid))); tlvs.PutTlv(new Tlv(0x0177, new T177Body(AppInfo.WtLoginSdk.buildTime, AppInfo.WtLoginSdk.sdkVersion))); tlvs.PutTlv(new Tlv(0x0516, new T516Body())); tlvs.PutTlv(new Tlv(0x0521, new T521Body())); tlvs.PutTlv(new Tlv(0x0525, new T525Body(new Tlv(0x0536, new T536Body(new byte[] { 0x01, 0x00 }))))); // tlvs.PushTlv(new T544()); // tlvs.PushTlv(new T545()); } PutUshortBE(OicqSubCommand); PutBytes(tlvs.GetBytes(true)); }