Commit 9140fb89 authored by Him188's avatar Him188

Convert `.run` calls to member accesses

parent 74b5b29d
......@@ -29,115 +29,110 @@ internal object LoginPacket : PacketFactory<LoginPacket.LoginPacketResponse, Log
writeShort(9) // subCommand
writeShort(LoginType.PASSWORD.value.toShort())
client.run {
client.device.run {
val appId = 16L
val subAppId = 2L
t18(appId, appClientVersion, account.id)
t1(account.id, ipAddress)
t106(
appId,
subAppId /* maybe 1*/,
appClientVersion,
account.id,
ipAddress,
1,
account.passwordMd5,
0,
account.id.toByteArray(),
tgtgtKey,
true,
guid,
LoginType.PASSWORD
)
/* // from GetStWithPasswd
int mMiscBitmap = this.mMiscBitmap;
if (t.uinDeviceToken) {
mMiscBitmap = (this.mMiscBitmap | 0x2000000);
}
// defaults true
if (ConfigManager.get_loginWithPicSt()) appIdList = longArrayOf(1600000226L)
*/
t116(miscBitMap, subSigMap, longArrayOf(1600000226L))
t100(appId, subAppId, appClientVersion, mainSigMap or 0xC0)
t107(0)
t108(byteArrayOf())
// ignored: t104()
t142(apkId)
// if login with non-number uin
// t112()
t144(
androidId = androidId,
androidDevInfo = generateDeviceInfoData(),
osType = osType,
osVersion = version.release,
ipv6NetType = ipv6NetType,
simInfo = simInfo,
unknown = byteArrayOf(), apn = apn,
isGuidFromFileNull = false,
isGuidAvailable = true,
isGuidChanged = false,
guidFlag = guidFlag(GuidSource.FROM_STORAGE, MacOrAndroidIdChangeFlag.NoChange),
buildModel = model,
guid = guid,
buildBrand = brand,
tgtgtKey = tgtgtKey
)
t145(guid)
t147(appId, apkVersionName, apkSignatureMd5)
if (miscBitMap and 0x80 != 0) {
t166(1)
}
// ignored t16a because array5 is null
t154(ssoSequenceId)
t141(simInfo, ipv6NetType, apn)
t8(2052)
// ignored t511 because domain is null
// ignored t172 because rollbackSig is null
// ignored t185 because loginType is not SMS
// ignored t400 because of first login
t187(macAddress)
t188(androidId)
if (imsiMd5.isNotEmpty()) {
t194(imsiMd5)
}
t191()
t201(N = byteArrayOf())
val bssid = wifiBSSID
val ssid = wifiSSID
if (bssid != null && ssid != null) {
t202(bssid, ssid)
}
t177()
t516()
t521()
t525(buildPacket {
t536(buildPacket {
//com.tencent.loginsecsdk.ProtocolDet#packExtraData
writeByte(1) // const
writeByte(0) // data count
}.readBytes())
})
// ignored t318 because not logging in by QR
}
val appId = 16L
val subAppId = 2L
t18(appId, client.appClientVersion, client.account.id)
t1(client.account.id, client.device.ipAddress)
t106(
appId,
subAppId /* maybe 1*/,
client.appClientVersion,
client.account.id,
client.device.ipAddress,
1,
client.account.passwordMd5,
0,
client.account.id.toByteArray(),
client.tgtgtKey,
true,
client.device.guid,
LoginType.PASSWORD
)
/* // from GetStWithPasswd
int mMiscBitmap = this.mMiscBitmap;
if (t.uinDeviceToken) {
mMiscBitmap = (this.mMiscBitmap | 0x2000000);
}
}
// defaults true
if (ConfigManager.get_loginWithPicSt()) appIdList = longArrayOf(1600000226L)
*/
t116(client.miscBitMap, client.subSigMap, longArrayOf(1600000226L))
t100(appId, subAppId, client.appClientVersion, client.mainSigMap or 0xC0)
t107(0)
t108(byteArrayOf())
// ignored: t104()
t142(client.apkId)
// if login with non-number uin
// t112()
t144(
androidId = client.device.androidId,
androidDevInfo = client.device.generateDeviceInfoData(),
osType = client.device.osType,
osVersion = client.device.version.release,
ipv6NetType = client.ipv6NetType,
simInfo = client.device.simInfo,
unknown = byteArrayOf(), apn = client.device.apn,
isGuidFromFileNull = false,
isGuidAvailable = true,
isGuidChanged = false,
guidFlag = guidFlag(GuidSource.FROM_STORAGE, MacOrAndroidIdChangeFlag.NoChange),
buildModel = client.device.model,
guid = client.device.guid,
buildBrand = client.device.brand,
tgtgtKey = client.tgtgtKey
)
t145(client.device.guid)
t147(appId, client.apkVersionName, client.apkSignatureMd5)
if (client.miscBitMap and 0x80 != 0) {
t166(1)
}
// ignored t16a because array5 is null
t154(client.ssoSequenceId)
t141(client.device.simInfo, client.ipv6NetType, client.device.apn)
t8(2052)
// ignored t511 because domain is null
// ignored t172 because rollbackSig is null
// ignored t185 because loginType is not SMS
// ignored t400 because of first login
t187(client.device.macAddress)
t188(client.device.androidId)
if (client.device.imsiMd5.isNotEmpty()) {
t194(client.device.imsiMd5)
}
t191()
t201(N = byteArrayOf())
val bssid = client.device.wifiBSSID
val ssid = client.device.wifiSSID
if (bssid != null && ssid != null) {
t202(bssid, ssid)
}
t177()
t516()
t521()
t525(buildPacket {
t536(buildPacket {
//com.tencent.loginsecsdk.ProtocolDet#packExtraData
writeByte(1) // const
writeByte(0) // data count
}.readBytes())
})
// ignored t318 because not logging in by QR
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment