CHG: 'hf 15 findafi' - added the possibility to cancel loop with buttonpress

This commit is contained in:
iceman1001 2017-09-05 10:31:27 +02:00
commit 2c1e2a9f3a
3 changed files with 8 additions and 3 deletions

View file

@ -1056,9 +1056,14 @@ void BruteforceIso15693Afi(uint32_t speed) {
if (recvlen >= 12) { if (recvlen >= 12) {
Dbprintf("AFI = %i UID = %s", i, sprintUID(NULL, buf + 2) ); Dbprintf("AFI = %i UID = %s", i, sprintUID(NULL, buf + 2) );
} }
if (BUTTON_PRESS) {
DbpString("button pressed, aborting..");
break;
}
} }
Dbprintf("AFI Bruteforcing done."); DbpString("AFI Bruteforcing done.");
switch_off(); switch_off();
} }

View file

@ -99,7 +99,7 @@ int DemodPCF7931(uint8_t **outBlocks) {
warnings++; warnings++;
if (warnings > 10) if (warnings > 10)
{ {
Dbprintf("Error: too many detection errors, aborting."); Dbprintf("Error: too many detection errors, aborting...");
return 0; return 0;
} }
} }

View file

@ -685,7 +685,7 @@ static bool select_only(uint8_t *CSN, uint8_t *CCNR, bool use_credit_key, bool v
} }
if(isOK <= 1){ if(isOK <= 1){
PrintAndLog("Failed to obtain CC! Aborting"); PrintAndLog("Failed to obtain CC! Aborting...");
return false; return false;
} }
return true; return true;