Android login Captcha complete

This commit is contained in:
jiahua.liu 2020-01-26 15:39:37 +08:00
parent 302208f741
commit 77e25ec863
2 changed files with 4 additions and 1 deletions

View File

@ -43,7 +43,8 @@ internal class QQAndroidBotNetworkHandler(bot: QQAndroidBot) : BotNetworkHandler
result = "ABCD" result = "ABCD"
} }
bot.logger.info("提交验证码") bot.logger.info("提交验证码")
LoginPacket.SubCommand2(bot.client, response.sign, result) val captchaResponse: LoginPacket.LoginPacketResponse =
LoginPacket.SubCommand2(bot.client, response.sign, result).sendAndExpect()
} }
is Captcha.Slider -> { is Captcha.Slider -> {
bot.logger.info("需要滑动验证码") bot.logger.info("需要滑动验证码")

View File

@ -38,6 +38,8 @@ internal object LoginPacket : PacketFactory<LoginPacket.LoginPacketResponse>("wt
): OutgoingPacket = buildLoginOutgoingPacket(client, bodyType = 2) { sequenceId -> ): OutgoingPacket = buildLoginOutgoingPacket(client, bodyType = 2) { sequenceId ->
writeSsoPacket(client, subAppId, commandName, sequenceId = sequenceId) { writeSsoPacket(client, subAppId, commandName, sequenceId = sequenceId) {
writeOicqRequestPacket(client, EncryptMethodECDH7(client.ecdh), 0x0810) { writeOicqRequestPacket(client, EncryptMethodECDH7(client.ecdh), 0x0810) {
writeShort(2) // subCommand
writeShort(4) // count of TLVs, probably ignored by server?
t2(captchaAnswer, captchaSign, 0) t2(captchaAnswer, captchaSign, 0)
t8(2052) t8(2052)
t104(client.t104) t104(client.t104)