mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-25 03:30:15 +08:00
[core] Fix sso packet struct
This commit is contained in:
parent
1fde79d7ad
commit
5fd091eaad
@ -365,21 +365,16 @@ internal inline fun BytePacketBuilder.writeSsoPacket(
|
|||||||
writeInt(client.outgoingPacketSessionId.size + 4)
|
writeInt(client.outgoingPacketSessionId.size + 4)
|
||||||
writeFully(client.outgoingPacketSessionId) // 02 B0 5B 8B
|
writeFully(client.outgoingPacketSessionId) // 02 B0 5B 8B
|
||||||
|
|
||||||
if (commandName.startsWith("wtlogin")) {
|
writeInt(client.device.imei.length + 4)
|
||||||
writeText(client.device.imei)
|
writeText(client.device.imei)
|
||||||
writeInt(0x4)
|
writeInt(0x4)
|
||||||
|
|
||||||
writeShort((client.ksid.size + 2).toShort())
|
writeShort((client.ksid.size + 2).toShort())
|
||||||
writeFully(client.ksid)
|
writeFully(client.ksid)
|
||||||
|
|
||||||
writeInt(reserveField.size + 4)
|
writeInt(reserveField.size + 4)
|
||||||
writeFully(reserveField)
|
writeFully(reserveField)
|
||||||
}
|
|
||||||
|
|
||||||
if (commandName == MessageSvcPbSendMsg.commandName && encryptWorker != null) {
|
|
||||||
writeInt(reserveField.size + 4)
|
|
||||||
writeFully(reserveField)
|
|
||||||
}
|
|
||||||
|
|
||||||
val qimei16Bytes = client.qimei16?.toByteArray() ?: EMPTY_BYTE_ARRAY
|
val qimei16Bytes = client.qimei16?.toByteArray() ?: EMPTY_BYTE_ARRAY
|
||||||
writeInt(qimei16Bytes.size + 4)
|
writeInt(qimei16Bytes.size + 4)
|
||||||
|
Loading…
Reference in New Issue
Block a user