]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
hf mf sniff: small fixes
authorOleg Moiseenko <olegmsn@gmail.com>
Fri, 12 Jan 2018 21:37:55 +0000 (23:37 +0200)
committerpwpiwi <pwpiwi@users.noreply.github.com>
Fri, 12 Jan 2018 21:37:55 +0000 (22:37 +0100)
armsrc/iso14443a.c
client/cmdhfmf.c

index 94ca52f542e242de6816f04e4970dd7fdda5e986..7d589f0e64f6354227db678b703d379ba71b4909 100644 (file)
@@ -2482,7 +2482,7 @@ void RAMFUNC SniffMifare(uint8_t param) {
        for(uint32_t sniffCounter = 0; true; ) {
        
                if(BUTTON_PRESS()) {
-                       DbpString("cancelled by button");
+                       DbpString("Canceled by button.");
                        break;
                }
 
@@ -2576,7 +2576,7 @@ void RAMFUNC SniffMifare(uint8_t param) {
 
        } // main cycle
 
-       DbpString("COMMAND FINISHED");
+       DbpString("COMMAND FINISHED.");
 
        FpgaDisableSscDma();
        MfSniffEnd();
index 4956df8c66e898f03fee4647db9722553a669f90..b653cf300a1a7199b0d7e869cda93a187188c895 100644 (file)
@@ -2527,14 +2527,13 @@ int CmdHF14AMfSniff(const char *Cmd){
                }\r
 \r
                UsbCommand resp;\r
-               if (WaitForResponseTimeout(CMD_ACK,&resp,2000)) {\r
+               if (WaitForResponseTimeoutW(CMD_ACK, &resp, 2000, false)) {\r
                        res = resp.arg[0] & 0xff;\r
                        uint16_t traceLen = resp.arg[1];\r
                        len = resp.arg[2];\r
 \r
                        if (res == 0) {                                                         // we are done\r
-                               free(buf);\r
-                               return 0;\r
+                               break;\r
                        }\r
 \r
                        if (res == 1) {                                                         // there is (more) data to be transferred\r
@@ -2610,6 +2609,9 @@ int CmdHF14AMfSniff(const char *Cmd){
        } // while (true)\r
 \r
        free(buf);\r
+       \r
+       msleep(300); // wait for exiting arm side.\r
+       PrintAndLog("Done.");\r
        return 0;\r
 }\r
 \r
Impressum, Datenschutz