X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/b882b54314a484e2de70e55a5b820aa5b609a3b3..2daa0d0b1e6a697f82d4c185c696d119cc19b085:/client/cmdhfmf.c diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index 6e665519..6273a1d1 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -101,7 +101,7 @@ start: t1 = clock() - t1; if ( t1 > 0 ) - PrintAndLog("Time in darkside: %.0f ticks - %4.2f sec\n", (float)t1, ((float)t1)/CLOCKS_PER_SEC); + PrintAndLog("Time in darkside: %.0f ticks\n", (float)t1); return 0; } @@ -707,7 +707,7 @@ int CmdHF14AMfNested(const char *Cmd) } clock_t t2 = clock() - t1; if ( t2 > 0 ) - PrintAndLog("Time to check 6 known keys: %.0f ticks %4.2f sec", (float)t2, ((float)t2)/CLOCKS_PER_SEC); + PrintAndLog("Time to check 6 known keys: %.0f ticks", (float)t2 ); PrintAndLog("enter nested..."); @@ -747,7 +747,7 @@ int CmdHF14AMfNested(const char *Cmd) t1 = clock() - t1; if ( t1 > 0 ) - PrintAndLog("Time in nested: %.0f ticks %4.2f sec (%4.2f sec per key)\n", (float)t1, ((float)t1)/CLOCKS_PER_SEC, ((float)t1)/iterations/CLOCKS_PER_SEC); + PrintAndLog("Time in nested: %.0f ticks \n", (float)t1); // 20160116 If Sector A is found, but not Sector B, try just reading it of the tag? PrintAndLog("trying to read key B..."); @@ -1150,14 +1150,15 @@ int CmdHF14AMfChk(const char *Cmd) e_sector[i].Key[trgKeyType] = 0xffffffffffff; e_sector[i].foundKey[trgKeyType] = FALSE; } + printf("."); + fflush(stdout); } b < 127 ? ( b +=4 ) : ( b += 16 ); } } - t1 = clock() - t1; if ( t1 > 0 ) - printf("Time in checkkeys: %.0f ticks %1.2f sec (%1.2f sec per key)\n\n", (float)t1, ((float)t1)/CLOCKS_PER_SEC, ((float)t1)/keycnt/CLOCKS_PER_SEC); + printf("\nTime in checkkeys: %.0f ticks\n", (float)t1); // 20160116 If Sector A is found, but not Sector B, try just reading it of the tag? PrintAndLog("testing to read B..."); @@ -1719,11 +1720,13 @@ int CmdHF14AMfCSetUID(const char *Cmd) int argi=0; if (strlen(Cmd) < 1 || param_getchar(Cmd, argi) == 'h') { - PrintAndLog("Usage: hf mf csetuid [ATQA 4 hex symbols SAK 2 hex symbols] [w]"); - PrintAndLog("sample: hf mf csetuid 01020304"); - PrintAndLog("sample: hf mf csetuid 01020304 0004 08 w"); PrintAndLog("Set UID, ATQA, and SAK for magic Chinese card (only works with such cards)"); PrintAndLog("If you also want to wipe the card then add 'w' at the end of the command line."); + PrintAndLog(""); + PrintAndLog("Usage: hf mf csetuid [ATQA 4 hex symbols SAK 2 hex symbols] [w]"); + PrintAndLog(""); + PrintAndLog("sample: hf mf csetuid 01020304"); + PrintAndLog(" hf mf csetuid 01020304 0004 08 w"); return 0; } @@ -1764,7 +1767,7 @@ int CmdHF14AMfCSetUID(const char *Cmd) PrintAndLog("--wipe card:%s uid:%s", (wipeCard)?"YES":"NO", sprint_hex(uid, 4)); - res = mfCSetUID(uid, (atqaPresent)?atqa:NULL, (atqaPresent)?sak:NULL, oldUid, wipeCard); + res = mfCSetUID(uid, (atqaPresent) ? atqa : NULL, (atqaPresent) ? sak : NULL, oldUid, wipeCard); if (res) { PrintAndLog("Can't set UID. error=%d", res); return 1;