mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
FIX: minor adjustments to 'lf awid bruteforce'
FIX: making the 'lf hid bruteforce' to work the same way as the awid one..
This commit is contained in:
parent
cc70889743
commit
89603cbddc
3 changed files with 119 additions and 60 deletions
|
@ -88,13 +88,11 @@ static int sendPing(void){
|
|||
UsbCommand ping = {CMD_PING, {1, 2, 3}};
|
||||
SendCommand(&ping);
|
||||
SendCommand(&ping);
|
||||
SendCommand(&ping);
|
||||
|
||||
SendCommand(&ping);
|
||||
clearCommandBuffer();
|
||||
UsbCommand resp;
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1000)) {
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1000))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -112,7 +110,6 @@ static bool sendTry(uint8_t fmtlen, uint32_t fc, uint32_t cn, uint32_t delay, ui
|
|||
memcpy(c.d.asBytes, bs, bs_len);
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
|
||||
msleep(delay);
|
||||
sendPing();
|
||||
return TRUE;
|
||||
|
@ -361,8 +358,6 @@ int CmdAWIDBrute(const char *Cmd){
|
|||
break;
|
||||
}
|
||||
|
||||
// start
|
||||
|
||||
PrintAndLog("Bruteforceing AWID %d Reader", fmtlen);
|
||||
PrintAndLog("Press pm3-button to abort simulation or press key");
|
||||
|
||||
|
@ -375,8 +370,10 @@ int CmdAWIDBrute(const char *Cmd){
|
|||
printf("Device offline\n");
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (ukbhit()) return sendPing();
|
||||
if (ukbhit()) {
|
||||
PrintAndLog("aborted via keyboard!");
|
||||
return sendPing();
|
||||
}
|
||||
|
||||
// Do one up
|
||||
if ( up < 0xFFFF )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue