Commit 48342c4c authored by Him188's avatar Him188

LoginPacket subCommand9 analysis

parent 8558ebff
...@@ -48,7 +48,7 @@ OutgoingPacket { ...@@ -48,7 +48,7 @@ OutgoingPacket {
short 27 + 2 + remaining.length short 27 + 2 + remaining.length
ushort client.protocolVersion // const 8001 ushort client.protocolVersion // const 8001
ushort 0x0001 ushort 0x0001
uint client.account.id uint client.uin
byte 3 // const byte 3 // const
ubyte encryptMethod.value // [EncryptMethod] ubyte encryptMethod.value // [EncryptMethod]
byte 0 // const byte 0 // const
......
...@@ -68,7 +68,7 @@ internal inline fun PacketFactory<*, *>.buildLoginOutgoingPacket( ...@@ -68,7 +68,7 @@ internal inline fun PacketFactory<*, *>.buildLoginOutgoingPacket(
} }
writeByte(0x00) writeByte(0x00)
client.account.id.toString().let { client.uin.toString().let {
writeInt(it.length + 4) writeInt(it.length + 4)
writeStringUtf8(it) writeStringUtf8(it)
} }
...@@ -143,7 +143,7 @@ private inline fun BytePacketBuilder.writeLoginSsoPacket( ...@@ -143,7 +143,7 @@ private inline fun BytePacketBuilder.writeLoginSsoPacket(
writeInt(4) writeInt(4)
client.device.ksid.let { client.ksid.let {
writeShort((it.length + 2).toShort()) writeShort((it.length + 2).toShort())
writeStringUtf8(it) writeStringUtf8(it)
} }
...@@ -279,7 +279,7 @@ internal interface EncryptMethodECDH : EncryptMethod { ...@@ -279,7 +279,7 @@ internal interface EncryptMethodECDH : EncryptMethod {
* short 27 + 2 + remaining.length * short 27 + 2 + remaining.length
* ushort client.protocolVersion // const 8001 * ushort client.protocolVersion // const 8001
* ushort 0x0001 * ushort 0x0001
* uint client.account.id * uint client.uin
* byte 3 // const * byte 3 // const
* ubyte encryptMethod.value // [EncryptMethod] * ubyte encryptMethod.value // [EncryptMethod]
* byte 0 // const * byte 0 // const
...@@ -304,7 +304,7 @@ internal fun BytePacketBuilder.writeOicqRequestPacket( ...@@ -304,7 +304,7 @@ internal fun BytePacketBuilder.writeOicqRequestPacket(
writeShort(client.protocolVersion) writeShort(client.protocolVersion)
writeShort(packetId.commandId.toShort()) writeShort(packetId.commandId.toShort())
writeShort(1) // const?? writeShort(1) // const??
writeQQ(client.account.id) writeQQ(client.uin)
writeByte(3) // originally const writeByte(3) // originally const
writeByte(encryptMethod.id.toByte()) writeByte(encryptMethod.id.toByte())
writeByte(0) // const8_always_0 writeByte(0) // const8_always_0
......
...@@ -5,7 +5,7 @@ import kotlinx.io.core.ByteReadPacket ...@@ -5,7 +5,7 @@ import kotlinx.io.core.ByteReadPacket
import kotlinx.io.core.toByteArray import kotlinx.io.core.toByteArray
import kotlinx.io.core.writeFully import kotlinx.io.core.writeFully
import net.mamoe.mirai.qqandroid.utils.NetworkType import net.mamoe.mirai.qqandroid.utils.NetworkType
import net.mamoe.mirai.utils.currentTime import net.mamoe.mirai.utils.currentTimeMillis
import net.mamoe.mirai.utils.io.* import net.mamoe.mirai.utils.io.*
import net.mamoe.mirai.utils.md5 import net.mamoe.mirai.utils.md5
import kotlin.random.Random import kotlin.random.Random
...@@ -497,7 +497,7 @@ fun BytePacketBuilder.t400( ...@@ -497,7 +497,7 @@ fun BytePacketBuilder.t400(
writeFully(dpwd) writeFully(dpwd)
writeInt(appId.toInt()) writeInt(appId.toInt())
writeInt(subAppId.toInt()) writeInt(subAppId.toInt())
writeLong(currentTime) writeLong(currentTimeMillis)
writeFully(randomSeed) writeFully(randomSeed)
} }
} }
......
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