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:
Him188moe 2019-08-18 22:04:02 +08:00
commit 71750d43a4
2 changed files with 9 additions and 9 deletions

View File

@ -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
}
}
}

View File

@ -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"))
}