mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-20 16:38:20 +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 simInfo: ByteArray,
|
||||||
public val osType: ByteArray,
|
public val osType: ByteArray,
|
||||||
public val macAddress: ByteArray,
|
public val macAddress: ByteArray,
|
||||||
public val wifiBSSID: ByteArray?,
|
public val wifiBSSID: ByteArray,
|
||||||
public val wifiSSID: ByteArray?,
|
public val wifiSSID: ByteArray,
|
||||||
public val imsiMd5: ByteArray,
|
public val imsiMd5: ByteArray,
|
||||||
public val imei: String,
|
public val imei: String,
|
||||||
public val apn: ByteArray
|
public val apn: ByteArray
|
||||||
|
@ -116,13 +116,13 @@ internal open class QQAndroidClient(
|
|||||||
|
|
||||||
val bot: QQAndroidBot by bot.unsafeWeakRef()
|
val bot: QQAndroidBot by bot.unsafeWeakRef()
|
||||||
|
|
||||||
var tgtgtKey: ByteArray = generateTgtgtKey(device.guid)
|
internal var tgtgtKey: ByteArray = generateTgtgtKey(device.guid)
|
||||||
val randomKey: ByteArray = getRandomByteArray(16)
|
internal val randomKey: ByteArray = getRandomByteArray(16)
|
||||||
|
|
||||||
|
|
||||||
val miscBitMap: Int get() = protocol.miscBitMap // 184024956 // 也可能是 150470524 ?
|
internal val miscBitMap: Int = protocol.miscBitMap // 184024956 // 也可能是 150470524 ?
|
||||||
private val mainSigMap: Int = protocol.mainSigMap
|
internal val mainSigMap: Int = protocol.mainSigMap
|
||||||
var subSigMap: Int = protocol.subSigMap // 0x10400 //=66,560
|
internal var subSigMap: Int = protocol.subSigMap // 0x10400 //=66,560
|
||||||
|
|
||||||
private val _ssoSequenceId: AtomicInt = atomic(85600)
|
private val _ssoSequenceId: AtomicInt = atomic(85600)
|
||||||
|
|
||||||
|
@ -163,6 +163,7 @@ internal fun BytePacketBuilder.t100(
|
|||||||
subAppId: Long,
|
subAppId: Long,
|
||||||
appClientVersion: Int,
|
appClientVersion: Int,
|
||||||
ssoVersion: Int,
|
ssoVersion: Int,
|
||||||
|
mainSigMap: Int
|
||||||
) {
|
) {
|
||||||
writeShort(0x100)
|
writeShort(0x100)
|
||||||
writeShortLVPacket {
|
writeShortLVPacket {
|
||||||
@ -171,7 +172,7 @@ internal fun BytePacketBuilder.t100(
|
|||||||
writeInt(appId.toInt())
|
writeInt(appId.toInt())
|
||||||
writeInt(subAppId.toInt())
|
writeInt(subAppId.toInt())
|
||||||
writeInt(appClientVersion)
|
writeInt(appClientVersion)
|
||||||
writeInt(34869472) // sigMap, 34869472?
|
writeInt(mainSigMap) // sigMap, 34869472?
|
||||||
} shouldEqualsTo 22
|
} shouldEqualsTo 22
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ internal class WtLogin {
|
|||||||
if (ConfigManager.get_loginWithPicSt()) appIdList = longArrayOf(1600000226L)
|
if (ConfigManager.get_loginWithPicSt()) appIdList = longArrayOf(1600000226L)
|
||||||
*/
|
*/
|
||||||
t116(client.miscBitMap, client.subSigMap)
|
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)
|
t107(0)
|
||||||
t108(client.device.imei.toByteArray())
|
t108(client.device.imei.toByteArray())
|
||||||
|
|
||||||
@ -230,21 +230,13 @@ internal class WtLogin {
|
|||||||
|
|
||||||
t187(client.device.macAddress)
|
t187(client.device.macAddress)
|
||||||
t188(client.device.androidId)
|
t188(client.device.androidId)
|
||||||
|
t194(client.device.imsiMd5)
|
||||||
val imsi = client.device.imsiMd5
|
|
||||||
if (imsi.isNotEmpty()) {
|
|
||||||
t194(imsi)
|
|
||||||
}
|
|
||||||
t191()
|
t191()
|
||||||
|
|
||||||
/*
|
/*
|
||||||
t201(N = byteArrayOf())*/
|
t201(N = byteArrayOf())*/
|
||||||
|
|
||||||
val bssid = client.device.wifiBSSID
|
t202(client.device.wifiBSSID, client.device.wifiSSID)
|
||||||
val ssid = client.device.wifiSSID
|
|
||||||
if (bssid != null && ssid != null) {
|
|
||||||
t202(bssid, ssid)
|
|
||||||
}
|
|
||||||
|
|
||||||
t177(
|
t177(
|
||||||
buildTime = client.buildTime,
|
buildTime = client.buildTime,
|
||||||
|
Loading…
Reference in New Issue
Block a user