Commit Graph
14103 Commits
Author SHA1 Message Date
Niel Nielsen bb42ca8ca7 Remove unused include for comms.h
Removed unused comms.h include from cmdhw.c

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-03 08:03:06 +02:00
Niel Nielsen b6a1e0caf8 Add function prototype for pm3_max_cmd_data_size
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-03 07:20:03 +02:00
Niel Nielsen ed8fa3bd04 Remove unused function declaration
Removed unused function declaration for pm3_max_cmd_data_size.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-03 07:19:02 +02:00
Niel Nielsen 9cf3960f47 Declare pm3_max_cmd_data_size function
Added a new function declaration for pm3_max_cmd_data_size.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-03 07:11:35 +02:00
Niel Nielsen 4860890b5e Add comms.h include to cmdhw.c
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-03 07:10:42 +02:00
Niel Nielsen e89c30eeba Update length check for command data size
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-03 07:06:38 +02:00
Niel Nielsen 36d6535d7a Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-03 06:40:39 +02:00
Niel Nielsen 50b0259978 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-03 06:36:07 +02:00
Niel Nielsen 8d8fa8733a Update length check for command data size
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-02 14:52:39 +02:00
Niel Nielsen eb9e6949ab Enhance BWM WiFi status reporting and logging
Refactor BWM WiFi status handling and improve logging messages.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-02 14:42:49 +02:00
Iceman d1e0476278 Merge pull request #3580 from nieldk/master
Update helptext in cmdhw.c
2026-09-02 14:51:45 +07:00
Matthew CarrollandClaude Opus 5 ff7766af77 lf t55xx: drop the psk3 candidates from detect because they can only misfire
Both psk3 entries run the same demodulation as the psk2 entry beside them and
differ only in the constant given to test(). test() accepts a word only when
that word's own modulation field matches the constant, so the psk3 entry needs
a recovered word whose field reads 3.

Field 3 is 00011, so it needs two adjacent 1's. What this demodulation recovers
is the data's rising edges, and a rising edge needs a 0 before the 1, so no two
of them are ever adjacent. The words it produces can never carry field 3, and so
the psk3 entries can never match the case they were written for.

What they can do, however, is match on a demodulation error, and then detect
names psk3 and a block 0 word the tag does not hold.

psk3 is still reached, by ruling psk2 out from the broadcast period rather
than by demodulating for it - see t55xx_psk3_resolve().

Tags that only these branches matched now read as psk2, or as undetected
where no offset yields a plausible psk2 word, on the basis that a wrong
answer is worse than none if nothing about it tells you it is wrong.

Edited by a human.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-01 23:54:34 -07:00
Matthew CarrollandClaude Opus 5 28a496d5bc lf t55xx: correctly report the psk2/psk3 ambiguity
The client demodulates psk2 and psk3 the same way, and against a psk3 tag
that demodulation keeps only the leading bit of every run of ones.  A psk3
config word therefore always reads back as its psk2 neighbour, one bit out,
and detect structurally cannot tell the two apart from the waveform alone.

It said psk2 anyway. Worse, the data-block probe meant to settle it
confidently answered psk3 even for a freshly wiped psk2 tag, where a page
of zeroes has no adjacent ones under either modulation.

Report what is actually known:

  - print "PSK2 or PSK3 ( ambiguous )" when the read fits both
  - list the words block 0 could be, rather than printing one and relegating
    the rest to a note
  - weight the probe's evidence, so empty blocks settle nothing
  - narrow that list with things the tag cannot hide - the subcarrier it
    transmits on, and how many blocks it broadcasts, which constrains MAXBLK and
    also rules out the sequence terminator

Where that leaves one word, block 0 reports it.  Where it does not, detect
says so rather than choosing.

Edited by a human.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-01 23:54:33 -07:00
Niel Nielsen aff38cc345 Update helptext in cmdhw.c
Removed instruction for full charge/discharge learning cycle.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-02 07:52:11 +02:00
Philippe Teuwen 38e0c068d9 A few less hardcoded 40000 samples 2026-09-01 19:54:05 +02:00
Iceman 0d8b99b2a1 Merge pull request #3571 from DidierA/aarch64
fixes compile fail on aarch64 (issue #3394)
2026-09-01 23:30:40 +07:00
Iceman 083cd7ac15 Merge pull request #3572 from xianglin1998/improve-sp-send-speed
Improve serialport send speed
2026-09-01 23:30:04 +07:00
dxl 02587820fb Optimize serial port transmission speed on Windows. 2026-09-02 00:04:12 +08:00
dxl 3ea93dfc85 Add the xyield macro function to yield the CPU. 2026-09-02 00:02:14 +08:00
Philippe Teuwen 0cde2124c8 Replace pm3_max_cmd_data_size() by g_conn.max_cmd_data_size 2026-09-01 17:58:14 +02:00
Philippe Teuwen b69fa20233 Precompute max_cmd_data_size in TestProxmark 2026-09-01 17:58:07 +02:00
Niel Nielsen ee22d0712e make style
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 9e1b63edce make style
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen ef0b357c7a Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen f8a0ed0096 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen db35ed4854 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 23175240e8 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 9df1c62ec5 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 3628681a50 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 8de138380b Delete client/src/mifarehost.c
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 6b2b6f2bb1 Fix remaining PM3_CMD_DATA_SIZE
100 array declarations uint8_t x[PM3_CMD_DATA_SIZE]
21 receive sites — GetFromDevice, APDU/smartcard response buffers

All in a days work

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen fa8a7da45d Fixed missing arrays
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 9f0171a706 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen d99fc10609 Limit KEYS_IN_BLOCK to a maximum of 255
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen c521e9f641 Remove KEYS_IN_BLOCK definition
Removed the definition of KEYS_IN_BLOCK from mifaredefault.h.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 2059eba7fa Add KEYS_IN_BLOCK definition to mifaredefault.h
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
didierA d987c3aab8 fixes compile fail on aarch64 (issue #3394) 2026-09-01 17:27:42 +02:00
iceman1001 12a890f444 text 2026-09-01 16:24:46 +02:00
iceman1001 89b1de6526 user supplied keys was not taken in consideration and also it left the field on 2026-09-01 16:17:35 +02:00
YoungJules 6bc39ff78c Fix pm3line fallback for ProxSpace/MinGW builds 2026-09-01 14:20:12 +02:00
iceman1001 7556dd8fc0 Resync drain after framing error 2026-08-31 19:45:23 +02:00
iceman1001 179de04301 Clear ring per send, check start ack 2026-08-31 19:43:38 +02:00
Antiklesys a47bdebc87 Extended T=1 support
Extended T=1 support with TA1=95 and T1_IFSD_WANTED 254
2026-08-31 15:28:49 +08:00
Iceman be7f55f72b Merge pull request #3555 from munzzyy/fix/xerox-view-info-block-oob
Fix heap out-of-bounds read in hf xerox view on short dump files
2026-08-31 03:50:44 +07:00
Philippe Teuwen c356ce7f14 Restore client and fw capabilities version parity 2026-08-30 22:42:52 +02:00
Cole Munz 18936b2188 Fix heap out-of-bounds read in hf xerox view on short dump files 2026-08-30 15:39:45 -05:00
Iceman ff94b8b376 Merge pull request #3554 from actuallysparky/codex/emrtd-sod-stack-overflow
fix(eMRTD): move EF_SOD parser buffers off the stack
2026-08-31 02:18:08 +07:00
iceman1001 9e2092fc66 capabilities: report device frame size so the client can adapt
PM3_CMD_DATA_SIZE went 512 -> 624 without a capabilities bump, so a new
client connects to old firmware and every oversized command dies at the
device's length check with no message.

Append max_cmd_data_size, bump to v9. The client now accepts an older
capabilities struct - it only ever grows by appending, so an older layout
is a prefix - and defaults the frame size for pre-v9 firmware.
SendCommandNG bounds by the device value instead of the compile time one.

Also zero init capabilities_t on the device, it leaked stack bytes.
2026-08-30 20:13:38 +02:00
SparkyandCodex 879a4bd273 fix(eMRTD): avoid EF_SOD parser stack overflow
Allocate EF_SOD parsing scratch buffers on the heap so macOS worker threads do not exceed their stack while reading protected travel documents.

Co-Authored-By: Codex <noreply@openai.com>
2026-08-30 10:48:29 -07:00
iceman1001 b7bd6ddadb fix return value that break 'hf search', Thanks @atk! 2026-08-30 19:11:37 +02:00