mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-21 16:38:17 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
99a0ec85c5
@ -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))
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import java.io.DataInputStream
|
||||
* @author Him188moe @ Mirai Project
|
||||
* @author NaturalHG @ Mirai Project
|
||||
*/
|
||||
class ServerLoginResponseSucceedPacket(input: DataInputStream, val packetDataLength: Int) : ServerPacket(input) {
|
||||
class ServerLoginResponseSuccessPacket(input: DataInputStream, val packetDataLength: Int) : ServerPacket(input) {
|
||||
lateinit var _0828_rec_decr_key: ByteArray//16 bytes|
|
||||
var age: Short = 0
|
||||
var gender: Int = 0//from 1byte
|
||||
@ -92,9 +92,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