mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
ADD: some clocking for 'hf mf mifare', 'hf mf nested', 'hf mf chk'
This commit is contained in:
parent
3e110ad5ee
commit
621601ecef
1 changed files with 9 additions and 4 deletions
|
@ -29,6 +29,7 @@ int CmdHF14AMifare(const char *Cmd)
|
||||||
printf("Press button on the proxmark3 device to abort both proxmark3 and client.\n");
|
printf("Press button on the proxmark3 device to abort both proxmark3 and client.\n");
|
||||||
printf("-------------------------------------------------------------------------\n");
|
printf("-------------------------------------------------------------------------\n");
|
||||||
|
|
||||||
|
time_t time1 = clock();
|
||||||
|
|
||||||
start:
|
start:
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
|
@ -86,6 +87,7 @@ start:
|
||||||
PrintAndLog("Found valid key: %012"llx" \n", r_key);
|
PrintAndLog("Found valid key: %012"llx" \n", r_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PrintAndLog("Time in darkside: %1.0f seconds", (float)(clock() - time1)/CLOCKS_PER_SEC);
|
||||||
PrintAndLog("");
|
PrintAndLog("");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -662,8 +664,7 @@ int CmdHF14AMfNested(const char *Cmd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // ------------------------------------ multiple sectors working
|
else { // ------------------------------------ multiple sectors working
|
||||||
clock_t time1;
|
clock_t time1 = clock();
|
||||||
time1 = clock();
|
|
||||||
|
|
||||||
e_sector = calloc(SectorsCnt, sizeof(sector));
|
e_sector = calloc(SectorsCnt, sizeof(sector));
|
||||||
if (e_sector == NULL) return 1;
|
if (e_sector == NULL) return 1;
|
||||||
|
@ -733,7 +734,7 @@ int CmdHF14AMfNested(const char *Cmd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Time in nested: %1.3f (%1.3f sec per key)\n\n", ((float)clock() - time1)/CLOCKS_PER_SEC, ((float)clock() - time1)/iterations/CLOCKS_PER_SEC);
|
PrintAndLog("Time in nested: %1.3f (%1.3f sec per key)\n\n", ((float)clock() - time1)/CLOCKS_PER_SEC, ((float)clock() - time1)/iterations/CLOCKS_PER_SEC);
|
||||||
|
|
||||||
PrintAndLog("-----------------------------------------------\nIterations count: %d\n\n", iterations);
|
PrintAndLog("-----------------------------------------------\nIterations count: %d\n\n", iterations);
|
||||||
//print them
|
//print them
|
||||||
|
@ -1083,6 +1084,8 @@ int CmdHF14AMfChk(const char *Cmd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// time
|
||||||
|
time_t time1 = clock();
|
||||||
|
|
||||||
for ( int t = !keyType; t < 2; keyType==2?(t++):(t=2) ) {
|
for ( int t = !keyType; t < 2; keyType==2?(t++):(t=2) ) {
|
||||||
int b=blockNo;
|
int b=blockNo;
|
||||||
|
@ -1105,6 +1108,8 @@ int CmdHF14AMfChk(const char *Cmd)
|
||||||
b<127?(b+=4):(b+=16);
|
b<127?(b+=4):(b+=16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
printf("Time in checkkeys: %1.3f (%1.3f sec per key)\n\n", ((float)clock() - time1)/CLOCKS_PER_SEC, ((float)clock() - time1)/keycnt/CLOCKS_PER_SEC);
|
||||||
|
|
||||||
|
|
||||||
if (transferToEml) {
|
if (transferToEml) {
|
||||||
uint8_t block[16];
|
uint8_t block[16];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue