small fix in nested

This commit is contained in:
merlokk 2017-07-27 18:38:01 +03:00
commit 5780d83edf

View file

@ -736,8 +736,6 @@ int CmdHF14AMfNested(const char *Cmd)
PrintAndLog("--auto key. block no:%3d, key type:%c key:%s", blockNo, keyType?'B':'A', sprint_hex(key, 6)); PrintAndLog("--auto key. block no:%3d, key type:%c key:%s", blockNo, keyType?'B':'A', sprint_hex(key, 6));
} }
// return 0;
// nested sectors // nested sectors
iterations = 0; iterations = 0;
PrintAndLog("nested..."); PrintAndLog("nested...");
@ -773,9 +771,9 @@ int CmdHF14AMfNested(const char *Cmd)
} }
} }
printf("Time in nested: %1.3f (%1.3f sec per key)\n\n", ((float)(msclock() - msclock1))/1000.0, ((float)(msclock() - msclock1))/iterations/1000.0); // print result
PrintAndLog("-----------------------------------------------\nIterations count: %d\n\n", iterations); PrintAndLog("-----------------------------------------------\nIterations count: %d\n\n", iterations);
printf("Time in nested: %1.3f (%1.3f sec per key)\n\n", ((float)(msclock() - msclock1))/1000.0, ((float)(msclock() - msclock1))/iterations/1000.0);
//print them //print them
PrintAndLog("|---|----------------|---|----------------|---|"); PrintAndLog("|---|----------------|---|----------------|---|");
PrintAndLog("|sec|key A |res|key B |res|"); PrintAndLog("|sec|key A |res|key B |res|");
@ -786,7 +784,7 @@ int CmdHF14AMfNested(const char *Cmd)
} }
PrintAndLog("|---|----------------|---|----------------|---|"); PrintAndLog("|---|----------------|---|----------------|---|");
// transfer them to the emulator // transfer keys to the emulator memory
if (transferToEml) { if (transferToEml) {
for (i = 0; i < SectorsCnt; i++) { for (i = 0; i < SectorsCnt; i++) {
mfEmlGetMem(keyBlock, FirstBlockOfSector(i) + NumBlocksPerSector(i) - 1, 1); mfEmlGetMem(keyBlock, FirstBlockOfSector(i) + NumBlocksPerSector(i) - 1, 1);