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

UnicodeDecodeError: 'ascii' codec can't decode byte 0xde in position 1: ordinal not in range(128) #5

Open
Everest0516 opened this issue Feb 3, 2020 · 6 comments

Comments

@Everest0516
Copy link

root@kali:~/tools/CTF-RSA-tool# python solve.py --verbose -k examples/jarvis_oj_hardRSA/pubkey.pem --decrypt examples/jarvis_oj_hardRSA/flag.enc
Traceback (most recent call last):
File "solve.py", line 148, in
attackobj = lib.RSAutils.RSAAttack(args)
File "/root/tools/CTF-RSA-tool/lib/RSAutils.py", line 34, in init
self.c = libnum.s2n(f.read().strip())
File "/usr/local/lib/python2.7/dist-packages/libnum/strings.py", line 10, in s2n
return int(s.encode("utf-8").hex(), 16)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xde in position 1: ordinal not in range(128)

@Everest0516
Copy link
Author

请问是什么问题,kali虚拟机中运行的,谢谢

@happyfmy
Copy link

F:\honker\tools\CTF-RSA-tool-master>python2 solve.py -v -k pubkey.pem --decrypt flag.enc
Traceback (most recent call last):
File "solve.py", line 148, in
attackobj = lib.RSAutils.RSAAttack(args)
File "F:\honker\tools\CTF-RSA-tool-master\lib\RSAutils.py", line 34, in init
self.c = libnum.s2n(f.read().strip())
File "D:\Program Files\Python27\lib\site-packages\libnum\strings.py", line 10, in s2n
return int(s.encode().hex(), 16)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb7 in position 2: ordinal not in range(128)

@happyfmy
Copy link

和楼上一样的问题

@CLMonster
Copy link

Traceback (most recent call last):
File "solve.py", line 148, in
attackobj = lib.RSAutils.RSAAttack(args)
File "/Users/wang/hackingfiles/CTF-RSA-tool/lib/RSAutils.py", line 34, in init
self.c = libnum.s2n(f.read().strip())
File "/Library/Python/2.7/site-packages/libnum/strings.py", line 10, in s2n
return int(s.encode("utf-8").hex(), 16)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb7 in position 2: ordinal not in range(128)

同问,使用mac下的python2.7也遇到了同样的问题

@adfnekc
Copy link

adfnekc commented Sep 23, 2020

我也遇到了同样的问题。。

@Nixiabing
Copy link

mac和kali上遇到同样的问题

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

5 participants