Skip to content

Commit

Permalink
cli: atqa disambiguation
Browse files Browse the repository at this point in the history
  • Loading branch information
doegox committed Oct 12, 2023
1 parent 446b57e commit 15bcae7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions software/script/chameleon_cli_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,8 @@ def scan(self, deep=False):
if resp is not None:
for data_tag in resp:
print(f"- UID : {data_tag['uid'].hex().upper()}")
print(f"- ATQA : {data_tag['atqa'].hex().upper()}")
print(f"- ATQA : {data_tag['atqa'].hex().upper()} "
f"(0x{int.from_bytes(data_tag['atqa'], byteorder='little'):04x})")
print(f"- SAK : {data_tag['sak'].hex().upper()}")
if len(data_tag['ats']) > 0:
print(f"- ATS : {data_tag['ats'].hex().upper()}")
Expand Down Expand Up @@ -1213,7 +1214,8 @@ def on_exec(self, args: argparse.Namespace):
if not change_requested:
print(f'- {"Type:":40}{CY}{hf_tag_type}{C0}')
print(f'- {"UID:":40}{CY}{uid.hex().upper()}{C0}')
print(f'- {"ATQA:":40}{CY}{atqa.hex().upper()}{C0}')
print(f'- {"ATQA:":40}{CY}{atqa.hex().upper()} '
f'(0x{int.from_bytes(atqa, byteorder="little"):04x}){C0}')
print(f'- {"SAK:":40}{CY}{sak.hex().upper()}{C0}')
if len(ats) > 0:
print(f'- {"ATS:":40}{CY}{ats.hex().upper()}{C0}')
Expand Down Expand Up @@ -1354,7 +1356,8 @@ def on_exec(self, args: argparse.Namespace):
if not change_requested:
print(f'- {"Type:":40}{CY}{hf_tag_type}{C0}')
print(f'- {"UID:":40}{CY}{uid.hex().upper()}{C0}')
print(f'- {"ATQA:":40}{CY}{atqa.hex().upper()}{C0}')
print(f'- {"ATQA:":40}{CY}{atqa.hex().upper()} '
f'(0x{int.from_bytes(atqa, byteorder="little"):04x}){C0}')
print(f'- {"SAK:":40}{CY}{sak.hex().upper()}{C0}')
if len(ats) > 0:
print(f'- {"ATS:":40}{CY}{ats.hex().upper()}{C0}')
Expand Down Expand Up @@ -1447,7 +1450,8 @@ def on_exec(self, args: argparse.Namespace):
ats = anti_coll_data['ats']
# print(' - ISO14443A emulator settings:')
print(f' {"UID:":40}{CY}{uid.hex().upper()}{C0}')
print(f' {"ATQA:":40}{CY}{atqa.hex().upper()}{C0}')
print(f' {"ATQA:":40}{CY}{atqa.hex().upper()} '
f'(0x{int.from_bytes(atqa, byteorder="little"):04x}){C0}')
print(f' {"SAK:":40}{CY}{sak.hex().upper()}{C0}')
if len(ats) > 0:
print(f' {"ATS:":40}{CY}{ats.hex().upper()}{C0}')
Expand Down

0 comments on commit 15bcae7

Please sign in to comment.