uint32_t nt = 0, nr = 0;\r
uint64_t par_list = 0, ks_list = 0, r_key = 0;\r
int16_t isOK = 0;\r
-\r
+ int tmpchar; \r
+ \r
UsbCommand c = {CMD_READER_MIFARE, {true, 0, 0}};\r
\r
// message\r
printf("Press button on the proxmark3 device to abort both proxmark3 and client.\n");\r
printf("-------------------------------------------------------------------------\n");\r
\r
- time_t time1 = clock();\r
+ clock_t t = clock();\r
\r
start:\r
clearCommandBuffer();\r
SendCommand(&c);\r
\r
//flush queue\r
- while (ukbhit()) getchar();\r
+ while (ukbhit()) {\r
+ tmpchar = getchar();\r
+ (void)tmpchar;\r
+ }\r
\r
// wait cycle\r
while (true) {\r
printf(".");\r
fflush(stdout);\r
if (ukbhit()) {\r
- getchar();\r
+ tmpchar = getchar();\r
+ (void)tmpchar;\r
printf("\naborted via keyboard!\n");\r
break;\r
}\r
printf("------------------------------------------------------------------\n");\r
PrintAndLog("Found valid key: %012"llx" \n", r_key);\r
}\r
- \r
- PrintAndLog("Time in darkside: %1.0f seconds", (float)(clock() - time1)/CLOCKS_PER_SEC);\r
- PrintAndLog("");\r
+ t = clock() - t;\r
+ //printf("Time in darkside: %d ticks - %1.2f seconds\n", t, ((float)t)/CLOCKS_PER_SEC);\r
+ printf("Time in darkside: %Lf ticks - %1.2Lf seconds\n", (long double)t, ((long double)t)/CLOCKS_PER_SEC);\r
return 0;\r
}\r
\r
}\r
}\r
\r
- 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);\r
+ PrintAndLog("Time in nested: %1.2f (%1.2f sec per key)\n\n", ((float)clock() - time1)/CLOCKS_PER_SEC, ((float)clock() - time1)/iterations/CLOCKS_PER_SEC);\r
\r
PrintAndLog("-----------------------------------------------\nIterations count: %d\n\n", iterations);\r
//print them\r
}\r
}\r
// time\r
- time_t time1 = clock();\r
+ clock_t time1 = clock();\r
\r
for ( int t = !keyType; t < 2; keyType==2?(t++):(t=2) ) {\r
int b=blockNo;\r
bool wantSaveToEmlFile = 0;\r
\r
//var \r
+ int tmpchar;\r
int res = 0;\r
int len = 0;\r
int blockLen = 0;\r
printf(".");\r
fflush(stdout);\r
if (ukbhit()) {\r
- getchar();\r
+ tmpchar = getchar();\r
+ (void)tmpchar;\r
printf("\naborted via keyboard!\n");\r
break;\r
}\r
char buf[9];\r
char filename[FILE_PATH_SIZE]={0};\r
int keycnt = 0;\r
+ int c;\r
uint8_t stKeyBlock = 20;\r
uint8_t *keyBlock = NULL, *p = NULL;\r
keyBlock = calloc(stKeyBlock, 6);\r
for (uint16_t c = 0; c < keycnt; ++c ) {\r
\r
if (ukbhit()) {\r
- getchar();\r
+ c = getchar();\r
+ (void)c;\r
printf("\naborted via keyboard!\n");\r
free(keyBlock);\r
return 0;\r
printf(".");\r
fflush(stdout);\r
if (ukbhit()) {\r
- getchar();\r
+ c = getchar();\r
+ (void)c;\r
printf("\naborted via keyboard!\n");\r
free(keyBlock);\r
return 0;\r