Commit 01ef09a5 authored by liujiahua123123's avatar liujiahua123123

ServerLoginResponseResendPacket

parent 0b761379
......@@ -2,6 +2,7 @@ package net.mamoe.mirai.network.packet.server.login
import net.mamoe.mirai.network.packet.PacketId
import net.mamoe.mirai.network.packet.server.ServerPacket
import net.mamoe.mirai.network.packet.server.goto
import java.io.DataInputStream
/**
......@@ -19,20 +20,20 @@ class ServerLoginResponseResendPacket(input: DataInputStream, val flag: Flag) :
lateinit var tgtgtKey: ByteArray
override fun decode() {//todo 检查
this.input.skip(8)
tgtgtKey = this.input.readNBytes(13)
this.input.skip(17)
this.input.skip(5)
tgtgtKey = this.input.readNBytes(16)//22
this.input.skip(3)//25
_0836_tlv0006_encr = this.input.readNBytes(120)
_0836_tlv0006_encr = this.input.readNBytes(179)
when (flag) {
Flag.`08 36 31 03` -> {
this.input.skip(13)
token = this.input.readNBytes(83)
token = this.input.goto(153).readNBytes(56)
}
Flag.OTHER -> {
//do nothing in this packet.
//[this.token] will be set in [Robot]
//token
}
}
}
......
......@@ -41,6 +41,6 @@ fun main(){
println(packet.verifyCode.toUByteArray().toHexString(" "))
println(packet.verifyCodeLength)
File("C:\\Users\\Him18\\Desktop\\5.png").createNewFile()
packet.verifyCode.inputStream().transferTo(FileOutputStream("C:\\Users\\Him18\\Desktop\\5.png"))
File(System.getProperty("user.dir") + "/5.png").createNewFile()
packet.verifyCode.inputStream().transferTo(FileOutputStream(System.getProperty("user.dir") + "/5.png"))
}
\ No newline at end of file
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