Commit Graph
30 Commits
Author SHA1 Message Date
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
CinderSocket 08cd96c5a9 Improve Wiegand PACS encode/decode and verbose output 2026-03-10 15:32:25 -07:00
iceman1001 9a0e6fbfac style 2025-10-12 11:34:20 +02:00
Jakub Kramarz 75ba4e97b1 cmdwiegand: add option to brute-force hex input length 2025-09-23 01:01:50 +02:00
iceman1001 4268fe3ce1 text 2025-06-30 14:29:49 +02:00
iceman1001 ad292e8810 unify test - step 2 2025-03-25 10:17:42 +01:00
iceman1001 af3a16b25c text and style 2025-03-02 16:45:01 +01:00
Donny d2e8066cbf Revise decode_wiegand function 2025-02-27 11:29:57 -08: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
Donny 3f794818f0 fix incorrect HID bitlen calculations and wiegand format display 2025-02-15 21:56:19 -08:00
iceman1001 a79b2bb725 fix the too long filename bug when using a smaller width param. also added some extra text for output length of binary strings in decode. One tend to not see if its 25 or 26 bits sometimes :) 2024-01-15 12:58:23 +01:00
iceman1001 3bbcefacf9 fix hf iclass decrypt wiegand 2022-07-09 18:20:23 +02:00
Philippe Teuwen 30aa7aa7d1 Adapting license headers, WIP 2022-01-08 00:40:52 +01:00
Philippe Teuwen 7a5786b9e4 fix a number of strx usages 2022-01-01 02:39:10 +01:00
iceman1001 10c9ea5f84 more wiegand formats, and if binary is user supplied use that length, and ignore parity faults is removed since we wanna see all decodings anyway 2021-04-27 15:19:34 +02:00
iceman1001 d2646122e7 style 2021-04-16 17:10:08 +02:00
iceman1001 8278c733fe wiegand decode - added binary param to decode 2021-03-29 17:38:20 +02:00
iceman1001 45fea41084 text 2021-02-17 07:32:38 +01:00
iceman1001 92b1ccc935 wiegand encode - now has option to add hid preamble or not 2021-02-03 00:14:40 +01:00
iceman1001 e29bbcf6c3 text 2021-01-29 20:35:36 +01:00
iceman1001 b3c0e00174 wiegand encode - now "-w" format param is optional, if excluded it tries to convert to all known formats and output 2021-01-29 11:56:31 +01:00
iceman1001 01b2c14616 adapt and fix memoryleaks in Em4x50 2020-12-09 12:18:01 +01:00
iceman1001 b115c82156 text 2020-12-04 22:25:04 +01:00
iceman1001 c55b4d5aac style 2020-10-06 17:50:20 +02:00
iceman1001 30cc0b4b48 fix lf wiegand - only take one format 2020-10-06 12:22:23 +02:00
iceman1001 c528eacf24 wiegand cmds now use cliparse 2020-10-04 17:41:27 +02:00
iceman1001 55bbbaf049 text 2020-10-04 11:09:54 +02:00
iceman1001 1267584e3f wiegand - now uses cli parse 2020-10-04 11:07:26 +02:00
Philippe Teuwen 3529aea157 stricter warnings, wip 2020-05-03 01:13:28 +02:00
Bjoern Kerler 81bc0bc2b9 Reorder client src directories 2020-04-16 10:53:24 +02:00