mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-14 03:03:14 +08:00
chg: 'hf 14a cuids' - now can be interrupted with keyboard press
This commit is contained in:
parent
507b74da15
commit
aa711b2d92
1 changed files with 10 additions and 2 deletions
|
@ -411,10 +411,18 @@ int CmdHF14ACUIDs(const char *Cmd) {
|
|||
// collect at least 1 (e.g. if no parameter was given)
|
||||
n = n > 0 ? n : 1;
|
||||
|
||||
uint64_t t1 = msclock();
|
||||
PrintAndLog("Collecting %d UIDs", n);
|
||||
PrintAndLog("Start: %" PRIu64, msclock()/1000);
|
||||
|
||||
// repeat n times
|
||||
for (int i = 0; i < n; i++) {
|
||||
|
||||
if (ukbhit()) {
|
||||
int gc = getchar(); (void)gc;
|
||||
printf("\naborted via keyboard!\n");
|
||||
break;
|
||||
}
|
||||
|
||||
// execute anticollision procedure
|
||||
UsbCommand c = {CMD_READER_ISO_14443a, {ISO14A_CONNECT, 0, 0}};
|
||||
SendCommand(&c);
|
||||
|
@ -435,7 +443,7 @@ int CmdHF14ACUIDs(const char *Cmd) {
|
|||
PrintAndLog("%s", uid_string);
|
||||
}
|
||||
}
|
||||
PrintAndLog("End: %" PRIu64, msclock()/1000);
|
||||
PrintAndLog("End: %" PRIu64 " seconds", (msclock()-t1)/1000);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue