docs: update CLAUDE.md and progress for trace/ package
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
12
CLAUDE.md
12
CLAUDE.md
@@ -27,12 +27,18 @@ pm3py/
|
|||||||
hw.py # hardware commands, LED API (platform-aware)
|
hw.py # hardware commands, LED API (platform-aware)
|
||||||
hf.py # HF core — tune, search, sniff, dropfield
|
hf.py # HF core — tune, search, sniff, dropfield
|
||||||
hf_iso14a.py # ISO 14443-A — scan, raw. Uses MIX frames
|
hf_iso14a.py # ISO 14443-A — scan, raw. Uses MIX frames
|
||||||
hf_iso15.py # ISO 15693 — scan, rdbl, wrbl, sniff + trace decoders
|
hf_iso15.py # ISO 15693 — scan, rdbl, wrbl, thin sniff cmd
|
||||||
hf_mfc.py # MIFARE Classic — rdbl, wrbl, rdsc, chk, nested, cident
|
hf_mfc.py # MIFARE Classic — rdbl, wrbl, rdsc, chk, nested, cident
|
||||||
lf.py # LF commands + T55xxCommands + LFSearchResult
|
lf.py # LF commands + T55xxCommands + LFSearchResult
|
||||||
sniff/ # sniff sessions, trace parsing, protocol decoders (scaffold)
|
trace/ # firmware trace infrastructure (shared by sniff, sim, reader)
|
||||||
|
trace.py # parse_tracelog, TRACELOG_HDR_SIZE
|
||||||
|
decode_iso15.py # ISO 15693 command/response decoders
|
||||||
|
ndef.py # NDEF TLV/record decode for trace annotation
|
||||||
|
format.py # ANSI color formatting, format_sniff_line
|
||||||
|
sniff/ # sniff orchestration — protocol detection, session lifecycle
|
||||||
|
session.py # SniffSession — start/download/decode per protocol
|
||||||
sim/ # card simulation sessions, table compiler, relay (scaffold)
|
sim/ # card simulation sessions, table compiler, relay (scaffold)
|
||||||
reader/ # higher-level reader modes (scaffold)
|
reader/ # higher-level reader modes by protocol/vendor (scaffold)
|
||||||
transponders/ # tag/transponder models independent of hardware (scaffold)
|
transponders/ # tag/transponder models independent of hardware (scaffold)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -35,17 +35,21 @@
|
|||||||
|
|
||||||
**Status: Complete**
|
**Status: Complete**
|
||||||
|
|
||||||
Extracted sniff infrastructure from `core/hf_iso15.py` (615→130 lines) into dedicated modules:
|
Extracted sniff infrastructure from `core/hf_iso15.py` (615→130 lines) into two packages:
|
||||||
- `sniff/trace.py` — `parse_tracelog()`, `TRACELOG_HDR_SIZE` (protocol-agnostic)
|
|
||||||
- `sniff/ndef.py` — NDEF TLV/record decode (`decode_ndef_annotation()`)
|
|
||||||
- `sniff/decode_iso15.py` — ISO 15693 command/response decoders, command tables
|
|
||||||
- `sniff/format.py` — ANSI color formatting, `format_sniff_line()`
|
|
||||||
- `sniff/session.py` — `SniffSession` with `iso15()` method (replaces `sniff_decoded()`)
|
|
||||||
- `sniff/__init__.py` — re-exports all public symbols
|
|
||||||
|
|
||||||
`core/hf_iso15.py` retains `HF15Commands` (scan/rdbl/wrbl/sniff) and re-exports sniff symbols for backward compat. `download_trace()` and `sniff_decoded()` delegate to `SniffSession`.
|
**`pm3py/trace/`** — shared trace infrastructure (used by sniff, sim, reader):
|
||||||
|
- `trace.py` — `parse_tracelog()`, `TRACELOG_HDR_SIZE` (protocol-agnostic)
|
||||||
|
- `ndef.py` — NDEF TLV/record decode (`decode_ndef_annotation()`)
|
||||||
|
- `decode_iso15.py` — ISO 15693 command/response decoders, command tables
|
||||||
|
- `format.py` — ANSI color formatting, `format_sniff_line()`
|
||||||
|
|
||||||
**65/65 tests passing** (35 sniff tests work through re-exports, no test changes needed).
|
**`pm3py/sniff/`** — sniff orchestration (consumes trace/):
|
||||||
|
- `session.py` — `SniffSession` with `iso15()` method (replaces `sniff_decoded()`)
|
||||||
|
- `__init__.py` — re-exports trace symbols for convenience
|
||||||
|
|
||||||
|
`core/hf_iso15.py` retains `HF15Commands` (scan/rdbl/wrbl/sniff) and re-exports trace symbols for backward compat. `download_trace()` and `sniff_decoded()` delegate to `SniffSession`.
|
||||||
|
|
||||||
|
**65/65 tests passing** (35 sniff/trace tests work through re-exports, no test changes needed).
|
||||||
|
|
||||||
## Phase 3 — Scaffold `transponders/`
|
## Phase 3 — Scaffold `transponders/`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user