mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-22 18:00:17 +08:00
Merge remote-tracking branch 'origin/master'
# Conflicts: # mirai-core/src/main/java/net/mamoe/mirai/network/packet/server/login/ServerLoginResponseResendPacket.kt
This commit is contained in:
commit
71750d43a4
@ -5,7 +5,7 @@ import net.mamoe.mirai.network.packet.server.ServerPacket
|
||||
import net.mamoe.mirai.network.packet.server.dataInputStream
|
||||
import net.mamoe.mirai.network.packet.server.goto
|
||||
import net.mamoe.mirai.util.TEACryptor
|
||||
import java.io.DataInputStream
|
||||
yaimport java.io.DataInputStream
|
||||
|
||||
/**
|
||||
* @author Him188moe
|
||||
@ -22,20 +22,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"))
|
||||
}
|
Loading…
Reference in New Issue
Block a user