fix: adapting to run all strategies.

This commit is contained in:
iceman1001 2017-12-18 12:14:02 +01:00
parent e6f0672015
commit bc639bc3ec
2 changed files with 8 additions and 3 deletions

View file

@ -1312,6 +1312,7 @@ int CmdHF14AMfChk_fast(const char *Cmd) {
// strategys. 1= deep first on sector 0 AB, 2= width first on all sectors
for (uint8_t strategy = 1; strategy < 3; strategy++) {
PrintAndLog("[+] Running strategy %u", strategy);
// main keychunk loop
for (uint32_t i = 0; i < keycnt; i += chunksize) {
@ -1332,8 +1333,8 @@ int CmdHF14AMfChk_fast(const char *Cmd) {
if ( firstChunk )
firstChunk = false;
// all keys, aborted, last keychunk
if ( res == 0 || res == 2 || lastChunk )
// all keys, aborted
if ( res == 0 || res == 2 )
goto out;
} // end chunks of keys
} // end strategy

View file

@ -204,7 +204,11 @@ int mfCheckKeys_fast( uint8_t sectorsCnt, uint8_t firstChunk, uint8_t lastChunk,
}
}
free(tmp);
return 0;
if ( curr_keys == sectorsCnt*2 )
return 0;
if ( lastChunk )
return 1;
}
return 1;
}