PrintAndLog(" n (Optional) Automatically exit simulation after <numreads> blocks have been read by reader. 0 = infinite");\r
PrintAndLog(" i (Optional) Interactive, means that console will not be returned until simulation finishes or is aborted");\r
PrintAndLog(" x (Optional) Crack, performs the 'reader attack', nr/ar attack against a legitimate reader, fishes out the key(s)");\r
- PrintAndLog(" sample: hf mf sim 0a0a0a0a ");\r
+ PrintAndLog(" sample: hf mf sim u 0a0a0a0a ");\r
return 0;\r
}\r
uint8_t pnr = 0;\r
PrintAndLog("Usage: hf mf dbg <debug level>");\r
PrintAndLog(" 0 - no debug messages");\r
PrintAndLog(" 1 - error messages");\r
- PrintAndLog(" 2 - all messages");\r
- PrintAndLog(" 4 - extended debug mode");\r
+ PrintAndLog(" 2 - plus information messages");\r
+ PrintAndLog(" 3 - plus debug messages");\r
+ PrintAndLog(" 4 - print even debug messages in timing critical functions");\r
+ PrintAndLog(" Note: this option therefore may cause malfunction itself");\r
return 0;\r
} \r
\r
uint8_t keyType = 0;\r
\r
if (strlen(Cmd) < 1 || param_getchar(Cmd, 0) == 'h') {\r
- PrintAndLog("Usage: hf mf efill <key A/B>");\r
- PrintAndLog("sample: hf mf efill A");\r
+ PrintAndLog("Usage: hf mf ecfill <key A/B>");\r
+ PrintAndLog("sample: hf mf ecfill A");\r
PrintAndLog("Card data blocks transfers to card emulator memory.");\r
PrintAndLog("Keys must be laid in the simulator memory. \n");\r
return 0;\r
int blockLen = 0;\r
int num = 0;\r
int pckNum = 0;\r
- uint8_t uid[8];\r
+ uint8_t uid[7];\r
+ uint8_t uid_len;\r
uint8_t atqa[2];\r
uint8_t sak;\r
bool isTag;\r
bufPtr += 4;\r
len = bufPtr[0];\r
bufPtr++;\r
- if ((len == 14) && (bufPtr[0] = 0xff) && (bufPtr[1] = 0xff)) {\r
+ if ((len == 14) && (bufPtr[0] == 0xff) && (bufPtr[1] == 0xff)) {\r
memcpy(uid, bufPtr + 2, 7);\r
memcpy(atqa, bufPtr + 2 + 7, 2);\r
+ uid_len = (atqa[0] & 0xC0) == 0x40 ? 7 : 4;\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
+ PrintAndLog("tag select uid:%s atqa:0x%02x%02x sak:0x%02x", \r
+ sprint_hex(uid + (7 - uid_len), uid_len),\r
+ atqa[1], \r
+ atqa[0], \r
+ sak);\r
if (wantLogToFile || wantDecrypt) {\r
- FillFileNameByUID(logHexFileName, uid, ".log", 7);\r
+ FillFileNameByUID(logHexFileName, uid + (7 - uid_len), ".log", uid_len);\r
AddLogCurrentDT(logHexFileName);\r
} \r
if (wantDecrypt) mfTraceInit(uid, atqa, sak, wantSaveToEmlFile);\r