X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/f121b478a11894a42f0fdab127974e1e7d521cc3..f0a96745d0b97f74c0260cf362e226d0a62192b0:/client/cmdlfawid.c diff --git a/client/cmdlfawid.c b/client/cmdlfawid.c index bddd94af..fefc6e0a 100644 --- a/client/cmdlfawid.c +++ b/client/cmdlfawid.c @@ -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 )