diff --git a/software/script/chameleon_cli_unit.py b/software/script/chameleon_cli_unit.py index 82f546e4..89b5daaa 100644 --- a/software/script/chameleon_cli_unit.py +++ b/software/script/chameleon_cli_unit.py @@ -1335,6 +1335,10 @@ def decrypt_by_list(self, rs: list): print() return gen.keys + @staticmethod + def disp_key(key: str): + return f"{key} [{''.join(chr(c) if 31 < c < 127 else '.' for c in bytes.fromhex(key))}]" + def on_exec(self, args: argparse.Namespace): if not args.decrypt: count = self.cmd.mf1_get_detection_count() @@ -1378,7 +1382,9 @@ def on_exec(self, args: argparse.Namespace): print(" > Result ---------------------------") for block, result_for_block in result_maps_for_uid.items(): for type_, results in result_for_block.items(): - print(f" > Block {block}, {type_} key result: {results}") + print(f" > Block {block}, {type_} key result:") + for key in sorted(results): + print(f" - {self.disp_key(key)}") @hf_mf.command('eload')