With `--emu`, `hf mf chk` printed "Found keys have been transferred to
the emulator memory" and returned success whatever mf_elm_set_mem()
gave. It now checks that status, stops the transfer at the first
failure with fast mode off, says so and returns the status. With no
key found it wrote every trailer back and reported a transfer. It now
says "No keys found" and transfers nothing, as `hf mf fchk` does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With `--emu`, `hf mf fchk` printed "Found keys have been transferred to
the emulator memory" and returned success whatever mf_elm_set_mem()
gave. It also ignored the result of FastDumpWithEcFill(), which itself
returned success after "Dump file is PARTIAL complete". The transfer
now stops at the first failure with fast mode off, says so and skips
the card fill. The fill returns the device status when both keys fail,
and the command returns the status that failed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tag never acknowledges a write, so the client printed "Done!" also
when the tag rejected it (wrong password, protected block, missed PMC
window). After a good write the tag stays silent during EEPROM access
(640T0), sends a PMC and then the programmed block, even outside
RFB..RLB, and continues as after reset (datasheet 6.4/6.5). On failure
it skips that block.
- RealWritePCF7931: keep the field on after the frame and switch to
sampling right away (4.5 blocks). Confirm when the decoded blocks
follow the read-after-write grid; when that block itself decodes,
check the written byte and return the whole block
- DecodePCF7931: split from DemodPCF7931 to decode an existing capture;
a block with no PMC before it gets its start from the closing PMC
- SendCmdPCF7931: frame sending split into SendFramePCF7931
- WritePCF7931: up to 3 attempts while not confirmed (a tag idle for a
while often misses the first one); reply status and block
- client write: report confirmed with block data, confirmed by timing,
or not confirmed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the reset-aligned 12.5-block capture an empty one takes ~1.3s, so
10 of them took 13.4s against the 15s client timeout. A present tag
always decodes in the first capture.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tag does not send block numbers (datasheet 5.1, 6.1); only block 1
(sync pattern and RFB/RLB/RB1 selection) identifies positions. The
reader printed raw captures, repeated and unordered.
- ReadPCF7931: field off 50ms before each capture so it starts from a
tag reset (first block = RFB, or block 1 with RB1, fig 10), record the
start sample of each block and return its index in the sequence sent
after reset in a pcf7931_read_t reply. Keep the longest capture, at
least 10 blocks (a full cycle plus repeats)
- DemodPCF7931: capture 12.5 blocks (~0.9s) instead of 4.5, enough for
the 9-block cycle (RB1 with a full range sends block 1 twice) to repeat
- PMC/block debug prints only at DBG_EXTENDED
- client: identify block 1 as the block whose selection explains the
observed cycle; it must match the minimal period of the data (a single
repeated block was taken for a 2-block selection). Print blocks 0-7
(missing ones as not transmitted) and decode PAC, password, write
protected blocks and selection
- client: when several blocks fit as block 1 (a full 8-block cycle is
rotation symmetric, e.g. a user block ending in 55 C4 reads as RFB 5,
RLB 4) pick --rfb, then the one with fewest reserved bits set (fig 8),
else print the reset order as #n with the possible RFB values
- without block 1: print the blocks in transmission order as RFB+n, list
the RFB values that keep block 1 out of the range, number them when
only one is possible, or with the new --rfb option
- client: reader timeout 15s, covers the no-tag path
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With `--emu`, `hf mf staticnested` printed "keys transferred to emulator
memory." and returned success whatever mf_elm_set_mem() gave. It now
checks that status, stops the transfer at the first failure with fast
mode off, says so and returns the status.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release asset from RfidResearchGroup/Proxmark5_BWM_esp32 tag V4
(built Nov 11 2026 13:40:09, ESP-IDF v5.5.2).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With `--emu`, `hf mf nested` printed "Key transferred to emulator
memory" or "keys transferred to emulator memory." and returned success
whatever mf_elm_set_mem() gave. It now checks that status, stops the
transfer at the first failure with fast mode off, says so and returns
the status. The single sector recovery also returned success when
mf_nested() failed, for example after "No valid key found". It now
returns the mf_nested() status.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`hf mf eclr` returned success without waiting for the reply to
CMD_HF_MIFARE_EML_MEMCLR, and the device replied PM3_SUCCESS even
without room for the emulator memory. emlClearMem() now returns the
status of BigBuf_Clear_EM(), the device replies with it and the client
waits for it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The device did not answer CMD_HF_MIFARE_EML_MEMSET, so `hf mf eload`
and `hf mfu eload` printed "Done!" even when the device had no room
left for the emulator memory and nothing was written. BigBuf_Clear_EM()
then ran memset() on a NULL pointer. The device now refuses a MEMSET
packet shorter than its blocks and replies with the status, which the
client waits for. `hf mf eload` also turns fast mode off when its last
packet holds more than one block. hf_mf_tnp3_sim.lua sends the flags
byte added in 4d7d49e08, and both lua sims check the status. The
`hf mfu eload` hint loses a stray backtick.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix byte-parity removal to process the 112 payload bits separately from
the trailing 8-bit CRC8-Maxim checksum, add 35-bit Pyramid encoding/
decoding via `getPyramidBitsEx()`, add `--fmt` on `lf pyramid clone`/`sim`
and `--raw` on `lf pyramid demod`, and guard `detectPyramid()` against
truncated frame buffers.
Co-Authored-By: Gemini <noreply@google.com>
Detect and decode 64-bit SecuraKey Short (`0x7FC00000` preamble,
marker-free 24-bit card number), support `--raw` on `lf securakey demod`/
`clone`/`sim`, and generate/clone/simulate 64-bit Short frames via
`--cn` with T55X7_SECURAKEY_SHORT_CONFIG_BLOCK / EM4305 config blocks.
Co-Authored-By: Gemini <noreply@google.com>
Formats longer than 55 bits populate packed.Top while packed.Mid can be
<= 0xFFF, which caused sendTry(), CmdHIDSim(), and CmdHIDClone() to omit
long-format transmission. Include packed.Top != 0 in the longFMT check.
Co-Authored-By: Gemini <noreply@google.com>
Define T55x7 and EM4x05 configuration block constants for WatchNET,
LF ICT (24X / GT 081), Keri NXT, and 64-bit SecuraKey Short, register
SecuraKey Short and ICT in testKnownConfigBlock(), and display these
formats in printT5x7KnownBlock0() with an enlarged output buffer.
Co-Authored-By: Gemini <noreply@google.com>
Release asset from RfidResearchGroup/Proxmark5_BWM_esp32 tag V3
(built Nov 11 2026 11:01:47, ESP-IDF v5.5.2).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bwm_ota_once() returned PM3_ETIMEOUT both when OTA BEGIN timed out and
when the END ack was lost. The retry loop reads PM3_ETIMEOUT as "all
data sent", so a BEGIN timeout (e.g. upgrade re-run while the PM5 is
still resetting) printed "BWM firmware uploaded" with nothing sent and
reset the PM5 while the ESP was still erasing. BEGIN failures now return
PM3_EFAILED and take the normal retry path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With BLE off, `hw bwm ble` suggested `hw bwm ble pairing on`; it now
suggests `hw bwm ble on` and drops the pairing hint until BLE is on.
A WiFi join failing with reason 201 now says the BWM is 2.4 GHz only,
the usual cause when pointed at a 5 GHz SSID.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release asset from RfidResearchGroup/Proxmark5_BWM_esp32 tag V2
(8b133b0, ESP-IDF v5.5.2). OTA-tested on PM5: V1-12-g23bfa7b -> V2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ULC config / Attack lines are a fingerprint result, next to PRNG,
Vendor and Chip IC. hf mfu info now prints them there, including the
read protected case, and keeps the UL-C Configuration block for the
page decode only. dump / view / eview -v have no fingerprint section
and still print the verdict after the decode. Definite verdicts use
the [+] prefix like the other fingerprint lines.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The "read protected" verdict sat under the silicon info without a
header. Print the UL-C Configuration header like the readable case.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fingerprint printed a bare chip name, or a PRNG line followed by
"likely MF0ICU2". Every outcome now prints the same three lines:
PRNG......... genuine | weak | inconclusive | n/a
Vendor....... NXP | Feiju | Giantec | Lab401 | unknown
Chip IC...... MF0ICU2 | FJ8010 | GT23SC4489 | USCUID-UL ...
Colours follow the client convention for exploitable findings: a weak
PRNG and counterfeit or magic chips are green, a genuine PRNG is red.
mfulc_prng_test() returns its result instead of printing it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BREAKMEIFYOUCAN (eprint 2026/100) recovers UL-C keys by overwriting
three of the four key pages and brute forcing the fourth. Locking the
key pages with lock byte 3 (page 0x28 byte 1, bit 7) stops it.
hf mfu info now decodes that from the config pages:
locked - key pages locked (red)
relay - writable after authentication, relayed auth 75% (green)
unlocked - AUTH0 >= 0x2F, pages 0x2C..0x2E writable without auth,
partial key overwrite (green)
and says when the config is read protected. A hint at the end of the
output names the attack and `hf mfu desbrute --reader`.
The same check runs on dumps: `hf mfu view -v`, and new -v flags on
`hf mfu dump` and `hf mfu eview`. Partial dumps stay silent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The delay was masked to 16 bits and the offsets cut to int8 when sent,
so e.g. -d 70000 silently became 4464us.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- SendCmdPCF7931: track elapsed time in 32 bits. The 16-bit precision
counter wraps ~3 times per write frame and the old single-overflow
compensation made the wait loop never end (device freeze, nothing sent)
- WritePCF7931: send the missing reply_ng, the client always timed out
- SendCmdPCF7931: field off 50ms first so init_delay counts from a tag
reset (tRESET <= 20ms); a write right after a read always failed
- client: default init_delay 17450us, centre of the measured working
window 17400-17500us (17300 and 17600 fail)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The DHCP hint was printed for every failure, also for a refused join such
as "network not found". bwm_wifi_forward_up() now returns PM3_ENODATA when
there is no IP yet but no refusal (joined without a lease, or timed out)
and PM3_EFAILED for a refused join; the client hints only on PM3_ENODATA.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
get_proxmark_state() runs twice per flash (in enter_bootloader() and again
in flash_start_flashing()), so with the PM5 already in boot mode
"Bootloader BWM link at 921600 baud" was printed twice. Only the second,
post-bootloader query reports it now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--psk2 set maxblock 4 but wrote blocks 1-3 only, so the tag sent block 4
with whatever it held, and with --q5 or --em it wrote its T55x7 config
block to a Q5 or EM4305.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clone wrote mode 0 for a --cn without -m, used -1 as "no --cn", cut ids
above 32 bits, turned modes above 15 into 1, ORed -m into a --raw
without fixing its parity and checksum, and accepted a short --raw and
conflicting options.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>