mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-06 08:00:10 +08:00
update
This commit is contained in:
parent
8937239e40
commit
baec0a2bda
@ -87,7 +87,7 @@ class Robot(val number: Int, private val password: String) {
|
||||
|
||||
}
|
||||
|
||||
is ServerLoginResponseSucceedPacket -> {
|
||||
is ServerLoginResponseSuccessPacket -> {
|
||||
this._0828_rec_decr_key = packet._0828_rec_decr_key
|
||||
sendPacket(ClientLoginSucceedConfirmationPacket(this.number, this.serverIP, this.md5_32, packet.token38, packet.token88, packet.encryptionKey, this.tlv0105))
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import java.io.DataInputStream
|
||||
* @author Him188moe @ Mirai Project
|
||||
* @author NaturalHG @ Mirai Project
|
||||
*/
|
||||
class ServerLoginResponseSucceedPacket(input: DataInputStream) : ServerPacket(input) {
|
||||
class ServerLoginResponseSuccessPacket(input: DataInputStream) : ServerPacket(input) {
|
||||
lateinit var _0828_rec_decr_key: ByteArray
|
||||
var age: Int = 0
|
||||
var gender: Boolean = false//from 1byte
|
||||
@ -54,9 +54,9 @@ class ServerLoginResponseSucceedPacketEncrypted(input: DataInputStream) : Server
|
||||
}
|
||||
|
||||
@ExperimentalUnsignedTypes
|
||||
fun decrypt(tgtgtKey: ByteArray): ServerLoginResponseSucceedPacket {//todo test
|
||||
fun decrypt(tgtgtKey: ByteArray): ServerLoginResponseSuccessPacket {//todo test
|
||||
this.input.skip(14)
|
||||
return ServerLoginResponseSucceedPacket(TEACryptor.decrypt(TEACryptor.decrypt(this.input.readAllBytes().let { it.copyOfRange(0, it.size - 1) }, Protocol.shareKey.hexToBytes()), tgtgtKey).dataInputStream());
|
||||
return ServerLoginResponseSuccessPacket(TEACryptor.decrypt(TEACryptor.decrypt(this.input.readAllBytes().let { it.copyOfRange(0, it.size - 1) }, Protocol.shareKey.hexToBytes()), tgtgtKey).dataInputStream());
|
||||
//TeaDecrypt(取文本中间(data, 43, 取文本长度(data) - 45), m_0828_rec_decr_key)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user