From f7887fa82efb7a30b9a572bb2f379b90e62fde6a Mon Sep 17 00:00:00 2001 From: merlokk Date: Wed, 17 Jan 2018 16:01:56 +0200 Subject: [PATCH] added magic cards --- armsrc/mifaresniff.c | 7 +++++++ armsrc/mifaresniff.h | 1 + 2 files changed, 8 insertions(+) diff --git a/armsrc/mifaresniff.c b/armsrc/mifaresniff.c index 20b54e82..4e573be7 100644 --- a/armsrc/mifaresniff.c +++ b/armsrc/mifaresniff.c @@ -60,9 +60,16 @@ bool RAMFUNC MfSniffLogic(const uint8_t *data, uint16_t len, uint8_t *parity, ui memset(sniffATQA, 0x00, 2); sniffSAK = 0; sniffState = SNF_ATQA; + if (data[0] == 0x40) + sniffState = SNF_MAGIC_WUPC2; } break; } + case SNF_MAGIC_WUPC2: + if ((len == 1) && (reader) && (data[0] == 0x43) ) { + sniffState = SNF_CARD_IDLE; + } + break; case SNF_ATQA:{ if ((!reader) && (len == 2)) { // ATQA from tag memcpy(sniffATQA, data, 2); diff --git a/armsrc/mifaresniff.h b/armsrc/mifaresniff.h index 8a8e31a9..b181f982 100644 --- a/armsrc/mifaresniff.h +++ b/armsrc/mifaresniff.h @@ -27,6 +27,7 @@ #define SNF_CARD_IDLE 9 #define SNF_CARD_CMD 10 #define SNF_CARD_RESP 11 +#define SNF_MAGIC_WUPC2 12 #define SNF_UID_4 0 #define SNF_UID_7 0 -- 2.39.5