Better hash print

master
Riccardo 2019-09-25 17:06:25 -07:00
parent 0de9ef73cc
commit ee1ae4f861
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ with open(sys.argv[2], "wb") as f:
x = dat
dd = hashlib.sha1(dat).digest()
print("hash:", binascii.hexlify(dd))
print("hash:", str(binascii.hexlify(dd), "utf-8"))
dd = b"\x00\x01" + b"\xff"*0x69 + b"\x00" + dd
rsa_out = pow(int.from_bytes(dd, byteorder='big', signed=False), rsa.d, rsa.n)
sig = (hex(rsa_out)[2:].rjust(0x100, '0'))