mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
color and text, which introduced a new dependency..
This commit is contained in:
parent
954ad74bc0
commit
226b82536a
1 changed files with 9 additions and 4 deletions
|
@ -5,6 +5,9 @@
|
||||||
import binascii
|
import binascii
|
||||||
import sys
|
import sys
|
||||||
import hashlib
|
import hashlib
|
||||||
|
from colors import *
|
||||||
|
|
||||||
|
# pip3 install ansicolors
|
||||||
|
|
||||||
debug = False
|
debug = False
|
||||||
|
|
||||||
|
@ -460,7 +463,6 @@ def recover_multiple(uids, sigs, curvename, alghash=None):
|
||||||
recovered &= recovered_tmp
|
recovered &= recovered_tmp
|
||||||
return recovered
|
return recovered
|
||||||
|
|
||||||
|
|
||||||
def selftests():
|
def selftests():
|
||||||
tests = [
|
tests = [
|
||||||
{'name': "Mifare Ultralight EV1",
|
{'name': "Mifare Ultralight EV1",
|
||||||
|
@ -556,14 +558,17 @@ if __name__ == "__main__":
|
||||||
print("Example: \n%s 04ee45daa34084 ebb6102bff74b087d18a57a54bc375159a04ea9bc61080b7f4a85afe1587d73b" % sys.argv[0])
|
print("Example: \n%s 04ee45daa34084 ebb6102bff74b087d18a57a54bc375159a04ea9bc61080b7f4a85afe1587d73b" % sys.argv[0])
|
||||||
exit(1)
|
exit(1)
|
||||||
uids, sigs = sys.argv[1:][::2], sys.argv[1:][1::2]
|
uids, sigs = sys.argv[1:][::2], sys.argv[1:][1::2]
|
||||||
|
once = True
|
||||||
curvenames = guess_curvename(sigs[0])
|
curvenames = guess_curvename(sigs[0])
|
||||||
for c in curvenames:
|
for c in curvenames:
|
||||||
print("\nAssuming curve=%s" % c)
|
|
||||||
print("========================")
|
|
||||||
for h in [None, "md5", "sha1", "sha256", "sha512"]:
|
for h in [None, "md5", "sha1", "sha256", "sha512"]:
|
||||||
print("Assuming hash=%s" % h)
|
|
||||||
recovered = recover_multiple(uids, sigs, c, alghash=h)
|
recovered = recover_multiple(uids, sigs, c, alghash=h)
|
||||||
if recovered:
|
if recovered:
|
||||||
|
if once:
|
||||||
|
print(color('curve=%s', fg='yellow') % c)
|
||||||
|
once = False
|
||||||
|
print(color('hash=%s', fg='yellow') % h)
|
||||||
print("Possible uncompressed Pk(s):")
|
print("Possible uncompressed Pk(s):")
|
||||||
for pk in list(recovered):
|
for pk in list(recovered):
|
||||||
print(binascii.hexlify(pk).decode('utf8'))
|
print(binascii.hexlify(pk).decode('utf8'))
|
||||||
|
once = True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue