]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/mifarehost.c
appveyor.yml. display return values (#451)
[proxmark3-svn] / client / mifarehost.c
index a02019a316cbc52f6cbbe4cad8cea733c409f8f8..fe1a8edbab7b15b360285cf2d2713ad39881ccad 100644 (file)
@@ -540,36 +540,12 @@ int mfCSetUID(uint8_t *uid, uint8_t *atqa, uint8_t *sak, uint8_t *oldUID) {
        return 0;\r
 }\r
 \r
        return 0;\r
 }\r
 \r
-int mfCIdentify()\r
-{\r
-       UsbCommand c = {CMD_READER_ISO_14443a, {ISO14A_CONNECT | ISO14A_NO_DISCONNECT, 0, 0}};\r
+int mfCIdentify() {\r
+       UsbCommand c = {CMD_MIFARE_CIDENT, {0, 0, 0}};\r
        SendCommand(&c);\r
        SendCommand(&c);\r
-\r
        UsbCommand resp;\r
        WaitForResponse(CMD_ACK,&resp);\r
 \r
        UsbCommand resp;\r
        WaitForResponse(CMD_ACK,&resp);\r
 \r
-       // iso14a_card_select_t card;\r
-       // memcpy(&card, (iso14a_card_select_t *)resp.d.asBytes, sizeof(iso14a_card_select_t));\r
-\r
-       // uint64_t select_status = resp.arg[0];                // 0: couldn't read, 1: OK, with ATS, 2: OK, no ATS, 3: proprietary Anticollision\r
-\r
-       // if(select_status != 0) {\r
-               // uint8_t rats[] = { 0xE0, 0x80 }; // FSDI=8 (FSD=256), CID=0\r
-               // c.arg[0] = ISO14A_RAW | ISO14A_APPEND_CRC | ISO14A_NO_DISCONNECT;\r
-               // c.arg[1] = 2;\r
-               // c.arg[2] = 0;\r
-               // memcpy(c.d.asBytes, rats, 2);\r
-               // SendCommand(&c);\r
-               // WaitForResponse(CMD_ACK,&resp);\r
-       // }\r
-\r
-       c.cmd = CMD_MIFARE_CIDENT;\r
-       c.arg[0] = 0;\r
-       c.arg[1] = 0;\r
-       c.arg[2] = 0;\r
-       SendCommand(&c);\r
-       WaitForResponse(CMD_ACK,&resp);\r
-\r
        uint8_t isGeneration = resp.arg[0] & 0xff;\r
        switch( isGeneration ){\r
                case 1: PrintAndLog("Chinese magic backdoor commands (GEN 1a) detected"); break;\r
        uint8_t isGeneration = resp.arg[0] & 0xff;\r
        switch( isGeneration ){\r
                case 1: PrintAndLog("Chinese magic backdoor commands (GEN 1a) detected"); break;\r
@@ -577,13 +553,6 @@ int mfCIdentify()
                default: PrintAndLog("No chinese magic backdoor command detected"); break;\r
        }\r
 \r
                default: PrintAndLog("No chinese magic backdoor command detected"); break;\r
        }\r
 \r
-       // disconnect\r
-       c.cmd = CMD_READER_ISO_14443a;\r
-       c.arg[0] = 0;\r
-       c.arg[1] = 0;\r
-       c.arg[2] = 0;\r
-       SendCommand(&c);\r
-\r
        return (int) isGeneration;\r
 }\r
 \r
        return (int) isGeneration;\r
 }\r
 \r
Impressum, Datenschutz