fix #1234 - cliparse allow empty line, loop now user interuptable

This commit is contained in:
iceman1001 2021-04-06 23:37:45 +02:00
commit 30a10b266b
2 changed files with 31 additions and 17 deletions

View file

@ -1853,7 +1853,7 @@ void BruteforceIso15693Afi(uint32_t speed) {
Dbprintf("NoAFI UID = %s", iso15693_sprintUID(NULL, recv + 2));
} else {
DbpString("Failed to select card");
reply_ng(CMD_ACK, PM3_ESOFT, NULL, 0);
reply_ng(CMD_HF_ISO15693_FINDAFI, PM3_ESOFT, NULL, 0);
switch_off();
return;
}
@ -1881,10 +1881,8 @@ void BruteforceIso15693Afi(uint32_t speed) {
Dbprintf("AFI = %i UID = %s", i, iso15693_sprintUID(NULL, recv + 2));
}
aborted = BUTTON_PRESS();
aborted = BUTTON_PRESS() && data_available();
if (aborted) {
DbpString("button pressed, aborting..");
break;
}
}
@ -1893,9 +1891,9 @@ void BruteforceIso15693Afi(uint32_t speed) {
switch_off();
if (aborted) {
reply_ng(CMD_ACK, PM3_EOPABORTED, NULL, 0);
reply_ng(CMD_HF_ISO15693_FINDAFI, PM3_EOPABORTED, NULL, 0);
} else {
reply_ng(CMD_ACK, PM3_SUCCESS, NULL, 0);
reply_ng(CMD_HF_ISO15693_FINDAFI, PM3_SUCCESS, NULL, 0);
}
}