X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/8b6a93df9152de16e16fd4158775954228245613..db09cb3adbe715b058a64357184e4963a8b6d78e:/client/mifarehost.c diff --git a/client/mifarehost.c b/client/mifarehost.c index 70d2413a..f34759df 100644 --- a/client/mifarehost.c +++ b/client/mifarehost.c @@ -295,9 +295,12 @@ uint32_t ks3; uint32_t uid; // serial number uint32_t nt; // tag challenge +uint32_t nt_par; uint32_t nr_enc; // encrypted reader challenge uint32_t ar_enc; // encrypted reader response +uint32_t nr_ar_par; uint32_t at_enc; // encrypted tag response +uint32_t at_par; int isTraceCardEmpty(void) { return ((traceCard[0] == 0) && (traceCard[1] == 0) && (traceCard[2] == 0) && (traceCard[3] == 0)); @@ -401,7 +404,7 @@ void mf_crypto1_decrypt(struct Crypto1State *pcs, uint8_t *data, int len, bool i } -int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) { +int mfTraceDecode(uint8_t *data_src, int len, uint32_t parity, bool wantSaveToEmlFile) { uint8_t data[64]; if (traceState == TRACE_ERROR) return 1; @@ -504,6 +507,7 @@ int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) { traceState = TRACE_AUTH2; nt = bytes_to_num(data, 4); + nt_par = parity; return 0; } else { traceState = TRACE_ERROR; @@ -517,6 +521,7 @@ int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) { nr_enc = bytes_to_num(data, 4); ar_enc = bytes_to_num(data + 4, 4); + nr_ar_par = parity; return 0; } else { traceState = TRACE_ERROR; @@ -529,6 +534,7 @@ int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) { traceState = TRACE_IDLE; at_enc = bytes_to_num(data, 4); + at_par = parity; // decode key here) if (!traceCrypto1) {