]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/mifarehost.c
Add ROCA vulnerability test (RRG repository PR 76 by @merlokk) (#762)
[proxmark3-svn] / client / mifarehost.c
index e1ced176580166a7e7015418e8c8463e6fe7c549..9be04b4d6f0d7611520e05e58a73be800d393fdc 100644 (file)
@@ -16,7 +16,7 @@
 #include <pthread.h>\r
 \r
 #include "crapto1/crapto1.h"\r
-#include "proxmark3.h"\r
+#include "comms.h"\r
 #include "usb_cmd.h"\r
 #include "cmdmain.h"\r
 #include "ui.h"\r
@@ -328,7 +328,7 @@ int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo,
        struct Crypto1State *p1, *p2, *p3, *p4;\r
 \r
        // flush queue\r
-       WaitForResponseTimeout(CMD_ACK, NULL, 100);\r
+       (void)WaitForResponseTimeout(CMD_ACK,NULL,100);\r
 \r
        UsbCommand c = {CMD_MIFARE_NESTED, {blockNo + keyType * 0x100, trgBlockNo + trgKeyType * 0x100, calibrate}};\r
        memcpy(c.d.asBytes, key, 6);\r
@@ -910,6 +910,7 @@ int mfTraceDecode(uint8_t *data_src, int len, uint8_t parity, bool wantSaveToEml
                                        uint32_t nr1 = crypto1_word(pcs, nr_enc, 1) ^ nr_enc;\r
                                        uint32_t ar1 = crypto1_word(pcs, 0, 0) ^ ar_enc;\r
                                        uint32_t at1 = crypto1_word(pcs, 0, 0) ^ at_enc;\r
+                                       crypto1_destroy(pcs);\r
                                        printf("key> the same key test. nr1: %08x ar1: %08x at1: %08x \n", nr1, ar1, at1);\r
 \r
                                        if (NTParityCheck(nt1))\r
Impressum, Datenschutz