]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/mifarecmd.c
add support for a new kind Magic Chinese UID changable Mifare Classic card
[proxmark3-svn] / armsrc / mifarecmd.c
index a3d6609db3413a136b6d5415e3296e103f90a28a..36a6e8f5a409556505eaf0384742b073d69815f9 100644 (file)
@@ -1059,10 +1059,7 @@ void MifareCSetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai
                                break;\r
                        };\r
 \r
-                       if(mifare_classic_halt(NULL, cuid)) {\r
-                               if (MF_DBGLEVEL >= 1)   Dbprintf("Halt error");\r
-                               break;\r
-                       };\r
+                       mifare_classic_halt(NULL, cuid);\r
                };\r
        \r
                // reset chip\r
@@ -1079,10 +1076,7 @@ void MifareCSetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai
                                break;\r
                        };\r
 \r
-                       if(mifare_classic_halt(NULL, cuid)) {\r
-                               if (MF_DBGLEVEL >= 1)   Dbprintf("Halt error");\r
-                               break;\r
-                       };\r
+                       mifare_classic_halt(NULL, cuid);\r
                };      \r
 \r
                // write block\r
@@ -1115,10 +1109,7 @@ void MifareCSetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai
                };      \r
        \r
                if (workFlags & 0x04) {\r
-                       if (mifare_classic_halt(NULL, cuid)) {\r
-                               if (MF_DBGLEVEL >= 1)   Dbprintf("Halt error");\r
-                               break;\r
-                       };\r
+                       mifare_classic_halt(NULL, cuid);\r
                }\r
                \r
                isOK = 1;\r
@@ -1192,10 +1183,7 @@ void MifareCGetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai
                memcpy(data, receivedAnswer, 18);\r
                \r
                if (workFlags & 0x04) {\r
-                       if (mifare_classic_halt(NULL, cuid)) {\r
-                               if (MF_DBGLEVEL >= 1)   Dbprintf("Halt error");\r
-                               break;\r
-                       };\r
+                       mifare_classic_halt(NULL, cuid);\r
                }\r
                \r
                isOK = 1;\r
@@ -1222,6 +1210,7 @@ void MifareCIdent(){
        // card commands\r
        uint8_t wupC1[]       = { 0x40 }; \r
        uint8_t wupC2[]       = { 0x43 }; \r
+       uint8_t halt_ret          = 0;\r
        \r
        // variables\r
        byte_t isOK = 1;\r
@@ -1239,7 +1228,8 @@ void MifareCIdent(){
                isOK = 0;\r
        };\r
 \r
-       if (mifare_classic_halt(NULL, 0)) {\r
+       halt_ret = mifare_classic_halt(NULL, 0);\r
+       if (halt_ret && halt_ret != 4) {\r
                isOK = 0;\r
        };\r
 \r
Impressum, Datenschutz