]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhfmf.c
Improvements/Fixes to 14443 sniffing/snooping
[proxmark3-svn] / client / cmdhfmf.c
index cc9b4c76df53d30f442a67bad0d97256b67181c6..2dc1ab2bf3480eb609046b3a2eb6f177f3314e6a 100644 (file)
@@ -1847,8 +1847,9 @@ int CmdHF14AMfSniff(const char *Cmd){
        printf("Press the key on pc keyboard to abort the client.\n");\r
        printf("-------------------------------------------------------------------------\n");\r
 \r
-  UsbCommand c = {CMD_MIFARE_SNIFFER, {0, 0, 0}};\r
-  SendCommand(&c);\r
+       UsbCommand c = {CMD_MIFARE_SNIFFER, {0, 0, 0}};\r
+       clearCommandBuffer();\r
+       SendCommand(&c);\r
 \r
        // wait cycle\r
        while (true) {\r
@@ -1895,7 +1896,7 @@ int CmdHF14AMfSniff(const char *Cmd){
                                                sak = bufPtr[11];\r
                                                \r
                                                PrintAndLog("tag select uid:%s atqa:%02x %02x sak:0x%02x", sprint_hex(uid, 7), atqa[0], atqa[1], sak);\r
-                                               if (wantLogToFile) {\r
+                                               if (wantLogToFile || wantDecrypt) {\r
                                                        FillFileNameByUID(logHexFileName, uid, ".log", 7);\r
                                                        AddLogCurrentDT(logHexFileName);\r
                                                }                                               \r
@@ -1911,7 +1912,8 @@ int CmdHF14AMfSniff(const char *Cmd){
                        }\r
                } // resp not NILL\r
        } // while (true)\r
-  return 0;\r
+       \r
+       return 0;\r
 }\r
 \r
 static command_t CommandTable[] =\r
Impressum, Datenschutz