diff --git a/client/src/cmdlfem4x70.c b/client/src/cmdlfem4x70.c index be3dbe11a..6c58b9c86 100644 --- a/client/src/cmdlfem4x70.c +++ b/client/src/cmdlfem4x70.c @@ -1226,7 +1226,7 @@ static int CmdEM4x70AutoRecover(const char *Cmd) { // lf em 4x70 write -b N -d 0000 // lf em 4x70 brute -b N --rnd --frn // lf em 4x70 write -b N -d - for (uint8_t block = 9; (PM3_SUCCESS == result) && (block > 6); --block) { + for (uint8_t block = 9; block > 6; --block) { uint8_t step = block == 9 ? 2 : block == 8 ? 3 : @@ -1324,6 +1324,8 @@ static int CmdEM4x70AutoRecover(const char *Cmd) { if (PM3_SUCCESS == result) { last_successful_step = step; + } else { + break; } } // The good news is that, if the above succeeded, then from this point forward, the tag remains in a known-good state.