]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/mifarehost.c
CHG: Updated the CHANGELOG.md
[proxmark3-svn] / client / mifarehost.c
index 916fba8f28fd1a6784f2e8bd867af424ddd8a503..4e9ac539d40323e7e849c7b6d98a7d54eedc588b 100644 (file)
@@ -66,10 +66,8 @@ typedef
 // wrapper function for multi-threaded lfsr_recovery32\r
 void* nested_worker_thread(void *arg)\r
 {\r
-       clock_t t1 = clock();\r
        struct Crypto1State *p1;\r
        StateList_t *statelist = arg;\r
-\r
        statelist->head.slhead = lfsr_recovery32(statelist->ks1, statelist->nt ^ statelist->uid);       \r
        \r
        for (p1 = statelist->head.slhead; *(uint64_t *)p1 != 0; p1++);\r
@@ -77,10 +75,6 @@ void* nested_worker_thread(void *arg)
        statelist->len = p1 - statelist->head.slhead;\r
        statelist->tail.sltail = --p1;\r
        qsort(statelist->head.slhead, statelist->len, sizeof(uint64_t), Compare16Bits);\r
-       \r
-       \r
-       t1 = clock() - t1;\r
-       printf("lfsr_recovery32 takes %.0f ticks \n", (float)t1);\r
        return statelist->head.slhead;\r
 }\r
 \r
@@ -192,7 +186,6 @@ int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t * key, uint8_t trgBlockNo
        // uint32_t max_keys = keycnt > (USB_CMD_DATA_SIZE/6) ? (USB_CMD_DATA_SIZE/6) : keycnt;\r
        uint8_t keyBlock[USB_CMD_DATA_SIZE] = {0x00};\r
 \r
-       clock_t t1 = clock();\r
        for (i = 0; i < numOfCandidates; ++i){\r
                crypto1_get_lfsr(statelists[0].head.slhead + i, &key64);\r
                num_to_bytes(key64, 6, keyBlock + i * 6);\r
@@ -203,9 +196,6 @@ int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t * key, uint8_t trgBlockNo
                free(statelists[1].head.slhead);\r
                num_to_bytes(key64, 6, resultKey);\r
 \r
-               t1 = clock() - t1;\r
-               printf("Check candidates takes %.0f ticks \n", (float)t1);      \r
-               \r
                PrintAndLog("UID: %08x target block:%3u key type: %c  -- Found key [%012"llx"]",\r
                        uid,\r
                        (uint16_t)resp.arg[2] & 0xff,\r
@@ -235,7 +225,7 @@ int mfCheckKeys (uint8_t blockNo, uint8_t keyType, bool clear_trace, uint8_t key
        clearCommandBuffer();\r
        SendCommand(&c);\r
        UsbCommand resp;\r
-       if (!WaitForResponseTimeout(CMD_ACK,&resp, 3000)) return 1;\r
+       if (!WaitForResponseTimeout(CMD_ACK,&resp, 2500)) return 1;\r
        if ((resp.arg[0] & 0xff) != 0x01) return 2;\r
        *key = bytes_to_num(resp.d.asBytes, 6);\r
        return 0;\r
Impressum, Datenschutz