]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/mifarecmd.c
ADD: started with adding a LF AWID26 write function. not done yet.
[proxmark3-svn] / armsrc / mifarecmd.c
index 519ea2b052e0b709889f3623edb5014033e7d5f5..b9b8098a403c1d346858f42cdc1fa9f781d82c9a 100644 (file)
@@ -20,7 +20,7 @@
 #include "../common/crc.h"\r
 \r
 //-----------------------------------------------------------------------------\r
-// Select, Authenticaate, Read an MIFARE tag. \r
+// Select, Authenticate, Read a MIFARE tag. \r
 // read block\r
 //-----------------------------------------------------------------------------\r
 void MifareReadBlock(uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain)\r
@@ -267,25 +267,25 @@ void MifareReadSector(uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain)
 \r
 void MifareUReadCard(uint8_t arg0, int arg1, uint8_t *datain)\r
 {\r
-  // params\r
-        uint8_t sectorNo = arg0;\r
-        int Pages=arg1;\r
+       // params\r
+       uint8_t sectorNo = arg0;\r
+       int Pages=arg1;\r
        int count_Pages=0;\r
-        // variables\r
-        byte_t isOK = 0;\r
-        byte_t dataoutbuf[44 * 4];\r
-        uint8_t uid[10];\r
-        uint32_t cuid;\r
+       // variables\r
+       byte_t isOK = 0;\r
+       byte_t dataoutbuf[176];\r
+       uint8_t uid[10];\r
+       uint32_t cuid;\r
 \r
-        // clear trace\r
-        iso14a_clear_trace();\r
+       // clear trace\r
+       iso14a_clear_trace();\r
 \r
-               iso14443a_setup(FPGA_HF_ISO14443A_READER_LISTEN);\r
+       iso14443a_setup(FPGA_HF_ISO14443A_READER_LISTEN);\r
 \r
-        LED_A_ON();\r
-        LED_B_OFF();\r
-        LED_C_OFF();\r
-        Dbprintf("Pages %d",Pages);\r
+       LED_A_ON();\r
+       LED_B_OFF();\r
+       LED_C_OFF();\r
+       Dbprintf("Pages %d",Pages);\r
         while (true) {\r
                 if(!iso14443a_select_card(uid, NULL, &cuid)) {\r
                 if (MF_DBGLEVEL >= 1)   Dbprintf("Can't select card");\r
@@ -307,8 +307,8 @@ void MifareUReadCard(uint8_t arg0, int arg1, uint8_t *datain)
                 isOK = 1;\r
                 break;\r
         }\r
-        Dbprintf("Pages read %d",count_Pages);\r
-        if (MF_DBGLEVEL >= 2) DbpString("READ CARD FINISHED");\r
+       Dbprintf("Pages read %d",count_Pages);\r
+       if (MF_DBGLEVEL >= 2) DbpString("READ CARD FINISHED");\r
 \r
         LED_B_ON();\r
        if (Pages==16) cmd_send(CMD_ACK,isOK,0,0,dataoutbuf,64);\r
@@ -316,9 +316,9 @@ void MifareUReadCard(uint8_t arg0, int arg1, uint8_t *datain)
        if (Pages==44 && count_Pages>16) cmd_send(CMD_ACK,isOK,0,0,dataoutbuf,176);\r
         LED_B_OFF();\r
 \r
-        // Thats it...\r
-        FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);\r
-        LEDsoff();\r
+       // Thats it...\r
+       FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);\r
+       LEDsoff();\r
 \r
 }\r
 \r
@@ -792,7 +792,6 @@ void MifareChkKeys(uint8_t arg0, uint8_t arg1, uint8_t arg2, uint8_t *datain)
     cmd_send(CMD_ACK,isOK,0,0,datain + i * 6,6);\r
        LED_B_OFF();\r
 \r
-  // Thats it...\r
        FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);\r
        LEDsoff();\r
 \r
@@ -1127,7 +1126,6 @@ void MifareCGetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai
        LED_B_OFF();\r
 \r
        if ((workFlags & 0x10) || (!isOK)) {\r
-               // Thats it...\r
                FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);\r
                LEDsoff();\r
        }\r
Impressum, Datenschutz