mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
mfp chk - allow for breaking out at every attempt
This commit is contained in:
parent
d70af41229
commit
03070778a2
1 changed files with 14 additions and 10 deletions
|
@ -1006,15 +1006,17 @@ static int MFPKeyCheck(uint8_t startSector, uint8_t endSector, uint8_t startKeyA
|
||||||
for (uint8_t keyAB = startKeyAB; keyAB <= endKeyAB; keyAB++) {
|
for (uint8_t keyAB = startKeyAB; keyAB <= endKeyAB; keyAB++) {
|
||||||
// main cycle with key check
|
// main cycle with key check
|
||||||
for (int i = 0; i < keyListLen; i++) {
|
for (int i = 0; i < keyListLen; i++) {
|
||||||
|
|
||||||
|
// allow client abort every iteration
|
||||||
|
if (kbd_enter_pressed()) {
|
||||||
|
PrintAndLogEx(WARNING, "\naborted via keyboard!\n");
|
||||||
|
DropField();
|
||||||
|
return PM3_EOPABORTED;
|
||||||
|
}
|
||||||
|
|
||||||
if (i % 10 == 0) {
|
if (i % 10 == 0) {
|
||||||
|
if (verbose == false) {
|
||||||
if (verbose == false)
|
|
||||||
PrintAndLogEx(NORMAL, "." NOLF);
|
PrintAndLogEx(NORMAL, "." NOLF);
|
||||||
|
|
||||||
if (kbd_enter_pressed()) {
|
|
||||||
PrintAndLogEx(WARNING, "\naborted via keyboard!\n");
|
|
||||||
DropField();
|
|
||||||
return PM3_EOPABORTED;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1037,9 +1039,6 @@ static int MFPKeyCheck(uint8_t startSector, uint8_t endSector, uint8_t startKeyA
|
||||||
msleep(100);
|
msleep(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (verbose)
|
|
||||||
PrintAndLogEx(WARNING, "\nsector %02d key %d [%s] res: %d", sector, keyAB, sprint_hex_inrow(keyList[i], 16), res);
|
|
||||||
|
|
||||||
// key for [sector,keyAB] found
|
// key for [sector,keyAB] found
|
||||||
if (res == PM3_SUCCESS) {
|
if (res == PM3_SUCCESS) {
|
||||||
if (verbose)
|
if (verbose)
|
||||||
|
@ -1052,9 +1051,14 @@ static int MFPKeyCheck(uint8_t startSector, uint8_t endSector, uint8_t startKeyA
|
||||||
DropField();
|
DropField();
|
||||||
selectCard = true;
|
selectCard = true;
|
||||||
msleep(50);
|
msleep(50);
|
||||||
|
|
||||||
|
// break out from keylist check loop,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (verbose)
|
||||||
|
PrintAndLogEx(WARNING, "\nsector %02d key %d [%s] res: %d", sector, keyAB, sprint_hex_inrow(keyList[i], 16), res);
|
||||||
|
|
||||||
// RES can be:
|
// RES can be:
|
||||||
// PM3_ERFTRANS -7
|
// PM3_ERFTRANS -7
|
||||||
// PM3_EWRONGANSWER -16
|
// PM3_EWRONGANSWER -16
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue