From 543a6ed3c99fb1f1324b25d7d2132133dce904dc Mon Sep 17 00:00:00 2001 From: merlokk Date: Wed, 17 Jan 2018 15:48:01 +0200 Subject: [PATCH] SNF_WUPREQ and SNF_SAK harmonized) --- armsrc/mifaresniff.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/armsrc/mifaresniff.c b/armsrc/mifaresniff.c index f4879329..3929561e 100644 --- a/armsrc/mifaresniff.c +++ b/armsrc/mifaresniff.c @@ -59,25 +59,22 @@ bool RAMFUNC MfSniffLogic(const uint8_t *data, uint16_t len, uint8_t *parity, ui memset(sniffUID, 0x00, 8); memset(sniffATQA, 0x00, 2); sniffSAK = 0; - sniffState = SNF_WUPREQ; + sniffState = SNF_ATQA; } break; } - case SNF_WUPREQ:{ + case SNF_ATQA:{ if ((!reader) && (len == 2)) { // ATQA from tag memcpy(sniffATQA, data, 2); - sniffState = SNF_ATQA; + sniffState = SNF_UID1; } break; } - case SNF_ATQA: case SNF_UID1:{ - // SNF_ATQA if ((reader) && (len == 2) && (data[0] == 0x93) && (data[1] == 0x20)) { // Select ALL from reader sniffState = SNF_ANTICOL1; } - // SNF_UID1 if ((reader) && (len == 9) && (data[0] == 0x93) && (data[1] == 0x70) && (CheckCrc14443(CRC_14443_A, data, 9))) { // Select 4 Byte UID from reader memcpy(sniffUID + 3, &data[2], 4); sniffState = SNF_SAK; -- 2.39.5