]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
SNF_WUPREQ and SNF_SAK harmonized)
authormerlokk <olegmsn@gmail.com>
Wed, 17 Jan 2018 13:48:01 +0000 (15:48 +0200)
committermerlokk <olegmsn@gmail.com>
Wed, 17 Jan 2018 13:48:01 +0000 (15:48 +0200)
armsrc/mifaresniff.c

index f4879329d5f3e194a03f6f0cce0d5744f9d4a6d4..3929561e1f1b09cc713ff2dcfb8353f6c02eb7af 100644 (file)
@@ -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;
                                memset(sniffUID, 0x00, 8);
                                memset(sniffATQA, 0x00, 2);
                                sniffSAK = 0;
-                               sniffState = SNF_WUPREQ;
+                               sniffState = SNF_ATQA;
                        }
                        break;
                }
                        }
                        break;
                }
-               case SNF_WUPREQ:{
+               case SNF_ATQA:{
                        if ((!reader) && (len == 2)) {          // ATQA from tag
                                memcpy(sniffATQA, data, 2);
                        if ((!reader) && (len == 2)) {          // ATQA from tag
                                memcpy(sniffATQA, data, 2);
-                               sniffState = SNF_ATQA;
+                               sniffState = SNF_UID1;
                        }
                        break;
                }
                        }
                        break;
                }
-               case SNF_ATQA:
                case SNF_UID1:{\r
                case SNF_UID1:{\r
-                       // SNF_ATQA\r
                        if ((reader) && (len == 2) && (data[0] == 0x93) && (data[1] == 0x20)) { // Select ALL from reader
                                sniffState = SNF_ANTICOL1;
                        }\r
                        \r
                        if ((reader) && (len == 2) && (data[0] == 0x93) && (data[1] == 0x20)) { // Select ALL from reader
                                sniffState = SNF_ANTICOL1;
                        }\r
                        \r
-                       // SNF_UID1
                        if ((reader) && (len == 9) && (data[0] == 0x93) && (data[1] == 0x70) && (CheckCrc14443(CRC_14443_A, data, 9))) {   // Select 4 Byte UID from reader\r
                                memcpy(sniffUID + 3, &data[2], 4);\r
                                sniffState = SNF_SAK;\r
                        if ((reader) && (len == 9) && (data[0] == 0x93) && (data[1] == 0x70) && (CheckCrc14443(CRC_14443_A, data, 9))) {   // Select 4 Byte UID from reader\r
                                memcpy(sniffUID + 3, &data[2], 4);\r
                                sniffState = SNF_SAK;\r
Impressum, Datenschutz