]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlfawid.c
CHG: "hf mf hardnested"
[proxmark3-svn] / client / cmdlfawid.c
index bddd94af5a1bfb3347b53c7b935f33ccf820ee28..fefc6e0af1a2b6a15d921ddb81668f1ae5bdf231 100644 (file)
@@ -88,13 +88,11 @@ static int sendPing(void){
        UsbCommand ping = {CMD_PING, {1, 2, 3}};
        SendCommand(&ping);
        SendCommand(&ping);     
        UsbCommand ping = {CMD_PING, {1, 2, 3}};
        SendCommand(&ping);
        SendCommand(&ping);     
-       SendCommand(&ping);
-       
+       SendCommand(&ping);     
        clearCommandBuffer();
        UsbCommand resp;
        clearCommandBuffer();
        UsbCommand resp;
-       if (WaitForResponseTimeout(CMD_ACK, &resp, 1000)) {
+       if (WaitForResponseTimeout(CMD_ACK, &resp, 1000))
                return 0;
                return 0;
-       }
        return 1;
 }
 
        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);
        memcpy(c.d.asBytes, bs, bs_len);
        clearCommandBuffer();
        SendCommand(&c);
-
        msleep(delay);
        sendPing();
        return TRUE;
        msleep(delay);
        sendPing();
        return TRUE;
@@ -361,8 +358,6 @@ int CmdAWIDBrute(const char *Cmd){
                        break;
        }
        
                        break;
        }
        
-       // start
-       
        PrintAndLog("Bruteforceing AWID %d Reader", fmtlen);
        PrintAndLog("Press pm3-button to abort simulation or press key");
 
        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;
                }
                        printf("Device offline\n");
                        return  2;
                }
-               
-               if (ukbhit()) return sendPing();
+               if (ukbhit()) {
+                       PrintAndLog("aborted via keyboard!");
+                       return sendPing();
+               }
                
                // Do one up
                if ( up < 0xFFFF )
                
                // Do one up
                if ( up < 0xFFFF )
Impressum, Datenschutz