6u661e / CTF-RSA-tool

a little tool help CTFer solve RSA problem
496 stars 104 forks source link

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

Open Everest0516 opened 4 years ago

Everest0516 commented 4 years ago

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 commented 4 years ago

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

happyfmy commented 4 years ago

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 commented 4 years ago

和楼上一样的问题

CLMonster commented 3 years ago

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 commented 3 years ago

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

Nixiabing commented 3 years ago

mac和kali上遇到同样的问题