mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-10-23 19:33:09 +00:00
Merge branch 'RfidResearchGroup:master' into BWM-work
This commit is contained in:
7 files changed
+26
-6
No files matched your search
Regular → Executable
+12
-6
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
pm3trace_edit.py — Proxmark3 binary trace file editor
|
||||
pm3_edit_trace.py — Proxmark3 binary trace file editor
|
||||
|
||||
Binary record format (tracelog_hdr_t, include/pm3_cmd.h):
|
||||
[4] timestamp uint32 LE — carrier periods (14a/thinfilm), ETU (hitag), etc.
|
||||
@@ -10,8 +10,8 @@ Binary record format (tracelog_hdr_t, include/pm3_cmd.h):
|
||||
[P] parity ceil(data_len/8) bytes, bit j of byte i = odd-parity of data[i*8+j]
|
||||
|
||||
Usage:
|
||||
python3 pm3trace_edit.py <file.trace> # interactive editor
|
||||
python3 pm3trace_edit.py <file.trace> --dump # dump to stdout and exit
|
||||
python3 pm3_edit_trace.py <file.trace> # interactive editor
|
||||
python3 pm3_edit_trace.py <file.trace> --dump # dump to stdout and exit
|
||||
|
||||
Interactive commands:
|
||||
l / list [N] list all frames, or frame N only
|
||||
@@ -150,14 +150,20 @@ def serialise_trace(frames: list[Frame]) -> bytes:
|
||||
|
||||
HEADER = (
|
||||
f"{'#':>5} {'Timestamp':>10} {'Dur':>6} {'Src':>3} "
|
||||
f"{'Data (hex)':<50} {'Par':>3}"
|
||||
f"{'Data (hex)':<50}"
|
||||
)
|
||||
SEP = '-' * len(HEADER)
|
||||
|
||||
# reader lines in yellow, when stdout is a terminal
|
||||
YELLOW = '\033[33m' if sys.stdout.isatty() else ''
|
||||
RESET = '\033[0m' if sys.stdout.isatty() else ''
|
||||
|
||||
|
||||
def print_frame(idx: int, f: Frame) -> None:
|
||||
print(f'{idx:>5} {f.timestamp:>10} {f.duration:>6} {f.src:>3} '
|
||||
f'{f.data_hex():<50} {f.parity_status:>3}')
|
||||
colour = '' if f.is_response else YELLOW
|
||||
reset = '' if f.is_response else RESET
|
||||
print(f'{colour}{idx:>5} {f.timestamp:>10} {f.duration:>6} {f.src:>3} '
|
||||
f'{f.data_hex():<50}{reset}')
|
||||
|
||||
|
||||
def cmd_list(frames: list[Frame], args: list[str]) -> None:
|
||||
@@ -113,3 +113,17 @@
|
||||
|--------|-----------|
|
||||
|lf_hitag_crypto_dump.trace |Execution of `lf hitag dump --crypto` against Hitag2 card in crypto mode|
|
||||
|
||||
|
||||
## LF emulator dumps
|
||||
|
||||
Tag images for `lf hitag eload`, used to simulate a Hitag 2 in each of its
|
||||
operating modes. Byte 0 of page 3 is the configuration byte that selects the
|
||||
mode, so the files differ mainly in that one byte.
|
||||
|
||||
|filename|description|
|
||||
|--------|-----------|
|
||||
|lf-hitag-CE129911-dump.bin |Hitag2 in password mode (config `0x06`), password `BDF5E846`|
|
||||
|lf_ht2_crypto.bin |Hitag2 in crypto mode (config `0x0E`), key `4F4EBDF5E846`|
|
||||
|lf_ht2_publicA.bin |Hitag2 in Public Mode A (config `0x02`), Manchester, pages 4-5, carries an EM4102 payload|
|
||||
|lf_ht2_publicB.bin |Hitag2 in Public Mode B (config `0x00`), biphase 32 T0, pages 4-7|
|
||||
|lf_ht2_publicC.bin |Hitag2 in Public Mode C (config `0x04`), biphase 64 T0, pages 4-7|
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user