Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error TypeError: a bytes-like object is required, not 'str' #12

Open
drepou opened this issue May 24, 2022 · 0 comments
Open

error TypeError: a bytes-like object is required, not 'str' #12

drepou opened this issue May 24, 2022 · 0 comments

Comments

@drepou
Copy link

drepou commented May 24, 2022

i get this error running reboot_router.py with py version 3.7.3

Python 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0] on linux

Traceback (most recent call last):
File "./reboot_router.py", line 133, in
sys.exit(main())
File "./reboot_router.py", line 129, in main
reboot(client, ROUTER, USER, PASSWORD)
File "./reboot_router.py", line 109, in reboot
verification_token = login(client, server, user, password)
File "./reboot_router.py", line 92, in login
clientnonce, servernonce, password, salt, iterations).decode('UTF-8')
File "./reboot_router.py", line 44, in get_client_proof
'sha256', password, bytearray.fromhex(salt), iterations)
TypeError: a bytes-like object is required, not 'str'

can you help me ??? it seem that bytearray.fromhex(salt) cause the issue i get strange value
i get this from resquest : 05b956492ed7fa6d9fac08b2a8ea.... ( i give you only partial value for security raison ) and then convert i get :
bytearray(b'\x05\xb9VI.\xd7\xfam\x9f\xac\x08\xb2\xa8\xea\x91;[i\xff\xfb\x80\xdfuS\ ..... for me this not valid hex ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant