transit parsers: shared helpers and per technology dispatch

Adds parsers/parsetransit.{c,h}: MSB/LSB bit readers and writers, date,
datetime and money formatting, one print style for every card system,
and a dispatcher per technology that runs each registered parser whose
detection matches. The tables start empty, card systems follow.

Hook points, each run on data the command already has:
  hf mf view / hf mf dump / hf mf autopwn   -> transit_mfc_parse
  hf mfdes view / hf mfdes dump             -> transit_mfdes_parse
  hf mfu view / hf mfu dump                 -> transit_mfu_parse
  hf 14b view / dump (SRx)                  -> transit_st25tb_parse
  hf felica dump                            -> transit_felica_parse
  hf calypso info                           -> transit_calypso_parse

hf calypso info now also reads the contract list, counters, contracts
and events by SFI for the Calypso parsers. Self tests hang off the same
commands via --selftest; hf mfu view gains that flag, hf felica dump and
hf calypso info gain it and become always available so it runs offline,
with an explicit device check for the real path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
iceman1001andClaude Opus 5.5 committed 2026-11-10 10:05:13 +07:00
1 parent a9a5b1ac51
commit ea599c4a71
11 files changed
+804 -9

No files matched your search

+1
View File
@@ -444,6 +444,7 @@ set (TARGET_SOURCES
${PM3_ROOT}/client/src/parsers/parseproac.c
${PM3_ROOT}/client/src/parsers/parserkf.c
${PM3_ROOT}/client/src/parsers/parsenortic.c
${PM3_ROOT}/client/src/parsers/parsetransit.c
${PM3_ROOT}/client/src/parsers/hrtparser/hrtparser.c
${PM3_ROOT}/client/src/pla.c
${PM3_ROOT}/client/src/preferences.c