]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhfmf.c
`hf mf sniff` - working with emulator files
[proxmark3-svn] / client / cmdhfmf.c
index 6abfdda23496ce976b3de0ee2aa5693b8859e7a3..c27ba56cbf184b05deaea598adc77c229c703744 100644 (file)
@@ -1543,8 +1543,8 @@ int CmdHF14AMfCSave(const char *Cmd) {
 \r
 int CmdHF14AMfSniff(const char *Cmd){\r
        // params\r
-       bool wantLogToFile = 0;\r
-       bool wantDecrypt = 0;\r
+       bool wantLogToFile = 1;\r
+       bool wantDecrypt = 1;\r
        bool wantSaveToEml = 0;\r
        bool wantSaveToEmlFile = 0;\r
 \r
@@ -1568,7 +1568,7 @@ int CmdHF14AMfSniff(const char *Cmd){
                PrintAndLog("    l - save encrypted sequence to logfile `uid.log`");\r
                PrintAndLog("    d - decrypt sequence and put it to log file `uid.log`");\r
                PrintAndLog(" n/a   e - decrypt sequence, collect read and write commands and save the result of the sequence to emulator memory");\r
-               PrintAndLog(" n/a   r - decrypt sequence, collect read and write commands and save the result of the sequence to emulator dump file `uid.eml`");\r
+               PrintAndLog("    r - decrypt sequence, collect read and write commands and save the result of the sequence to emulator dump file `uid.eml`");\r
                PrintAndLog("Usage:  hf mf sniff [l][d][e][r]");\r
                PrintAndLog("  sample: hf mf sniff l d e");\r
                return 0;\r
@@ -1635,14 +1635,14 @@ int CmdHF14AMfSniff(const char *Cmd){
                                                \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
-                                                       FillFileNameByUID(logHexFileName, uid, ".log");\r
+                                                       FillFileNameByUID(logHexFileName, uid, ".log", 7);\r
                                                        AddLogCurrentDT(logHexFileName);\r
                                                }                                               \r
-                                               if (wantDecrypt) mfTraceInit(uid, atqa, sak);\r
+                                               if (wantDecrypt) mfTraceInit(uid, atqa, sak, wantSaveToEmlFile);\r
                                        } else {\r
                                                PrintAndLog("%s(%d):%s", isTag ? "TAG":"RDR", num, sprint_hex(bufPtr, len));\r
                                                if (wantLogToFile) AddLogHex(logHexFileName, isTag ? "TAG: ":"RDR: ", bufPtr, len);\r
-                                               if (wantDecrypt) mfTraceDecode(bufPtr, len);\r
+                                               if (wantDecrypt) mfTraceDecode(bufPtr, len, wantSaveToEmlFile);\r
                                        }\r
                                        bufPtr += len;\r
                                        num++;\r
Impressum, Datenschutz