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
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
}\r
} // resp not NILL\r
} // while (true)\r
- return 0;\r
+ \r
+ return 0;\r
}\r
\r
static command_t CommandTable[] =\r