SonderXiaoming / kanna_connection_redive

建议不要商用,任何行为与本人无关
GNU General Public License v3.0
29 stars 6 forks source link

在绑定账号的时候出现以下报错,这个怎么解决? #14

Closed ks-EKY closed 10 months ago

ks-EKY commented 10 months ago

2023-12-24 12:34:29.677 | INFO | hoshino.modules.kanna_connection_redive-main.bsgamesdk:login:67 - 无需验证码登录成 功 2023-12-24 12:34:29.677 | INFO | hoshino.modules.kanna_connection_redive-main.bsgamesdk:b_login:90 - geetest or captcha succeed 2023-12-24 12:34:29.833 | INFO | hoshino.modules.kanna_connection_redive-main.pcrclient:login:175 - using manifest ver = 202312131906 Traceback (most recent call last): File "D:\PCR_bot\HoshinoBot\hoshino\modules\kanna_connection_redive-main\pcrclient.py", line 114, in callapi response = pcrclient.unpack( File "D:\PCR_bot\HoshinoBot\hoshino\modules\kanna_connection_redive-main\pcrclient.py", line 99, in unpack aes = AES.new(data[-32:], AES.MODE_CBC, b'ha4nBYA2APUD6Uv1') File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\Crypto\Cipher\AES.py", line 228, in new return _create_cipher(sys.modules[name], key, mode, *args, kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\Crypto\Cipher__init__.py", line 79, in _create_cipher return modes[mode](factory, kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\Crypto\Cipher_mode_cbc.py", line 274, in _create_cbc_cipher cipher_state = factory._create_base_cipher(kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\Crypto\Cipher\AES.py", line 90, in _create_base_cipher raise ValueError("Incorrect AES key length (%d bytes)" % len(key)) ValueError: Incorrect AES key length (0 bytes)

[2023-12-24 12:34:30,786 nonebot] INFO: Traceback (most recent call last): File "D:\PCR_bot\HoshinoBot\hoshino\modules\kanna_connection_redive-main\pcrclient.py", line 114, in callapi response = pcrclient.unpack( File "D:\PCR_bot\HoshinoBot\hoshino\modules\kanna_connection_redive-main\pcrclient.py", line 99, in unpack aes = AES.new(data[-32:], AES.MODE_CBC, b'ha4nBYA2APUD6Uv1') File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\Crypto\Cipher\AES.py", line 228, in new return _create_cipher(sys.modules[name], key, mode, *args, kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\Crypto\Cipher__init__.py", line 79, in _create_cipher return modes[mode](factory, kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\Crypto\Cipher_mode_cbc.py", line 274, in _create_cbc_cipher cipher_state = factory._create_base_cipher(kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\Crypto\Cipher\AES.py", line 90, in _create_base_cipher raise ValueError("Incorrect AES key length (%d bytes)" % len(key)) ValueError: Incorrect AES key length (0 bytes)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\PCR_bot\HoshinoBot\hoshino\modules\kanna_connection_redive-main\login.py", line 77, in query await client.login() File "D:\PCR_bot\HoshinoBot\hoshino\modules\kanna_connection_redive-main\pcrclient.py", line 181, in login await self.callapi('/check/check_agreement', {}) File "D:\PCR_bot\HoshinoBot\hoshino\modules\kanna_connection_redive-main\pcrclient.py", line 136, in callapi raise ApiException("未知错误" + str(e), 501) hoshino.modules.kanna_connection_redive-main.pcrclient.ApiException: 未知错误Incorrect AES key length (0 bytes)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\PCR_bot\HoshinoBot\hoshino\modules\kanna_connection_redive-main\login.py", line 97, in bind_support client = await query([acccount.copy()], True) File "D:\PCR_bot\HoshinoBot\hoshino\modules\kanna_connection_redive-main\login.py", line 83, in query raise Exception(f"未知错误:{e}") Exception: 未知错误:未知错误Incorrect AES key length (0 bytes)

[2023-12-24 12:34:30,786] INFO in login: Traceback (most recent call last): File "D:\PCR_bot\HoshinoBot\hoshino\modules\kanna_connection_redive-main\pcrclient.py", line 114, in callapi response = pcrclient.unpack( File "D:\PCR_bot\HoshinoBot\hoshino\modules\kanna_connection_redive-main\pcrclient.py", line 99, in unpack aes = AES.new(data[-32:], AES.MODE_CBC, b'ha4nBYA2APUD6Uv1') File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\Crypto\Cipher\AES.py", line 228, in new return _create_cipher(sys.modules[name], key, mode, *args, kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\Crypto\Cipher__init__.py", line 79, in _create_cipher return modes[mode](factory, kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\Crypto\Cipher_mode_cbc.py", line 274, in _create_cbc_cipher cipher_state = factory._create_base_cipher(kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\Crypto\Cipher\AES.py", line 90, in _create_base_cipher raise ValueError("Incorrect AES key length (%d bytes)" % len(key)) ValueError: Incorrect AES key length (0 bytes)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\PCR_bot\HoshinoBot\hoshino\modules\kanna_connection_redive-main\login.py", line 77, in query await client.login() File "D:\PCR_bot\HoshinoBot\hoshino\modules\kanna_connection_redive-main\pcrclient.py", line 181, in login await self.callapi('/check/check_agreement', {}) File "D:\PCR_bot\HoshinoBot\hoshino\modules\kanna_connection_redive-main\pcrclient.py", line 136, in callapi raise ApiException("未知错误" + str(e), 501) hoshino.modules.kanna_connection_redive-main.pcrclient.ApiException: 未知错误Incorrect AES key length (0 bytes)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\PCR_bot\HoshinoBot\hoshino\modules\kanna_connection_redive-main\login.py", line 97, in bind_support client = await query([acccount.copy()], True) File "D:\PCR_bot\HoshinoBot\hoshino\modules\kanna_connection_redive-main\login.py", line 83, in query raise Exception(f"未知错误:{e}") Exception: 未知错误:未知错误Incorrect AES key length (0 bytes)

NekoYSure commented 10 months ago

pcrclient.py文件里面 181行 await self.callapi('/check/check_agreement', {})注释下试试

ks-EKY commented 10 months ago

pcrclient.py 文件里面 181行 await self.callapi('/check/check_agreement', {})注释下试试

可以了,问题解决了,感谢

SonderXiaoming commented 10 months ago

改了