mamoe / mirai

高效率 QQ 机器人支持库
https://mirai.mamoe.net
GNU Affero General Public License v3.0
14.35k stars 2.53k forks source link

Password length DON'T HAVE TO be at most 16 #1217

Closed chuanwise closed 3 years ago

chuanwise commented 3 years ago

之前我使用的 bot 账号密码 20 位左右,是可以登录的。但是升级了后登录就不行了,抛出异常:

... Caused by: java.lang.IllegalArgumentException: Password length must be at most 16.
    at net.mamoe.mirai.internal.BotAccount.<init>(BotAccount.kt:37)
    at net.mamoe.mirai.internal.BotAccount.<init>(BotAccount.kt:32)
    at net.mamoe.mirai.internal.BotFactoryImpl.newBot(BotFactory.kt:34)
    at net.mamoe.mirai.BotFactory$INSTANCE.newBot(BotFactory.kt:115)
    at love.forte.simbot.component.mirai.MiraiBotVerifier.verity(MiraiBotVerifier.kt:78)
    ... 10 more

但实际上使用 QQ 界面是可以登陆这个 bot 账号的,说明并非历史上所有的密码长度皆为如此。

版本

simbot,2.0.6-BETA.2

补充信息

这个问题导致我升级 mirai 后登不上 QQ,只能改密码。

Him188 commented 3 years ago

据之前真实测试,Android 协议是不能的,PC 协议可以登录。 有可能现在又改了?你可以试试自己把密码 md5 后用 md5 登录(传参 byte[] 到 newBot 的 password 参数),可以绕过这个检测。

sandtechnology commented 3 years ago

请尝试使用手机QQ进行登录,你会发现密码长度最大为16位,可以尝试md5登录

sandtechnology commented 3 years ago

详情可见:https://kf.qq.com/faq/161227BZFVji161227AF3Ari.html