mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-24 06:50:08 +08:00
Add debugging output
This commit is contained in:
parent
363c7a6eb1
commit
87544f54a3
@ -6,10 +6,7 @@ import kotlinx.io.core.*
|
|||||||
import net.mamoe.mirai.network.BotNetworkHandler
|
import net.mamoe.mirai.network.BotNetworkHandler
|
||||||
import net.mamoe.mirai.network.protocol.tim.TIMProtocol
|
import net.mamoe.mirai.network.protocol.tim.TIMProtocol
|
||||||
import net.mamoe.mirai.network.protocol.tim.packet.*
|
import net.mamoe.mirai.network.protocol.tim.packet.*
|
||||||
import net.mamoe.mirai.utils.io.encryptAndWrite
|
import net.mamoe.mirai.utils.io.*
|
||||||
import net.mamoe.mirai.utils.io.readIoBuffer
|
|
||||||
import net.mamoe.mirai.utils.io.writeHex
|
|
||||||
import net.mamoe.mirai.utils.io.writeQQ
|
|
||||||
|
|
||||||
object CaptchaKey : DecrypterByteArray, DecrypterType<CaptchaKey> {
|
object CaptchaKey : DecrypterByteArray, DecrypterType<CaptchaKey> {
|
||||||
override val value: ByteArray = TIMProtocol.key00BA
|
override val value: ByteArray = TIMProtocol.key00BA
|
||||||
@ -125,18 +122,20 @@ object CaptchaPacket : PacketFactory<CaptchaPacket.CaptchaResponse, CaptchaKey>(
|
|||||||
}
|
}
|
||||||
0x13u -> {
|
0x13u -> {
|
||||||
CaptchaResponse.Transmission().apply {
|
CaptchaResponse.Transmission().apply {
|
||||||
discardExact(9)
|
with(debugPrint("验证码包")) {
|
||||||
captchaToken = readIoBuffer(56)
|
discardExact(9)
|
||||||
|
captchaToken = readIoBuffer(56)
|
||||||
|
|
||||||
val length = readShort()
|
val length = readShort()
|
||||||
captchaSectionN = readIoBuffer(length)
|
captchaSectionN = readIoBuffer(length)
|
||||||
|
|
||||||
discardExact(1)
|
discardExact(1)
|
||||||
val byte = readByte().toInt()
|
val byte = readByte().toInt()
|
||||||
transmissionCompleted = byte == 0
|
transmissionCompleted = byte == 0
|
||||||
|
|
||||||
discardExact(remaining - 56 - 2)
|
discardExact(remaining - 56 - 2)
|
||||||
token00BA = readBytes(40)
|
token00BA = readBytes(40)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user