X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/f5a1a9ce477df5dee44b230d7e6dfd0377eb167f..fdefed663faff5ac466943efba25d87090ba8cbb:/client/cmdhfmf.c diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index a2665256..6075db53 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -1194,7 +1194,7 @@ int CmdHF14AMf1kSim(const char *Cmd) PrintAndLog(" n (Optional) Automatically exit simulation after blocks have been read by reader. 0 = infinite"); PrintAndLog(" i (Optional) Interactive, means that console will not be returned until simulation finishes or is aborted"); PrintAndLog(" x (Optional) Crack, performs the 'reader attack', nr/ar attack against a legitimate reader, fishes out the key(s)"); - PrintAndLog(" sample: hf mf sim 0a0a0a0a "); + PrintAndLog(" sample: hf mf sim u 0a0a0a0a "); return 0; } uint8_t pnr = 0; @@ -1260,8 +1260,10 @@ int CmdHF14AMfDbg(const char *Cmd) PrintAndLog("Usage: hf mf dbg "); PrintAndLog(" 0 - no debug messages"); PrintAndLog(" 1 - error messages"); - PrintAndLog(" 2 - all messages"); - PrintAndLog(" 4 - extended debug mode"); + PrintAndLog(" 2 - plus information messages"); + PrintAndLog(" 3 - plus debug messages"); + PrintAndLog(" 4 - print even debug messages in timing critical functions"); + PrintAndLog(" Note: this option therefore may cause malfunction itself"); return 0; } @@ -1473,8 +1475,8 @@ int CmdHF14AMfECFill(const char *Cmd) uint8_t keyType = 0; if (strlen(Cmd) < 1 || param_getchar(Cmd, 0) == 'h') { - PrintAndLog("Usage: hf mf efill "); - PrintAndLog("sample: hf mf efill A"); + PrintAndLog("Usage: hf mf ecfill "); + PrintAndLog("sample: hf mf ecfill A"); PrintAndLog("Card data blocks transfers to card emulator memory."); PrintAndLog("Keys must be laid in the simulator memory. \n"); return 0; @@ -1848,7 +1850,8 @@ int CmdHF14AMfSniff(const char *Cmd){ int blockLen = 0; int num = 0; int pckNum = 0; - uint8_t uid[8]; + uint8_t uid[7]; + uint8_t uid_len; uint8_t atqa[2]; uint8_t sak; bool isTag; @@ -1926,14 +1929,19 @@ int CmdHF14AMfSniff(const char *Cmd){ bufPtr += 4; len = bufPtr[0]; bufPtr++; - if ((len == 14) && (bufPtr[0] = 0xff) && (bufPtr[1] = 0xff)) { + if ((len == 14) && (bufPtr[0] == 0xff) && (bufPtr[1] == 0xff)) { memcpy(uid, bufPtr + 2, 7); memcpy(atqa, bufPtr + 2 + 7, 2); + uid_len = (atqa[0] & 0xC0) == 0x40 ? 7 : 4; sak = bufPtr[11]; - PrintAndLog("tag select uid:%s atqa:%02x %02x sak:0x%02x", sprint_hex(uid, 7), atqa[0], atqa[1], sak); + PrintAndLog("tag select uid:%s atqa:0x%02x%02x sak:0x%02x", + sprint_hex(uid + (7 - uid_len), uid_len), + atqa[1], + atqa[0], + sak); if (wantLogToFile || wantDecrypt) { - FillFileNameByUID(logHexFileName, uid, ".log", 7); + FillFileNameByUID(logHexFileName, uid + (7 - uid_len), ".log", uid_len); AddLogCurrentDT(logHexFileName); } if (wantDecrypt) mfTraceInit(uid, atqa, sak, wantSaveToEmlFile);