mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-10-23 19:33:09 +00:00
mfp chk - allow for breaking out at every attempt
This commit is contained in:
1 parent
d70af41229
commit
03070778a2
1 file changed
+14
-10
+14
-10
@@ -1006,15 +1006,17 @@ static int MFPKeyCheck(uint8_t startSector, uint8_t endSector, uint8_t startKeyA
|
||||
for (uint8_t keyAB = startKeyAB; keyAB <= endKeyAB; keyAB++) {
|
||||
// main cycle with key check
|
||||
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 (verbose == false)
|
||||
if (verbose == false) {
|
||||
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);
|
||||
}
|
||||
|
||||
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
|
||||
if (res == PM3_SUCCESS) {
|
||||
if (verbose)
|
||||
@@ -1052,9 +1051,14 @@ static int MFPKeyCheck(uint8_t startSector, uint8_t endSector, uint8_t startKeyA
|
||||
DropField();
|
||||
selectCard = true;
|
||||
msleep(50);
|
||||
|
||||
// break out from keylist check loop,
|
||||
break;
|
||||
}
|
||||
|
||||
if (verbose)
|
||||
PrintAndLogEx(WARNING, "\nsector %02d key %d [%s] res: %d", sector, keyAB, sprint_hex_inrow(keyList[i], 16), res);
|
||||
|
||||
// RES can be:
|
||||
// PM3_ERFTRANS -7
|
||||
// PM3_EWRONGANSWER -16
|
||||
|
||||
Reference in new issue
Block a user