mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-12 08:16:09 -07:00
speedup 'hf mf chk'
* fix abort by pressing the PM3 button
This commit is contained in:
parent
ac2668f898
commit
d1009af506
1 changed files with 5 additions and 7 deletions
|
@ -858,12 +858,6 @@ int MifareChkBlockKeys(uint8_t *keys, uint8_t keyCount, uint8_t blockNo, uint8_t
|
||||||
uint8_t cascade_levels = 0;
|
uint8_t cascade_levels = 0;
|
||||||
uint64_t ui64Key = 0;
|
uint64_t ui64Key = 0;
|
||||||
|
|
||||||
// Allow button press to interrupt device
|
|
||||||
if (BUTTON_PRESS()) {
|
|
||||||
Dbprintf("ChkKeys: Cancel operation. Exit...");
|
|
||||||
return -2;
|
|
||||||
}
|
|
||||||
|
|
||||||
int retryCount = 0;
|
int retryCount = 0;
|
||||||
for (uint8_t i = 0; i < keyCount; i++) {
|
for (uint8_t i = 0; i < keyCount; i++) {
|
||||||
|
|
||||||
|
@ -894,6 +888,10 @@ int MifareChkBlockKeys(uint8_t *keys, uint8_t keyCount, uint8_t blockNo, uint8_t
|
||||||
return i + 1;
|
return i + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (BUTTON_PRESS()) {
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue