Commit Graph
137 Commits
Author SHA1 Message Date
iceman1001 7142ddc9bd added hexact parser 2026-09-13 12:55:43 +02:00
Matthew CarrollandClaude Opus 5 36f689beaa lf idteck demod: report only what the tag actually holds
Three ways this command reported a credential that was not on the tag.

CmdIdteckDemod always passed its local raw[8] to demodIdteck, never NULL, so
without --raw the command decoded a zeroed stack array rather than the
graphbuffer and reported card id 0 every time. The help's own first example,
plain `lf idteck demod`, has been doing that since --raw was added. It now
passes NULL when no --raw is given, which is the signal path demodIdteck
already has and lf idteck reader already uses.

A raw frame whose first word is not 4944544B printed "No genuine IDTECK found"
and then fell through and announced a tag anyway, with a card id read out of
whatever was passed in. It now stops there. The signal path cannot reach this:
detectIdteck matches the full 32 bit preamble, so lf search and lf idteck
reader are unaffected.

Finally the Idteck card id was packed into a 26 bit wiegand_message_t and run
through HIDUnpack, which prints an HID H10301 line with a facility code and
card number. That is not a decode of anything - the id is 24 bits, byte
reversed off the wire, and Unpack_H10301 returns true for any 26 bit message,
so the parity flag is the only hint and it reads ok for 25% of card ids by
chance. Both committed Idteck traces show it: 4944544B351FBE4B prints
FC: 37 CN: 57103 parity ( ok ), AC40E069 prints FC: 52 CN: 61472 parity
( fail ). Dropped, with the wiegand_formats.h include that came in with it.

Added five offline regression tests. Three fail without this change, one per
defect; lf search over every committed lf trace is byte identical before and
after apart from the two removed H10301 lines.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-12 12:52:48 -07:00
Matthew CarrollandClaude Opus 5 782d28932c lf: restore the graph buffer length along with its contents
restore_bufferS32() returns the length it put back and every graph-buffer
caller dropped it, so g_GraphTraceLen kept whatever value the code between
save and restore had left.

In try_detect_modulation() that is the 160 sample psk antenna-settle trim:
`data modulation` gave the buffer's samples back but left it 160 short, and
a following demod lost round(160 / clk) bits off the end. check_chiptype()
loses the same way through the acquisitions its detections make, on the
`lf search` path, and for g_DemodBuffer too. demodTI() loses convLen + 16
on its error path.

save_graphbuffer() / restore_graphbuffer() pair the length and grid offset
with the contents so no call site has to remember them. The visa2000 and
zx8211 sites do not change the length, so converting them is a no-op today
and keeps the next one from being a bug.

Regression test in tools/pm3_tests.sh: `data modulation` on a saved psk1
trace must leave all 20000 samples.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 10:33:17 -07:00
Jason Yuan 25401b6dd5 feat: improve ndef wsc parsing
Adds support for more attribute types and safe
error handling for unknown types. Fixes a bug
where the version attribute didn't increment the
cursor correctly causing an infinite loop.
2026-09-03 02:08:30 -04:00
Msprg 2d898d31e7 fix make install after sim014 firmware removal
e2cf7dee5 removed sim014.bin but the top-level Makefile still lists it
in INSTALLSIMFW, so 'make install' fails on cp. Install sim020 instead,
and point the pm3_tests.sh existence check at the same file.
2026-08-27 23:55:50 +02:00
iceman1001 98c5897bbe a slow test should only be run during --long2 2026-08-27 15:34:06 +02:00
iceman1001 6b7678edeb added some tests of etc annotations 2026-08-26 20:47:55 +02:00
Philippe Teuwen caa76f57b3 Fix pm5 recovery image 2026-08-19 19:28:17 +02:00
iceman1001 92969c5173 fix test 2026-07-30 17:06:19 +02:00
munzzyy d18d1c6713 Fix IR56 wiegand decode leaking header sentinel bit into facility code 2026-07-10 14:16:54 -05:00
iceman1001 7af8674b22 fix saflok test output and add it to test script 2026-06-30 02:22:56 +02:00
towelbyte 85c029b8fd pm3_tests.sh: Adapt COTAG tests for the new implementation
"lf cotag demod" now works directly on g_GraphBuffer:
Thus, adapt the existing test. Additionally, add 3 more cotag tests.
2026-06-12 22:49:07 +02:00
achazal d6ed3c18c2 mad: Add unified MAD read/write/verify with ops struct abstraction 2026-06-09 18:48:25 +02:00
CinderSocket b05a4f9bcf Support non-06 iCLASS SE AIA SIO blocks 2026-06-08 04:37:26 -07:00
CinderSocket d02c42eb10 Add DES and plain iCLASS transport 2026-06-07 11:15:17 -07:00
iceman1001 72ca3bd37b text style 2026-06-02 20:25:40 +02:00
Philippe Teuwen 148871b3b5 few docker tests adjustments 2026-04-14 10:15:46 +02:00
iceman1001 92426a26a4 update test to match new param name 2026-04-09 12:36:55 +07:00
Iceman a054177949 Merge pull request #3156 from cindersocket/fix-3041
Fixes RfidResearchGroup/proxmark3#3041
2026-03-25 07:40:53 +07:00
kormax e44e1f1cbb Introduce simple regex utils 2026-03-24 20:21:51 +02:00
CinderSocket 19b6534436 Fixes RfidResearchGroup/proxmark3#3041
Adds --ascii option
2026-03-19 22:27:33 -07:00
CinderSocket 2c403e157d client: unify wiegand input handling
Extract the reusable Wiegand normalization and packing flow into
wiegand_formatutils and move existing callers onto that shared path.
This rebuilds the feat-wiegand branch as one focused commit against
upstream/master instead of trying to preserve the original commit chain.

Key changes:
- add shared helpers for plain binary, raw HID, new PACS, and formatted
  Wiegand input
- centralize binary rendering used by cmdwiegand and PACS decode output
- update lf hid sim/clone to resolve one input mode through the shared
  Wiegand layer and enforce the LF packed transport limit explicitly
- update hf mf encodehid to accept bin/raw/new/formatted Wiegand input
  through the same normalization path
- preserve legacy raw HID transport behavior while clarifying the
  packed-HID vs LF transport limits in error reporting
- add offline regression coverage for the new PACS decode output and add
  interactive online targets for LF HID Wiegand and MIFARE encodehid

Validation performed:
- make client
- bash -n tools/pm3_tests.sh
- bash -n tools/pm3_online_tests.sh
- ./tools/pm3_online_tests.sh -h
- ./client/proxmark3 -c 'wiegand encode -w H10301 --fc 31 --cn 337'
- ./client/proxmark3 -c 'wiegand encode -w H10301 --fc 31 --cn 337 --new'
- ./client/proxmark3 -c 'wiegand decode --new 068F80A8C0'
2026-03-17 16:45:14 -07:00
kormax 892559ac05 Add tests for zlib support 2026-03-14 22:16:59 +02:00
CinderSocket 08cd96c5a9 Improve Wiegand PACS encode/decode and verbose output 2026-03-10 15:32:25 -07:00
Philippe Teuwen 601bdc371a more CI & docker tuning 2026-02-26 20:37:45 +01:00
Philippe Teuwen acb2dc0e10 Add SKIPUV for package maintainers 2026-02-25 17:55:47 +01:00
Philippe Teuwen b4ab732260 mfulc_des_brute: add unit tests and make check 2026-01-19 21:47:49 +01:00
iceman1001 e39a7cdb57 added test for open printer tag 2025-11-10 14:09:03 +01:00
Philippe Teuwen d1a093ec94 Add support for uv and simplify docker tests 2025-11-04 01:01:02 +01:00
Aaron Levy 8c2dd4dded Adding test cases 2025-10-09 10:55:31 -07:00
iceman1001 65607fc727 added Ultralight-C simulation. hf mfu sim -t 13. Use eload first. Also added support to upload UL-C dictionaries and UL-AES to spiffs memory. A lot of textual reworked across client. Unifiy texts and a bit more color ;) 2025-06-19 17:26:20 +02:00
Hanra d143d9a65c Update pm3_tests.sh
Added LANG=C to the script to enforce the English language so that it does not break when the system language is not English.

Signed-off-by: Hanra <37299738+HenraL@users.noreply.github.com>
2025-06-11 10:55:35 +02:00
Philippe Teuwen f1b7454fcd Fix pm3_tests for OSX 2025-03-24 09:53:44 +01:00
iceman1001 98f6b263ff wiegand decode now accepts --new parameter to decode new padding format <len 1byte><pacs bytes> where len denotes number of zeros bits added in the end of the pacs bytes. You will need to shift accordingly. 2025-02-23 23:10:13 +01:00
Rick Farina (Zero_Chaos) cd90af34a0 add opencl support to CheckFileExist()
CheckExecute() has a flag to tell it if a check needs opencl support or
not and can automatically disable the check if opencl checks are not
requested.  Mostly copy and paste the same feature into CheckFileExist
and add it where needed.
2024-09-11 16:21:29 -04:00
iceman1001 68693ae187 adapt test 2024-09-05 22:41:32 +02:00
Philippe Teuwen 28076af96d Add : recovering partial nested authentication with known nT 2024-09-03 23:43:28 +02:00
iceman1001 6a95f16102 style and text 2024-08-25 15:17:02 +02:00
Philippe Teuwen 9057371b2c pm3_tests: more staticnested* tests 2024-08-02 00:12:07 +02:00
Philippe Teuwen c47578c048 sort mfc tools 2024-08-02 00:10:23 +02:00
iceman1001 d3d701f538 the generation of NrAr is used in the regression tests. I readded the old way and if you call the hitag2_gen_nRaR.py with five params, you get the nice commands instead 2024-05-27 15:08:49 +02:00
Henry Gabryjelski 20711e7037 Add em4x70 tests 2024-05-14 21:06:35 -07:00
Henry Gabryjelski c40f4be3e6 re-enable broken hitag2 test 2024-05-06 07:59:41 -07:00
Henry Gabryjelski 9d33646b80 Disable broken hitag2 test so github actions work 2024-05-05 18:27:35 -07:00
iceman1001 3ef3e3a63d update signature data 2024-04-23 02:16:01 +02:00
iceman1001 c8849af5e0 This is the major changes made to the HITAG2 commands. Its heavly based on RFIDLers implementation and its been converted to work with Proxmark3. Special thanks to @kevsecurity for his amazing implementations of the Gone in 360 Seconds paper by Roel, Flavio & Balasch. Thanks to @adamlaurie for his RFIDler project. It wouldnt been doable without it. 2024-04-22 16:20:24 +02:00
iceman1001 67c14c5314 adapt regression tests 2024-04-22 09:21:55 +02:00
Marcos Del Sol Vives 760e4ebc9d Increase precision in color matching 2024-01-07 20:32:31 +01:00
Marcos Del Sol Vives d27669f22c Allow image conversion when offline 2024-01-07 18:05:48 +01:00
iceman1001 9d55455d66 fix test for the change of text 2023-12-11 00:10:53 +01:00