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 ...@@ -29,115 +29,110 @@ internal object LoginPacket : PacketFactory<LoginPacket.LoginPacketResponse, Log
writeShort(9) // subCommand writeShort(9) // subCommand
writeShort(LoginType.PASSWORD.value.toShort()) writeShort(LoginType.PASSWORD.value.toShort())
client.run { val appId = 16L
client.device.run { val subAppId = 2L
val appId = 16L
val subAppId = 2L t18(appId, client.appClientVersion, client.account.id)
t1(client.account.id, client.device.ipAddress)
t18(appId, appClientVersion, account.id) t106(
t1(account.id, ipAddress) appId,
t106( subAppId /* maybe 1*/,
appId, client.appClientVersion,
subAppId /* maybe 1*/, client.account.id,
appClientVersion, client.device.ipAddress,
account.id, 1,
ipAddress, client.account.passwordMd5,
1, 0,
account.passwordMd5, client.account.id.toByteArray(),
0, client.tgtgtKey,
account.id.toByteArray(), true,
tgtgtKey, client.device.guid,
true, LoginType.PASSWORD
guid, )
LoginType.PASSWORD
) /* // from GetStWithPasswd
int mMiscBitmap = this.mMiscBitmap;
/* // from GetStWithPasswd if (t.uinDeviceToken) {
int mMiscBitmap = this.mMiscBitmap; mMiscBitmap = (this.mMiscBitmap | 0x2000000);
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
}
} }
}
// 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