diff --git a/CHANGELOG.md b/CHANGELOG.md index a1bedd944..f91efd607 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/client/src/cmdlfparadox.c b/client/src/cmdlfparadox.c index 71aa19ebe..a37b14bb3 100644 --- a/client/src/cmdlfparadox.c +++ b/client/src/cmdlfparadox.c @@ -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) {