lf paradox: refuse FC above 255 and CN above 65535

clone and sim accepted FC up to 999 and CN up to 99999, but the frame
holds 8 bits of FC and 16 of CN, so FC 300 wrote the card of FC 44.
The clone hint also named lf paradox read, which does not exist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Gabriele GristinaandClaude Opus 5.5 committed 2026-11-07 00:14:02 +01:00
1 parent f90d0d0bf9
commit 015ee1664e
2 files changed
+8 -5

No files matched your search

+1
View File
@@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
## [unreleased][unreleased]
- Fixed `lf paradox clone` and `sim` - FC above 255 and CN above 65535 are refused instead of cut, the clone hint names `lf paradox reader` (@matrix)
- Fixed flashing with redirected output - the progress animation is drawn only when stdout is a terminal (@matrix)
- Fixed `proxmark3 --flash`, `--dumpmem` and `--reboot-to-bootloader` exit status - a failure exits 1, a failed flash no longer ends with `All done` (@matrix)
- Fixed `data rawdemod` - `--max`, `--samples` and the `--p2` clock no longer wrap above 255, `--fs` refuses values above 255 (@matrix)
+7 -5
View File
@@ -333,8 +333,9 @@ static int CmdParadoxClone(const char *Cmd) {
return PM3_EINVARG;
}
if (fc > 999 || cn > 99999) {
PrintAndLogEx(FAILED, "FC has a max value of 999 and CN has a max value of 99999");
// the frame carries 8 bits of fc and 16 of cn
if (fc > 0xFF || cn > 0xFFFF) {
PrintAndLogEx(FAILED, "FC has a max value of 255 and CN has a max value of 65535");
return PM3_EINVARG;
}
@@ -384,7 +385,7 @@ static int CmdParadoxClone(const char *Cmd) {
res = clone_t55xx_tag(blocks, ARRAYLEN(blocks));
}
PrintAndLogEx(SUCCESS, "Done!");
PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf paradox read`") " to verify");
PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf paradox reader`") " to verify");
return res;
}
@@ -421,8 +422,9 @@ static int CmdParadoxSim(const char *Cmd) {
return PM3_EINVARG;
}
if (fc > 999 || cn > 99999) {
PrintAndLogEx(FAILED, "FC has a max value of 999 and CN has a max value of 99999");
// the frame carries 8 bits of fc and 16 of cn
if (fc > 0xFF || cn > 0xFFFF) {
PrintAndLogEx(FAILED, "FC has a max value of 255 and CN has a max value of 65535");
return PM3_EINVARG;
}
if (raw_len != 0) {