Better hash print
parent
0de9ef73cc
commit
ee1ae4f861
|
@ -22,7 +22,7 @@ with open(sys.argv[2], "wb") as f:
|
||||||
x = dat
|
x = dat
|
||||||
dd = hashlib.sha1(dat).digest()
|
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
|
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)
|
rsa_out = pow(int.from_bytes(dd, byteorder='big', signed=False), rsa.d, rsa.n)
|
||||||
sig = (hex(rsa_out)[2:].rjust(0x100, '0'))
|
sig = (hex(rsa_out)[2:].rjust(0x100, '0'))
|
||||||
|
|
Loading…
Reference in New Issue