]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/mifarehost.c
MAJOR update, added hitag2 reader, emulation and eavesdropping, lots of new code...
[proxmark3-svn] / client / mifarehost.c
index 70d2413a856936ccd38f5f314589f1ec2de3e6fc..f34759df80b6343cd1be1de0cf7dc111a20cdcd4 100644 (file)
@@ -295,9 +295,12 @@ uint32_t ks3;
 \r
 uint32_t uid;     // serial number\r
 uint32_t nt;      // tag challenge\r
+uint32_t nt_par; \r
 uint32_t nr_enc;  // encrypted reader challenge\r
 uint32_t ar_enc;  // encrypted reader response\r
+uint32_t nr_ar_par; \r
 uint32_t at_enc;  // encrypted tag response\r
+uint32_t at_par; \r
 \r
 int isTraceCardEmpty(void) {\r
        return ((traceCard[0] == 0) && (traceCard[1] == 0) && (traceCard[2] == 0) && (traceCard[3] == 0));\r
@@ -401,7 +404,7 @@ void mf_crypto1_decrypt(struct Crypto1State *pcs, uint8_t *data, int len, bool i
 }\r
 \r
 \r
-int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) {\r
+int mfTraceDecode(uint8_t *data_src, int len, uint32_t parity, bool wantSaveToEmlFile) {\r
        uint8_t data[64];\r
 \r
        if (traceState == TRACE_ERROR) return 1;\r
@@ -504,6 +507,7 @@ int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) {
                        traceState = TRACE_AUTH2;\r
 \r
                        nt = bytes_to_num(data, 4);\r
+                       nt_par = parity;\r
                        return 0;\r
                } else {\r
                        traceState = TRACE_ERROR;\r
@@ -517,6 +521,7 @@ int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) {
 \r
                        nr_enc = bytes_to_num(data, 4);\r
                        ar_enc = bytes_to_num(data + 4, 4);\r
+                       nr_ar_par = parity;\r
                        return 0;\r
                } else {\r
                        traceState = TRACE_ERROR;\r
@@ -529,6 +534,7 @@ int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) {
                        traceState = TRACE_IDLE;\r
 \r
                        at_enc = bytes_to_num(data, 4);\r
+                       at_par = parity;\r
                        \r
                        //  decode key here)\r
                        if (!traceCrypto1) {\r
Impressum, Datenschutz