mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-03 02:54:41 +08:00
Fix protocol error again, thanks to @wdvxdr1123 and MiraiGo
This commit is contained in:
parent
c934ff5b89
commit
5a7771012b
@ -49,8 +49,8 @@ public class DeviceInfo(
|
||||
public val simInfo: ByteArray,
|
||||
public val osType: ByteArray,
|
||||
public val macAddress: ByteArray,
|
||||
public val wifiBSSID: ByteArray?,
|
||||
public val wifiSSID: ByteArray?,
|
||||
public val wifiBSSID: ByteArray,
|
||||
public val wifiSSID: ByteArray,
|
||||
public val imsiMd5: ByteArray,
|
||||
public val imei: String,
|
||||
public val apn: ByteArray
|
||||
|
@ -116,13 +116,13 @@ internal open class QQAndroidClient(
|
||||
|
||||
val bot: QQAndroidBot by bot.unsafeWeakRef()
|
||||
|
||||
var tgtgtKey: ByteArray = generateTgtgtKey(device.guid)
|
||||
val randomKey: ByteArray = getRandomByteArray(16)
|
||||
internal var tgtgtKey: ByteArray = generateTgtgtKey(device.guid)
|
||||
internal val randomKey: ByteArray = getRandomByteArray(16)
|
||||
|
||||
|
||||
val miscBitMap: Int get() = protocol.miscBitMap // 184024956 // 也可能是 150470524 ?
|
||||
private val mainSigMap: Int = protocol.mainSigMap
|
||||
var subSigMap: Int = protocol.subSigMap // 0x10400 //=66,560
|
||||
internal val miscBitMap: Int = protocol.miscBitMap // 184024956 // 也可能是 150470524 ?
|
||||
internal val mainSigMap: Int = protocol.mainSigMap
|
||||
internal var subSigMap: Int = protocol.subSigMap // 0x10400 //=66,560
|
||||
|
||||
private val _ssoSequenceId: AtomicInt = atomic(85600)
|
||||
|
||||
|
@ -163,6 +163,7 @@ internal fun BytePacketBuilder.t100(
|
||||
subAppId: Long,
|
||||
appClientVersion: Int,
|
||||
ssoVersion: Int,
|
||||
mainSigMap: Int
|
||||
) {
|
||||
writeShort(0x100)
|
||||
writeShortLVPacket {
|
||||
@ -171,7 +172,7 @@ internal fun BytePacketBuilder.t100(
|
||||
writeInt(appId.toInt())
|
||||
writeInt(subAppId.toInt())
|
||||
writeInt(appClientVersion)
|
||||
writeInt(34869472) // sigMap, 34869472?
|
||||
writeInt(mainSigMap) // sigMap, 34869472?
|
||||
} shouldEqualsTo 22
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ internal class WtLogin {
|
||||
if (ConfigManager.get_loginWithPicSt()) appIdList = longArrayOf(1600000226L)
|
||||
*/
|
||||
t116(client.miscBitMap, client.subSigMap)
|
||||
t100(appId, client.subAppId, client.appClientVersion, client.ssoVersion)
|
||||
t100(appId, client.subAppId, client.appClientVersion, client.ssoVersion, client.mainSigMap)
|
||||
t107(0)
|
||||
t108(client.device.imei.toByteArray())
|
||||
|
||||
@ -230,21 +230,13 @@ internal class WtLogin {
|
||||
|
||||
t187(client.device.macAddress)
|
||||
t188(client.device.androidId)
|
||||
|
||||
val imsi = client.device.imsiMd5
|
||||
if (imsi.isNotEmpty()) {
|
||||
t194(imsi)
|
||||
}
|
||||
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)
|
||||
}
|
||||
t202(client.device.wifiBSSID, client.device.wifiSSID)
|
||||
|
||||
t177(
|
||||
buildTime = client.buildTime,
|
||||
|
Loading…
Reference in New Issue
Block a user