mirror of
https://github.com/RfidResearchGroup/ChameleonUltra.git
synced 2026-09-11 18:30:14 -07:00
chore: lets not break niels code
This commit is contained in:
@@ -954,16 +954,8 @@ class HFMFFCHK(ReaderRequiredUnit):
|
||||
return
|
||||
|
||||
if args.import_dic is not None:
|
||||
for key in args.import_dic.readlines():
|
||||
if key.startswith("#"): # ignore comments
|
||||
pass
|
||||
elif key.isspace(): # ignore empty lines
|
||||
pass
|
||||
elif re.match(r'^[a-fA-F0-9]{12}$', key): # take only this key format
|
||||
keys.add(bytes.fromhex(key))
|
||||
else: # in case of another format, a conversion is needed
|
||||
print(f' - {CR}Key should in hex[12] format, invalid key is ignored{C0}, key = "{key}"')
|
||||
continue
|
||||
if not load_dic_file(args.import_dic, keys):
|
||||
return
|
||||
|
||||
if len(keys) == 0:
|
||||
print(f' - {CR}No keys{C0}')
|
||||
@@ -2503,7 +2495,7 @@ class HWSlotList(DeviceRequiredUnit):
|
||||
print(f"{CY if enabled[fwslot]['hf'] else C0}{hf_tag_type}{C0}")
|
||||
else:
|
||||
print("undef")
|
||||
if (not args.short) and enabled[fwslot]['hf'] and hf_tag_type != TagSpecificType.UNDEFINED:
|
||||
if (not args.short) and enabled[fwslot]['hf']:
|
||||
if current != slot:
|
||||
self.cmd.set_active_slot(slot)
|
||||
current = slot
|
||||
@@ -2554,7 +2546,7 @@ class HWSlotList(DeviceRequiredUnit):
|
||||
print(f"{CY if enabled[fwslot]['lf'] else C0}{lf_tag_type}{C0}")
|
||||
else:
|
||||
print("undef")
|
||||
if (not args.short) and enabled[fwslot]['lf'] and lf_tag_type != TagSpecificType.UNDEFINED:
|
||||
if (not args.short) and enabled[fwslot]['lf']:
|
||||
if current != slot:
|
||||
self.cmd.set_active_slot(slot)
|
||||
current = slot
|
||||
|
||||
Reference in New Issue
Block a user