mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
fm11rf08s_recovery.py: test other keys as well
This commit is contained in:
parent
080ddc1595
commit
92e46a1b8a
1 changed files with 17 additions and 10 deletions
|
@ -35,7 +35,11 @@ if sys.version_info < required_version:
|
||||||
print(f"The script needs at least Python v{required_version[0]}.{required_version[1]}. Abort.")
|
print(f"The script needs at least Python v{required_version[0]}.{required_version[1]}. Abort.")
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
BACKDOOR_RF08S = "A396EFA4E24F"
|
# First try FM11RF08S key
|
||||||
|
# Then FM11RF08 key as some rare *98 cards are using it too
|
||||||
|
# Then FM11RF32N key, just in case...
|
||||||
|
BACKDOOR_KEYS = ["A396EFA4E24F", "A31667A8CEC1", "518B3354E760"]
|
||||||
|
|
||||||
NUM_SECTORS = 16
|
NUM_SECTORS = 16
|
||||||
NUM_EXTRA_SECTORS = 1
|
NUM_EXTRA_SECTORS = 1
|
||||||
DICT_DEF = "mfc_default_keys.dic"
|
DICT_DEF = "mfc_default_keys.dic"
|
||||||
|
@ -110,15 +114,18 @@ if args.init_check:
|
||||||
print_key(sec, 1, found_keys[sec][1])
|
print_key(sec, 1, found_keys[sec][1])
|
||||||
|
|
||||||
print("Getting nonces...")
|
print("Getting nonces...")
|
||||||
cmd = f"hf mf isen --collect_fm11rf08s_with_data --key {BACKDOOR_RF08S}"
|
|
||||||
p.console(cmd)
|
|
||||||
nonces_with_data = ""
|
nonces_with_data = ""
|
||||||
for line in p.grabbed_output.split('\n'):
|
for key in BACKDOOR_KEYS:
|
||||||
|
cmd = f"hf mf isen --collect_fm11rf08s_with_data --key {key}"
|
||||||
|
p.console(cmd)
|
||||||
|
for line in p.grabbed_output.split('\n'):
|
||||||
if "Wrong" in line or "error" in line:
|
if "Wrong" in line or "error" in line:
|
||||||
print("Error getting nonces, abort.")
|
break
|
||||||
exit()
|
|
||||||
if "Saved" in line:
|
if "Saved" in line:
|
||||||
nonces_with_data = line[line.index("`"):].strip("`")
|
nonces_with_data = line[line.index("`"):].strip("`")
|
||||||
|
if nonces_with_data != "":
|
||||||
|
break
|
||||||
|
|
||||||
if (nonces_with_data == ""):
|
if (nonces_with_data == ""):
|
||||||
print("Error getting nonces, abort.")
|
print("Error getting nonces, abort.")
|
||||||
exit()
|
exit()
|
||||||
|
@ -482,7 +489,7 @@ if args.final_check:
|
||||||
cmd = f"hf mf fchk -f keys_{uid:08x}.dic --no-default --dump"
|
cmd = f"hf mf fchk -f keys_{uid:08x}.dic --no-default --dump"
|
||||||
if args.debug:
|
if args.debug:
|
||||||
print(cmd)
|
print(cmd)
|
||||||
p.console(cmd, passthru = True)
|
p.console(cmd, passthru=True)
|
||||||
else:
|
else:
|
||||||
plus = "[" + color("+", fg="green") + "] "
|
plus = "[" + color("+", fg="green") + "] "
|
||||||
print()
|
print()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue