Commit Graph
96 Commits
Author SHA1 Message Date
iceman1001 25b3c88acf fix #3487 2026-09-12 20:56:08 +02:00
iceman1001 6b0e62b8ea txt 2026-06-29 02:06:38 +02:00
Dima Zakharov cb0d013213 works for my fob 2026-04-25 16:19:37 +01:00
CinderSocket 6639009681 client: document wiegand layer and improve online tests
Add inline comments throughout wiegand_formatutils and callers to explain
sentinel-bit stripping, HID transport framing, and the normalization contract
between input modes and downstream consumers.

Replace sim-only LF HID online tests with T55xx clone+readback flows and add
a full encode/decode roundtrip harness for hf mf encodehid, including sector
restore/cleanup and an optional --manual flag for external reader verification.
2026-03-17 16:45:14 -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
iceman1001 a3c2d2b815 style 2025-07-08 21:15:09 +02:00
iceman1001 ad292e8810 unify test - step 2 2025-03-25 10:17:42 +01:00
iceman1001 4d603a4530 unify hint text 2025-03-20 22:55:26 +01:00
iceman1001 17a8f0f9c2 text 2025-03-20 12:17:37 +01:00
iceman1001 2137284a93 style\n Some improvements to trace list -t seos annotations. 2025-03-12 16:41:06 +01:00
iceman1001 2f56bdcf10 text and style 2025-02-18 18:44:24 +01:00
Donny 3f794818f0 fix incorrect HID bitlen calculations and wiegand format display 2025-02-15 21:56:19 -08:00
Donny f0830ce6b0 Remove new struct and recover missing code section 2025-02-03 01:58:08 -08:00
Donny 1ae4cf37d8 Fix facility code and card number checking in LF HID Brute 2025-02-02 23:42:19 -08:00
iceman1001 b3285cce8a style 2024-11-02 15:13:40 +01:00
iceman1001 81d795e56f fix styles 2024-11-02 14:52:59 +01:00
iceman1001 ff765f569f change out some non-breaking wait for response from some command which shouldnt have it. Sniff / simulate / bruteforce should have it. and some minor text / style 2024-10-04 10:01:50 +02:00
Philippe Teuwen 153064ddfa Fix a bunch of potential buffer overruns with CLIGetStrWithReturn :
Most prominent one was "lf pac clone --cn 123456789" causing garbage on the terminal
Some changed code was valid before but as ppl tend to copy-paste to new code,
better to uniformize and document usages of CLIGetStrWithReturn.

Exceptions left are when filling real buffers (bin, raw,...), not strings.
2024-07-30 22:23:04 +02:00
Jacob Litewski f2afbca6ec Refactored Plot Annotations and some cleanup 2024-04-13 23:03:35 -04:00
Philippe Teuwen c183894cb4 fix doc and add similar to 2024-03-27 16:41:44 +01:00
iceman1001 c03e15b553 unify texts 2024-02-03 11:14:51 +01:00
iceman1001 efc8c0b8ab added a interactive flag for hf14asniff, and unified text across the project 2024-01-25 10:21:36 +01:00
iceman1001 fdc1c9d864 text 2023-12-06 22:16:53 +01:00
wh201906 e82fb8b67f Use calloc() instead of malloc()
Suggested by @iceman1001
Mainly for 8b6a274e28
Replaced the malloc() in getSamplesFromBufEx()
Added memory allocation result check for getSamplesFromBufEx(),
lf_read_internal(), and lf_sniff()
2023-11-17 12:38:20 +08:00
wh201906 3ee13c9ba6 Apply suggestions from @henrygab
Check if memory allocation fails
Fix memory leak
Initialize struct in declaration
Add/Fix some notes
Remove unlikely() in favor of readability
Remove a hard-coded magic number
2023-11-15 18:04:52 +08:00
wh201906 8b6a274e28 Bigger graph buffer
1280000 samples -> 10.24s for 125kHz 8bit sampling

Allocate graph related memory on heap
2023-11-14 10:05:13 +08:00
iceman1001 8a9c043aa6 fixing "lf hid clone --bin" param to correctly handle sentinel bit 2023-10-15 15:23:14 +02:00
Philippe Teuwen c5cfe593f5 fix exec mode on source file 2023-07-20 21:04:00 +02:00
iceman1001 8f20eed914 fix CID #405232 2023-03-04 20:10:46 +01:00
iceman1001 060f452530 fix text 2023-03-04 20:03:53 +01:00
Chris Smith f424667d0c Fix syntax 2023-03-04 10:40:19 -07:00
Chris Smith cd5fa61683 Update help text 2023-02-28 07:28:06 -07:00
Chris Smith 3bcac0cc64 Updated arguments and help text 2023-02-28 07:24:24 -07:00
Chris Smith 21a1defa88 Fix formatting 2023-02-27 13:06:38 -07:00
Chris Smith 702716b597 Fix formatting 2023-02-27 13:05:16 -07:00
Chris Smith 85ca342567 Add bruteforce functionality to HID facility code 2023-02-27 13:02:16 -07:00
iceman1001 b86e29fca1 init structure with zeros 2023-02-21 04:42:51 +01:00
iceman1001 a89983d1b3 text 2022-10-30 08:54:33 +01:00
iceman1001 7a831fc94e CID 398738, missing init 2022-09-03 11:23:44 +02:00
Philippe Teuwen c1c093af62 Fixed support to clone Pyramic, Paradox and Awid on EM4x05 2022-04-30 00:04:49 +02:00
Philippe Teuwen f25c7b1179 text 2022-04-29 15:45:45 +02:00
iceman1001 caf9f07c7a fix lf hid brute param for format 2022-01-10 22:41:02 +01:00
iceman1001 221a06321b cppcheck fix - array out of bounds. last item is null reduce 1 from arr len, zero based index reduce -1 to get index....\n also made the compare caseinsensitive 2022-01-10 22:29:57 +01: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
Philippe Teuwen dd3b63ae32 rename global session 2021-08-21 20:31:05 +02:00
Philippe Teuwen ce57637c80 rename globals GraphTraceLen OddByteParity pm3_capabilities 2021-08-21 17:53:54 +02:00
Philippe Teuwen e4fbfe0f40 rename globals DemodBuffer and DemodBufferLen 2021-08-21 17:12:50 +02:00
iceman1001 80817cea00 hf iclass chk - rework OLD -> NG. And textual 2021-05-03 09:31:51 +02:00
iceman1001 82e71d7815 lf hid clone - only print the selected format 2021-04-27 19:16:06 +02:00