mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-23 22:30:47 +08:00
Update CaptchaPacket
This commit is contained in:
parent
652ecc3f2b
commit
cdc92ae17c
@ -122,6 +122,7 @@ class Bot(val account: BotAccount, val logger: MiraiLogger, context: CoroutineCo
|
||||
configuration: BotConfiguration,
|
||||
cause: Throwable? = null
|
||||
): LoginResult {
|
||||
logger.info("BotAccount: ${qqAccount.toLong()}")
|
||||
logger.info("Initializing BotNetworkHandler")
|
||||
try {
|
||||
if (::network.isInitialized) {
|
||||
|
@ -374,7 +374,7 @@ internal class TIMBotNetworkHandler internal constructor(coroutineContext: Corou
|
||||
is TouchPacket.TouchResponse.Redirection -> {
|
||||
socket.close()
|
||||
bot.logger.info("Redirecting to ${packet.serverIP}")
|
||||
socket = BotSocketAdapter(packet.serverIP!!)
|
||||
socket = BotSocketAdapter(packet.serverIP)
|
||||
loginResult.complete(socket.resendTouch())
|
||||
}
|
||||
|
||||
@ -406,11 +406,9 @@ internal class TIMBotNetworkHandler internal constructor(coroutineContext: Corou
|
||||
this.token00BA = packet.token00BA
|
||||
this.captchaCache = packet.captchaPart1
|
||||
|
||||
if (packet.unknownBoolean) {
|
||||
this.captchaSectionId = 1
|
||||
socket.sendPacket(CaptchaPacket.RequestTransmission(bot.qqAccount, this.token0825, this.captchaSectionId++, packet.token00BA))
|
||||
}
|
||||
}
|
||||
|
||||
is CaptchaPacket.CaptchaResponse.Transmission -> {
|
||||
//packet is ServerCaptchaWrongPacket
|
||||
|
@ -22,7 +22,7 @@ object CaptchaPacket : PacketFactory<CaptchaPacket.CaptchaResponse, CaptchaKey>(
|
||||
token0825: ByteArray,
|
||||
captchaSequence: Int,
|
||||
token00BA: ByteArray
|
||||
): OutgoingPacket = buildOutgoingPacket {
|
||||
): OutgoingPacket = buildOutgoingPacket(name = "CaptchaPacket.RequestTransmission") {
|
||||
writeQQ(bot)
|
||||
writeFully(TIMProtocol.fixVer)
|
||||
writeFully(TIMProtocol.key00BA)
|
||||
@ -48,7 +48,7 @@ object CaptchaPacket : PacketFactory<CaptchaPacket.CaptchaResponse, CaptchaKey>(
|
||||
fun Refresh(
|
||||
bot: UInt,
|
||||
token0825: ByteArray
|
||||
): OutgoingPacket = buildOutgoingPacket {
|
||||
): OutgoingPacket = buildOutgoingPacket(name = "CaptchaPacket.Refresh") {
|
||||
writeQQ(bot)
|
||||
writeFully(TIMProtocol.fixVer)
|
||||
writeFully(TIMProtocol.key00BA)
|
||||
@ -72,7 +72,7 @@ object CaptchaPacket : PacketFactory<CaptchaPacket.CaptchaResponse, CaptchaKey>(
|
||||
token0825: ByteArray,
|
||||
captcha: String,
|
||||
captchaToken: IoBuffer
|
||||
): OutgoingPacket = buildOutgoingPacket {
|
||||
): OutgoingPacket = buildOutgoingPacket(name = "CaptchaPacket.Submit") {
|
||||
require(captcha.length == 4) { "captcha.length must == 4" }
|
||||
writeQQ(bot)
|
||||
writeFully(TIMProtocol.fixVer)
|
||||
@ -123,18 +123,37 @@ object CaptchaPacket : PacketFactory<CaptchaPacket.CaptchaResponse, CaptchaKey>(
|
||||
0x13u -> {
|
||||
CaptchaResponse.Transmission().apply {
|
||||
with(debugPrint("验证码包")) {
|
||||
discardExact(9)
|
||||
captchaToken = readIoBuffer(56)
|
||||
/*
|
||||
* 00 05 01 00 00 01 23
|
||||
* 00 40 A0 E9 2F 12 1D 2E B1 15 26 89 EB C3 F0 9A 0C 03 00 03 A0 F2 74 57 58 57 E9 7A 2B C7 52 5D BC D8 7B D5 A4 7C AD 33 85 85 39 88 D2 CE AD 68 36 2E F0 AE 19 E8 25 3A F7 3A AD BE 19 A9 E7 C4 B5 4C
|
||||
* 02 BC 28 01 38 40 C6 4E 85 A6 32 24 0C 3C B3 19 46 5D AD 56 AC 3D 3A E1 ED AD 8C 60 05 47 37 10 DC AD E5 72 F9 F9 18 B8 0C 13 10 D2 4E C9 3C 02 BE 57 E4 02 E0 6C 6C 6E E9 3C 57 28 66 BD 0C D3 FF CC 5A 47 B4 F1 7C 87 85 24 B0 60 44 20 1C 1E AD 95 7B CB 45 AF 43 95 10 0F 1D 0B 33 CB 09 7E BE F8 35 B0 D4 5C AB 9E 5A BE 34 E8 B9 2E 65 C7 DA F5 E1 EB 71 43 31 A1 2E 40 4D 84 22 EF 8F CD 05 13 33 E5 CF E3 AA 09 C7 71 15 30 A4 83 A7 36 84 90 4D 4C A7 67 66 4B A5 D7 C5 FB 5E D7 26 ED 9C 92 AD 7C 8F 09 36 A3 60 84 16 07 45 B4 6E EA CD 05 EC C7 0B BA A2 BE 71 24 E6 49 C1 FC 05 3E 26 C9 E6 F7 EA B3 25 8D BA 1F 15 3D DC BC FD CE A6 79 FF 8B 28 B6 12 78 F3 8F EB A6 A9 B6 A5 5F 65 58 CC CD FC F6 BC A6 46 21 68 70 64 82 C7 8F 79 1A C0 B3 48 B6 CD C8 7C 7E 90 61 43 F7 A6 D7 B1 39 F1 72 C7 78 7E 37 49 50 6A B6 9F 5B 8D A9 C0 B0 BB F0 EF 9D CD 6E F7 E7 5A 3C BA E1 02 2E A0 2D 00 04 07 25 B3 B2 34 FA CD 6E C3 A4 ED 87 88 59 D8 63 0C 1D 27 D1 04 4D B5 5B 6E 43 07 17 79 FA EB C2 A3 11 77 72 9D C5 55 90 80 EF 01 47 1A 10 02 E7 02 F6 8A 76 E9 E5 C1 A0 F6 E4 B4 65 36 7F 41 36 37 E8 CE 99 7F 49 66 2A 61 7D A8 D2 57 D9 18 E9 FA 85 CB 3A 1E 7A DE 8C 07 F5 2A CA 33 25 D4 E0 86 08 75 50 B6 1C EE 99 BA 56 F8 4F E9 EF CD E6 27 EE 81 D9 CC 5E 7F 4A 33 54 CB F9 A5 92 DE 76 0B F4 57 29 65 77 BC BD 3D CC E5 1C C4 2E 2E 02 0E 41 A0 09 29 ED DB F2 53 6B 19 6A ED EC FA D5 0B 76 E6 87 CC 99 9E 80 75 28 A6 92 6D 63 DB BF D7 09 B1 DA DD EC CB D6 7F 5E 60 14 83 C7 B8 19 85 97 37 BA 64 0C AA B7 E9 D5 E0 C2 0F 7A 86 DA 56 96 D1 07 FD DA F0 F1 83 9E 8B 49 F3 DF 3C 2F FD 35 33 55 D2 D4 FA D0 3B 52 BE CD 22 60 22 9E 4C 03 EA 1A 3A 23 46 29 C0 A2 12 51 BC 81 EF E6 FF E8 E9 19 8D 66 F4 F4 A5 FE CD 33 8F 77 67 DC 38 F9 E4 1F D4 63 0D CF 24 AA F5 E1 89 7D F3 79 3D B6 47 02 E9 F8 C9 D0 5A DF 84 00 08 B6 E2 95 3F 3D B3 4E 83 CE EC 91 52 ED 61 63 74 7B 6E CC CC EE A3 5D 3F 7B 91 2E EA F7 3C 0C 3A 4C BC 08 86 A0 6A 63 D0 2D 30 EF 28 BC B3 85 57 85 C1 39 D8 AC FC ED 64 C7 C4 A9 EA F2 5A C5 7F 96 9B 1B CF 97 1E 16 8B EB E4 D7 23 7B 7B D9 E4 09 C9 32 BD 35 B6 AF FE 92 C5 78 BF E1 1A D8 A1 0A 09 5E DE 22 8A F7 7A 9F 4E A2 FD 7E
|
||||
* 01 //第几个包
|
||||
* 01 //是否还有更多
|
||||
* 00 28 39 24 31 73 77 6E 55 E7 99 4D 9E 56 AF 6D 38 77 10 60 3B 68 45 41 35 70 1D B4 FE 7E CE 78 65 5A D7 C8 95 AF F2 6B 6D C8
|
||||
* 00 10 CC A9 FA 63 A8 34 C7 3C E6 F7 2E 15 B7 EF 3E 07
|
||||
*/
|
||||
discardExact(7)
|
||||
captchaToken = readIoBuffer(readUShort().toInt()) // 56
|
||||
|
||||
val length = readShort()
|
||||
captchaSectionN = readIoBuffer(length)
|
||||
/*
|
||||
*00 05 01 00 00 01 23
|
||||
* 00 40 0B 84 40 B1 59 9C FE B8 EC E4 E8 36 2B 4B 03 C7 9F 5D FA A3 7B 43 BD 50 19 55 EA 4C A8 DE 49 FF 5F 45 89 7F 2E B2 6D C9 D6 B7 08 3B 60 31 74 4C FA DA 5F 5F A6 80 ED A1 19 48 F9 C9 4A 6A AD F6
|
||||
* 00 48 39 46 4F 92 0F 70 C5 55 81 3E 0B E7 96 18 4F 31 93 FE 1B D6 A9 50 97 97 E0 83 76 03 6C 50 80 2B 65 13 63 44 A3 9E 0B D9 C0 10 60 70 5B A1 53 2C FD 3B 84 DF A6 E6 F6 1F 71 B5 A6 54 00 00 00 00 49 45 4E 44 AE 42 60 82
|
||||
* 04 //第几个包
|
||||
* 00 //是否还有更多
|
||||
* 00 28 3C 40 BD A5 8B F9 63 97 7E 62 34 E3 F9 49 49 9E 21 01 3C 64 21 AE 8D 87 21 9F 44 4A 0C 6F 85 32 B4 13 4C 59 66 E7 EE 17
|
||||
* 00 10 AF 66 92 E2 B4 39 6B 9A BA 29 EF AA 8D 98 79 55
|
||||
*/
|
||||
captchaSectionN = readIoBuffer(readUShort().toInt()) // <=700
|
||||
|
||||
discardExact(1)
|
||||
val byte = readByte().toInt()
|
||||
transmissionCompleted = byte == 0
|
||||
discardExact(1) // 第几个包
|
||||
transmissionCompleted = readByte().toInt() == 0
|
||||
|
||||
discardExact(remaining - 56 - 2)
|
||||
token00BA = readBytes(40)
|
||||
token00BA = readBytes(readUShort().toInt())
|
||||
|
||||
println(token00BA.toUHexString())
|
||||
// 剩余
|
||||
// 00 10 AF 66 92 E2 B4 39 6B 9A BA 29 EF AA 8D 98 79 55
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -79,6 +79,11 @@ inline class LoginResult(val id: Byte) {
|
||||
@JvmStatic
|
||||
val CAPTCHA = LoginResult(10)
|
||||
|
||||
/**
|
||||
* 该号码长期未登录, 为了保证账号安全, 已被系统设置成保护状态, 请用手机 TIM 最新版本登录, 登录成功后即可自动解除保护模式
|
||||
*/ // TIM的错误代码为 00020
|
||||
val PROTECTED = LoginResult(11)
|
||||
|
||||
@JvmStatic
|
||||
val values: List<LoginResult> by lazy {
|
||||
listOf(
|
||||
@ -91,7 +96,9 @@ inline class LoginResult(val id: Byte) {
|
||||
TAKEN_BACK,
|
||||
INTERNAL_ERROR,
|
||||
TIMEOUT,
|
||||
NETWORK_UNAVAILABLE
|
||||
NETWORK_UNAVAILABLE,
|
||||
CAPTCHA,
|
||||
PROTECTED
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -87,8 +87,7 @@ object SubmitPasswordPacket : PacketFactory<SubmitPasswordPacket.LoginResponse,
|
||||
|
||||
class CaptchaInit(
|
||||
val captchaPart1: IoBuffer,
|
||||
val token00BA: ByteArray,
|
||||
val unknownBoolean: Boolean
|
||||
val token00BA: ByteArray
|
||||
) : LoginResponse() {
|
||||
override fun toString(): String = "LoginResponse.CaptchaInit"
|
||||
}
|
||||
@ -129,21 +128,54 @@ object SubmitPasswordPacket : PacketFactory<SubmitPasswordPacket.LoginResponse,
|
||||
}
|
||||
}
|
||||
|
||||
size == 844 || size == 871 -> {
|
||||
discardExact(78)
|
||||
//println(readRemainingBytes().toUHexString())
|
||||
val captchaLength = readShort()//2bytes
|
||||
val captchaPart1 = readIoBuffer(captchaLength)
|
||||
size == 844 || size == 871 || size == 852 -> {
|
||||
/*
|
||||
FB 01 04 03 3B 00 01 00 BA 02 03 34 13
|
||||
00 05 01 00 00 01 23
|
||||
00 40 AA F6 23 CF 12 15 32 BE 21 5C 8D 43 7B BA 10 BD D8 8B 4B 23 54 7F C5 1C C2 34 51 84 B0 9E 86 8C 30 26 97 B3 26 A8 23 C2 15 72 26 C7 52 88 BA 56 C8 A3 C5 3E C4 DC B3 5A 96 DE 8F A8 72 AB 9D 00 02 BC 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 00 00 00 82 00 00 00 35 08 03 00 00 00 BA 12 C3 02 00 00 00 04 67 41 4D 41 00 00 B1 8F 0B FC 61 05 00 00 00 01 73 52 47 42 00 AE CE 1C E9 00 00 00 45 50 4C 54 45 FD F7 ED D8 FF E9 EE F6 E7 74 9A 81 F8 F1 E7 EF FE EE 19 84 53 FF F2 EC F6 FC EF FF FE F3 E7 FF EF BE E7 CE 35 6D 4D 4A 92 6D 1A 73 48 54 77 5F EA EB DE E1 F5 E2 88 B2 97 B1 C7 B3 D3 EE D8 8D C5 A6 9E D8 B8 92 93 00 F8 00 00 09 FE 49 44 41 54 58 C3 B4 58 0B 97 AB BC 0D B4 2D 8C DF F8 81 CD FF FF A9 1D 99 6C 12 48 D2 9E EF B4 CD BD BB 09 2C C1 62 34 1A 8D 2C C4 7F F9 32 FC 7A FB 88 CF D6 5A 5D B5 B6 CB 82 73 38 BF F0 07 61 F0 B6 18 F1 BF 7F BD 45 70 1E 60 29 44 80 28 9C 58 F8 60 31 8E 5F 88 85 7F CF 60 FE 0F 31 F0 9B FD 3B 70 7C 50 0A 3F 3A 1F CC 25 97 E7 4B B8 5F B7 39 7F 96 7F F8 5B 3C 1F DF 3E 83 40 14 62 3E 35 7F 30 C8 09 80 C0 D9 F3 D4 C2 DF 30 E2 FA F3 1E C1 3F 7E FE F9 03 C8 ED F3 14 3E 62 C1 45 B9 13 84 A5 28 8D 10 9C B3 8A 5F C2 3D 50 B9 07 F1 F8 70 BE 99 E7 DF 7F FD BE 5E 83 55 17 AB FE A0 50 08 07 A9 5F B0 A8 98 FF B5 D6 33 FF 4C 0E D0 F3 EF 9B E6 13 86 DB C3 19 F1 BC E8 F3 B7 B8 9D 79 A0 F0 80 1D F1 20 DF AE 54 ED 6B F7 5C 19 96 09 A9 A5 94 DE FE 64 A3 B9 FD FB CF D8 5F AE 51 1C C1 5B 39 5A 65 C5 4E 39 C7 98 5A F0 7C 2C 5C C1 89 48 7B F9 B6 E0 CF 95 CC 83 74 E2 0E C9 3D 70 DC 5F B8 59 7D 78 03 E7 8A D6 4A ED 39 87 75 DD 56 0A B6 58 05 2A D0 9E 68 34 A6 C5 F2 E5 A1 C4 25 1A F3 B1 92 B8 A5 E1 1E 3D 6E EA 18 02 67 16 53 CA E2 90 73 D5 72 4A DB 8A 17 75 07 50 16 4B 14 8F 41 60 89 B3 E2 C2 A4 AF 95 F9 FA BB F9 75 D5 05 05 16 20 66 C2 AC 79 2C 62 AB D5 8D 41 C0 6B 8B A4 95 C5 C2 14 37 79 EC 8C AB 7B DD E5 4A C7 0B 05 C5 FD C0 FC 7D C5 DC 03 E1 8F 9C 86 99 02 DC 1D 49 51 4A EB 41 72 3D 63 C8 01 35 61 1C 6D EB 31 76 14 AA 5B BE B3 CA FC 40 E3 72 95 B9 9D 78 86 8A 1A 04 E9 3A CA AE 70 2D 2C 4E F9 01 14 90 88 0D AF E6 2B 28 DB B6 35 A5 9D E5 52 5D 51 B8 05 F4 F6 B8 D7 1A FC 08 E4 FD CB 78 30 94 7F 6D 84 20 0A 1E D8 38 EB 47 6C A9 8D 96 10 42 92 1A C8 0C A0 90 0E BE DA DE F3 F9 3B D7 5F 84 CA 5C C1 79 1C 2C 82 9F 5B E6 46 B9 39 00 61 0C 87 40 BB B4 75 27 E4 00 01 00 28 F4 99 45 7E B9 5C 79 76 6C EE E1 E3 F9 E9 CA C8 07 1A D1 93 40 BC 90 6A C3 05 E9 D6 B5 FF BD AE E9 33 01 0D 29 9D 6B 03 01 15 00 10 5F 09 4A F0 F5 43 58 F1 ED 1C C2 09 AB CB 1A FA
|
||||
*/
|
||||
|
||||
discardExact(1)
|
||||
/*
|
||||
FB 01 04 03 3B 00 01 00 BA 02 03 34 13
|
||||
05 01 00 00 01 23
|
||||
|
||||
val unknownBoolean = readByte().toInt() == 1
|
||||
[00 40] E7 C7 8D 04 D4 37 E7 37 4E BD 68 6B CF DA EA FB 8B FD BB 95 90 FF 36 61 43 64 78 00 0D 07 EB F5 00 AC 1A 21 A9 5D 1F D1 3A 04 89 D0 18 49 CF D1 6B B6 F2 A2 A4 6B A2 3C 2C 8C 5E 7F 1A 94 37 D4 02 BC 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 00 00 00 82 00 00 00 35 08 03 00 00 00 BA 12 C3 02 00 00 00 04 67 41 4D 41 00 00 B1 8F 0B FC 61 05 00 00 00 01 73 52 47 42 00 AE CE 1C E9 00 00 00 3C 50 4C 54 45 FF F7 ED 8D 70 44 D8 BD 96 9C 73 37 FD FA F7 FB F2 E4 FB EE DA FB F8 EC FD F5 F2 FF FA DF FF F5 CB FD E9 CB EA D4 B5 AB 93 6F 9C 80 59 80 60 2C F8 E2 BF 7F 66 42 C2 A6 7E B9 94 5F D7 79 28 98 00 00 0A D2 49 44 41 54 58 C3 8C 98 8D 82 AB A8 12 84 11 05 E4 47 44 F3 FE EF BA 5F B5 49 26 66 E6 DE 5D 33 67 E2 99 18 68 AA AB AB 0B 9C BB 5F C9 AE 75 59 97 45 6F 8B 6E F4 4B 2F 3E 08 D1 FD CB B5 DE 2E F7 5F AE 74 7F A5 7C 05 B1 24 4D AD 9B 85 91 74 BB A6 10 F8 F4 D7 37 6E 2F 42 70 F7 00 D2 BF BE 5E 71 BC 7E 3F 51 E0 62 C9 0A 23 84 F0 FA 6B FA 0C FC CF DF 16 C3 15 C4 F3 C1 F0 1A F7 FF FE B3 48 5E BF 9E 73 B1 70 46 62 84 C8 95 73 8E 35 3F 43 F9 79 D4 FD 75 AF 2F AD AF 9C 06 97 3F 9F FA FB FD B5 80 F7 FF C9 C4 CF DF 43 4E 9A BD 56 8B 22 06 71 E4 E7 9B 1F F3 3E 87 B8 62 48 17 6A D9 91 B7 90 93 FB 78 FA FD A0 FB FC F3 2B 1F 6F 44 5E 01 04 2D 7F 34 7F 9E DB E9 5B 25 88 10 60 C8 FA 43 21 E7 BE 62 49 EF 94 89 B9 C9 22 B8 CF F1 BF 50 70 BF FE 1F 9C 06 C8 D5 6F C7 64 57 DF 7C CD 49 30 7C 51 E9 FD F6 0A 4C 40 5D 20 08 86 94 3E 10 FA 8B 07 2E DD 91 78 DE 28 E9 21 E6 E8 FB 7E 6C 9B F7 FE DC 88 82 18 E0 E7 9A BE BE FD 99 47 BD AD E9 8A C1 C1 83 9C 7E 62 48 7F 54 C7 7B D9 77 62 2E 41 20 90 80 E6 FB B4 F9 12 03 29 18 7E EB C7 06 0E F9 4E 82 F4 89 A9 BE 1B AE 4A FE 11 89 DB F4 9F 85 E3 FE 22 EA 33 A0 B0 B8 48 04 CC D9 7D 29 4C 9B 44 8A E2 B7 69 1B F0 E1 0B 44 F7 83 34 91 8B 00 56 C9 D1 AA 51 82 F2 09 D8 5F B1 BB 5B 4C AF 34 C4 11 5B 1B DB B1 B5 52 0A 39 A5 18 A8 0A DF 0F CF 6D FA CC DE 57 10 FA B7 10 8A AE 48 0C 92 D8 F5 F7 A4 1F F0 A7 7B 1A AF 0F 48 44 D4 F7 FD 24 10 4A 69 44 A3 92 84 1A 53 6F 39 7F 32 EB 96 07 C7 8A B9 62 4A AA 61 2A 98 C5 90 88 F5 9B AF BF 2B DA DD 0B 86 2F 2E 71 01 D0 EA 59 73 3B 7B 9F 8E 7E 52 93 31 57 70 29 39 DD 34 F1 67 7C 42 07 7F A4 80 32 A2 82 7A AB 11 31 5B 17 77 A3 FD 17 27 BF 63 7A CA 42 72 8D 7A 08 D2 A4 76 6E F3 3C EF 3B B4 04 85 EC 8F 3E 4A FA 35 CA 00 01 00 28 83 4D 03 6C A3 41 E3 77 42 EC BD 53 16 A0 60 C8 32 CB 8C 39 2B 61 87 E3 50 79 E1 BD 5A 5D AF C0 A1 B7 27 83 FE CE CD 5B 01 15 00 10 B0 50 A7 C9 03 2F EC 2F 05 22 EC 27 32 93 FF 74
|
||||
*/
|
||||
|
||||
discardExact(remaining - 60)
|
||||
/*
|
||||
FB 01 04 03 3B 00 01 00 BA 02 03 34 13
|
||||
00 05 01 00 00 01 23
|
||||
[00 40] 67 42 E8 E5 08 2D D2 87 83 DB A6 D3 56 51 6F 43 A5 DB 67 CD 31 24 DE 2D AF 5A D2 13 F6 5D 7B D1 26 55 61 DB 95 80 C6 B1 74 66 DB C2 8C EC 71 0E DA 74 D0 6D 80 BB 88 B5 12 6A 30 24 DB 65 95 1C
|
||||
[02 BC] 89 `50 4E 47` 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 00 00 00 82 00 00 00 35 08 03 00 00 00 BA 12 C3 02 00 00 00 04 67 41 4D 41 00 00 B1 8F 0B FC 61 05 00 00 00 01 73 52 47 42 00 AE CE 1C E9 00 00 00 3C 50 4C 54 45 FF F2 EC 55 96 73 F2 EF E4 79 AD 8F EC FD EC DC FF EB 23 70 4A FC FE F3 FD F7 ED F5 FA EC 30 84 5B AC E1 C3 12 78 49 CC E4 D0 99 C3 A9 12 87 53 E2 EF DE 49 7D 5F 3A 6F 51 BF F9 DA 26 D7 2D 0B 00 00 0B 58 49 44 41 54 58 C3 8C 98 8B 82 AC AA 0E 44 45 40 44 84 46 FD FF 7F BD AB E2 A3 9D D9 E7 EC 73 ED 99 7E 22 14 49 A5 92 30 CC AF 6B B8 AE 39 85 9E C6 79 98 E7 31 DB 47 FB 32 E7 FC 1A F3 EB E2 97 C4 08 EE D4 E0 39 C4 A0 DB E7 F3 E9 EF D7 60 8F FB 0D 57 D2 73 4E 29 0B C2 90 C2 9C C6 91 E9 13 83 5E 10 E6 5F 60 00 AB 41 F3 1C 42 18 46 20 84 CC ED FC 0F 86 E2 AF 7F 0F D4 E1 B1 03 33 64 4D C1 87 31 85 C0 BE 78 EA FA 35 7F 77 35 BC 6E 98 CF DF F4 48 73 C8 4C 30 84 70 CD 3A CC FF 17 88 97 1D EC 0F 13 84 64 D6 98 53 BC AE 30 0F BF 0C 9B ED 63 96 6D 6C F1 64 96 10 04 46 8E 32 82 59 E1 3F 11 7C 5F 6E 00 5A 7A 1E D9 85 AC 91 62 F1 CE 3B E7 5B B4 99 AF 89 CF C7 F5 74 5F 27 88 31 5F 86 31 F2 CC B7 8D 6E 9B FD D3 F3 30 BC B6 AF 5D C9 03 A2 A3 FD 34 7A 37 4D DB 3E AD CB F1 86 F0 45 C0 D2 E1 04 60 5F 25 BB 66 B1 67 30 42 9C 10 86 BF 81 F8 E9 02 99 37 40 44 D8 18 C4 C0 A1 EF D3 E2 4B F1 9F 4F 0B 27 84 6B F9 EF B3 AD 6F 2C D0 C2 63 EF A3 BE 91 25 C2 13 16 7F C7 F0 F5 C2 69 E2 1C 7A 6D AD 86 30 12 8A 29 6D 8B 3B 62 28 EB EA 44 F4 1C 6E 0E DC E3 BF 1F 65 BB D4 9B F7 BA D9 BC 19 60 50 7E B3 67 78 56 FB 15 08 F9 5C 1F 47 E6 34 A6 CA 14 B5 6D 25 E4 91 38 EC 7E 5A 4A 0A 71 59 97 13 42 1A 1F 07 26 D3 8D 71 B8 A2 93 7B C7 06 91 53 DD 62 24 A2 47 63 32 D3 88 5E 63 FA 97 BD 9B 12 E4 13 D2 29 2E 39 77 1C 98 FA E6 C5 47 AC 50 96 A9 85 1C DD BA 54 8D 65 C6 D1 08 7B 5E B8 FD 8E 1C 01 1A D9 7F 08 7D 8F 11 A4 A9 BA 69 F7 85 D0 32 5D 19 7F EE FD E7 4B 1E 6E 4D CA 29 57 D8 34 A6 E4 F6 68 1B 66 FF 93 47 1C CA 34 79 AC C5 00 91 CD E4 EB 21 BB 40 49 0A D2 5C 2B 91 D4 EB 04 04 6E F5 FB B4 EF DB 56 81 A0 9B E6 F9 A7 02 BD 22 22 DF 02 23 7D 1D 5B E8 62 63 DB 0B D3 A0 33 C1 4F AE A7 1C B7 69 8B A3 06 58
|
||||
00
|
||||
01
|
||||
[00 28] AD 53 81 65 DB 7D 7B 1E F4 AC 69 28 90 35 23 F3 0F DF AF 48 66 D9 06 13 0F AE 57 3C 5D AF CB 96 6C 5C CD 95 3F 2F 50 C9
|
||||
01
|
||||
15
|
||||
[00 10] A8 5D 2B 4F 33 AF 5D 99 B1 EF 92 DA C6 E5 A9 FB
|
||||
*/
|
||||
discardExact(20) // FB 01 04 03 3B 00 01 00 BA 02 03 34 13 00 05 01 00 00 01 23
|
||||
discardExact(readUShort()) // size=00 40, 64
|
||||
val captchaPart1 = readIoBuffer(readUShort().toInt()) // size=02 BC, 700
|
||||
|
||||
return LoginResponse.CaptchaInit(captchaPart1, readBytes(40), unknownBoolean)
|
||||
discardExact(2)//00 01
|
||||
|
||||
val token00BA = readBytes(readUShort().toInt()) // size=00 28, 40
|
||||
|
||||
/*
|
||||
剩余
|
||||
01
|
||||
15
|
||||
[00 10] A8 5D 2B 4F 33 AF 5D 99 B1 EF 92 DA C6 E5 A9 FB
|
||||
*/
|
||||
return LoginResponse.CaptchaInit(captchaPart1, token00BA)
|
||||
}
|
||||
size > 650 -> {
|
||||
|
||||
/*
|
||||
00 01 09 00 70 00 01 C4 20 CB 84 35 17 3F 43 FC 06 63 D9 49 5B 3C AC 00 38 12 9E 18 DC 47 41 FC EF 0F EA FC AD 22 88 82 17 C0 52 84 63 9B 0C 1E E9 28 AE 78 CC 0A D3 FE BE 46 4A 59 CE 64 07 81 A6 9E AC E6 31 4C 23 A9 3E C2 20 84 54 05 92 8E E9 00 20 B5 9E 51 9C C4 FD 2F E1 00 8B F7 2B CE 1B C8 DA F0 7D 62 DC 5A CA FE AF 8C 54 92 A8 58 9E F5 91 00 00 01 03 00 14 00 01 00 10 60 C9 5D A7 45 70 04 7F 21 7D 84 50 5C 66 A5 C6 01 10 00 3C 00 01 00 38 1A F8 64 61 13 97 89 C1 64 E9 B9 97 A1 2F CE D6 91 5B D2 3A 60 D2 B7 F2 38 35 57 0C 24 51 18 FC 02 EA C6 E9 E8 B9 CB B3 35 97 8F 6E A1 CE 53 22 9E B5 2C 31 36 C6 3C C1 01 07 01 D3 00 01 00 16 00 00 00 01 00 00 00 64 00 00 0D FD 00 09 3A 80 00 00 00 3C 00 02 48 60 3F 44 54 39 70 44 24 62 2A 53 6E 71 72 34 00 88 00 04 5D E7 BE 55 AB 53 02 17 00 00 00 00 00 78 A9 44 3A 18 15 0F 3F 52 57 0B 6C C8 34 6B B6 B1 A6 B0 B5 9D 74 4D BD 52 88 DD E4 A1 F2 EC 3E 49 3B 05 B4 F5 46 2B 8A 2D 7D AE E6 91 66 DD A3 78 5C AF 7D 5A 65 AA AD 6C CD 65 55 49 4E 07 FE 3A AD 76 75 21 DC AF 92 48 AA 48 22 29 B4 D3 6A A5 D1 D5 EB 62 A8 17 6C E3 FA CB D6 BB BE CE 7F F4 4E 18 B4 BF 76 3D 9B AF CB A4 89 1A CC E8 B5 07 54 E2 6A 59 CE 0F 20 74 4B 60 6D 5A 49 24 5B 27 46 38 77 66 59 2B 46 7D 00 78 00 01 5D E7 BE 55 00 70 B9 A4 D6 DB CF AF C3 CA 04 98 22 60 B1 B5 9C 55 06 F1 B6 D8 CF 63 20 1E 81 90 DA 29 44 79 F0 13 65 3B 2B 83 B8 D7 93 D7 DF 05 71 19 5B 25 68 EA DD 9B 01 E0 F0 5F 7A 79 CF C6 35 A7 AC 14 D7 AF 1A 5D AF 72 D2 25 57 36 E0 DE 9B 0D A8 B1 62 78 3D 9F DE D6 0C 37 7F B7 AC 94 40 A7 0D A9 A2 71 AB E0 C2 EE 10 CA 67 59 C8 57 F4 36 2C 77 79 98 00 83 01 3D 77 5E 58 59 47 5F 3E 77 4B 45 4A 2A 2A 5A 6A 00 70 00 01 5D E7 BE 55 00 68 7A 22 3E 6F 09 F1 37 5F 95 62 FF 06 BB 6D C4 77 92 4C 16 23 65 8A FF 38 F2 7A A6 91 10 AB B6 3B 14 30 C6 AC 58 59 7B E8 3F B2 97 EA 63 99 B9 6E DC F5 2A D4 24 0B 38 6F 67 75 D5 BF FE 74 0B A0 E5 8A 64 10 41 EF 86 24 07 81 75 2E B3 BE EE A4 AD B1 91 37 BE 6B 80 43 AF D9 0F 73 1F B4 7B 82 CF 07 12 C6 41 39 B9 E8 53 70 42 51 5F 52 28 64 29 4E 4B 2D 77 32 29 52 01 08 00 23 00 01 00 1F 00 17 02 5B 0E 73 74 65 61 6D 63 68 69 6E 61 2E 66 75 6E 01 13 80 02 00 06 00 04 00 00 00 01 01 15 00 10 04 19 C6 27 44 A7 B7 34 EF 1C 45 67 78 1F CD 18
|
||||
*/
|
||||
|
||||
discardExact(7)//00 01 09 00 70 00 01
|
||||
//FB 01 04 03 33
|
||||
val encryptionKey = readIoBuffer(16)//C6 72 C7 73 70 01 46 A2 11 88 AC E4 92 7B BF 90
|
||||
@ -206,6 +238,7 @@ object SubmitPasswordPacket : PacketFactory<SubmitPasswordPacket.LoginResponse,
|
||||
LoginResult.INTERNAL_ERROR
|
||||
}
|
||||
|
||||
246 -> LoginResult.PROTECTED
|
||||
240, 319, 320, 351 -> LoginResult.WRONG_PASSWORD
|
||||
//135 -> LoginState.RETYPE_PASSWORD
|
||||
63 -> LoginResult.BLOCKED
|
||||
@ -213,6 +246,8 @@ object SubmitPasswordPacket : PacketFactory<SubmitPasswordPacket.LoginResponse,
|
||||
279, 495, 551, 487 -> LoginResult.DEVICE_LOCK
|
||||
343, 359 -> LoginResult.TAKEN_BACK
|
||||
|
||||
// 246: 33 05 08 00 22 01 00 00 03 E8 00 1B 02 00 00 00 01 00 00 15 85 08 36 00 00 00 33 00 00 00 00 76 E7 50 ED 00 00 01 26 01 00 00 B7 00 01 08 36 00 00 01 26 00 AD E8 AF A5 E5 8F B7 E7 A0 81 E9 95 BF E6 9C 9F E6 9C AA E7 99 BB E5 BD 95 EF BC 8C E4 B8 BA E4 BA 86 E4 BF 9D E9 9A 9C E5 B8 90 E5 8F B7 E5 AE 89 E5 85 A8 EF BC 8C E5 B7 B2 E8 A2 AB E7 B3 BB E7 BB 9F E8 AE BE E7 BD AE E6 88 90 E4 BF 9D E6 8A A4 E7 8A B6 E6 80 81 EF BC 8C E8 AF B7 E7 94 A8 E6 89 8B E6 9C BA 51 51 E6 9C 80 E6 96 B0 E7 89 88 E6 9C AC E7 99 BB E5 BD 95 EF BC 8C E7 99 BB E5 BD 95 E6 88 90 E5 8A 9F E5 90 8E E5 8D B3 E5 8F AF E8 87 AA E5 8A A8 E8 A7 A3 E9 99 A4 E4 BF 9D E6 8A A4 E7 8A B6 E6 80 81 E3 80 82 01 15 00 10 26 F9 4C F4 F0 CA 6C 53 98 77 54 2B BD CD 40 66
|
||||
|
||||
// 165: 01 00 1E 00 10 72 36 7B 6B 6D 78 3A 4B 63 7B 47 5B 68 3E 21 59 00 06 00 78 34 F6 F9 49 AA 13 F5 F5 01 36 13 E1 4C F7 0F 25 C1 2C 10 75 CA 69 E9 12 B3 6D F4 A7 59 60 FF 01 03 73 28 47 A3 2A B8 46 C3 92 24 D5 8A AE 8B C2 45 0C 31 27 B5 17 9E 22 13 59 AF B4 CC F6 E3 3A 91 60 13 21 11 3C 25 D9 50 F4 23 C6 06 1D F4 15 41 BA 5D 7B 66 26 96 EB 0E 04 14 8E 5B D4 33 6E B8 5D E7 10 3A 0E EF 96 B1 D4 22 E4 74 48 A7 1D 3A 46 7D E6 EF 1F 6B 69 01 15 00 10 6F 99 48 5E 98 AE D3 4B F8 35 63 1D 70 EE 6D 82
|
||||
|
||||
else -> {
|
||||
|
@ -49,13 +49,13 @@ object TouchPacket : PacketFactory<TouchPacket.TouchResponse, TouchKey>(TouchKey
|
||||
class OK(
|
||||
var loginTime: Int,
|
||||
val loginIP: String,
|
||||
val token0825: ByteArray
|
||||
val token0825: ByteArray // 56
|
||||
) : TouchResponse() {
|
||||
override fun toString(): String = "TouchResponse.OK"
|
||||
}
|
||||
|
||||
class Redirection(
|
||||
val serverIP: String? = null
|
||||
val serverIP: String
|
||||
) : TouchResponse() {
|
||||
override fun toString(): String = "TouchResponse.Redirection"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user