]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/appmain.c
CHG: a message..
[proxmark3-svn] / armsrc / appmain.c
index 3eac2580d4d43b1455150b1b89f62272d8c72d68..3ba9dd68eb3b9ff8c4eb00a9aa5e166313fc7805 100644 (file)
@@ -596,21 +596,25 @@ void StandAloneMode14a()
                                                        Dbprintf("Simulating ISO14443a tag with uid: %08x [Bank: %u]", tmpuid & 0xFFFFFFFF , selected);
                                                }
                                                
-                                               if (uids[selected].sak == 8 && uids[selected].atqa[0] == 4 && uids[selected].atqa[1] == 0) {
-                                                       DbpString("Mifare Classic");
-                                                       SimulateIso14443aTag(1, flags, data); // Mifare Classic
-                                               }
-                                               else if (uids[selected].sak == 0 && uids[selected].atqa[0] == 0x44 && uids[selected].atqa[1] == 0) {
+                                               if (uids[selected].sak == 0x08 && uids[selected].atqa[0] == 0x04 && uids[selected].atqa[1] == 0) {
+                                                       DbpString("Mifare Classic 1k");
+                                                       SimulateIso14443aTag(1, flags, data);
+                                               } else if (uids[selected].sak == 0x18 && uids[selected].atqa[0] == 0x02 && uids[selected].atqa[1] == 0) {
+                                                       DbpString("Mifare Classic 4k (4b uid)");
+                                                       SimulateIso14443aTag(8, flags, data);
+                                               } else if (uids[selected].sak == 0x08 && uids[selected].atqa[0] == 0x44 && uids[selected].atqa[1] == 0) {
+                                                       DbpString("Mifare Classic 4k (7b uid)");
+                                                       SimulateIso14443aTag(8, flags, data);
+                                               } else if (uids[selected].sak == 0x00 && uids[selected].atqa[0] == 0x44 && uids[selected].atqa[1] == 0) {
                                                        DbpString("Mifare Ultralight");
-                                                       SimulateIso14443aTag(2, flags, data); // Mifare Ultralight
-                                               }
-                                               else if (uids[selected].sak == 20 && uids[selected].atqa[0] == 0x44 && uids[selected].atqa[1] == 3) {
+                                                       SimulateIso14443aTag(2, flags, data);
+                                               } else if (uids[selected].sak == 0x20 && uids[selected].atqa[0] == 0x04 && uids[selected].atqa[1] == 0x03) {
                                                        DbpString("Mifare DESFire");
-                                                       SimulateIso14443aTag(3, flags, data); // Mifare DESFire
+                                                       SimulateIso14443aTag(3, flags, data);
                                                }
                                                else {
                                                        Dbprintf("Unrecognized tag type -- defaulting to Mifare Classic emulation");
-                                                       SimulateIso14443aTag(1, flags, data); // Mifare Classic
+                                                       SimulateIso14443aTag(1, flags, data);
                                                }
                                        }
                                        else if (button_action == BUTTON_SINGLE_CLICK) {
@@ -1001,10 +1005,10 @@ void UsbPacketReceived(uint8_t *packet, int len)
                        WritePCF7931(c->d.asBytes[0],c->d.asBytes[1],c->d.asBytes[2],c->d.asBytes[3],c->d.asBytes[4],c->d.asBytes[5],c->d.asBytes[6], c->d.asBytes[9], c->d.asBytes[7]-128,c->d.asBytes[8]-128, c->arg[0], c->arg[1], c->arg[2]);
                        break;
                case CMD_EM4X_READ_WORD:
-                       EM4xReadWord(c->arg[1], c->arg[2],c->d.asBytes[0]);
+                       EM4xReadWord(c->arg[0], c->arg[1], c->arg[2]);
                        break;
                case CMD_EM4X_WRITE_WORD:
-                       EM4xWriteWord(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes[0]);
+                       EM4xWriteWord(c->arg[0], c->arg[1], c->arg[2]);
                        break;
                case CMD_AWID_DEMOD_FSK: // Set realtime AWID demodulation
                        CmdAWIDdemodFSK(c->arg[0], 0, 0, 1);
@@ -1013,7 +1017,7 @@ void UsbPacketReceived(uint8_t *packet, int len)
                        CopyVikingtoT55xx(c->arg[0], c->arg[1], c->arg[2]);
             break;
                case CMD_COTAG:
-                       Cotag();
+                       Cotag(c->arg[0]);
                        break;
 #endif
 
@@ -1224,6 +1228,7 @@ void UsbPacketReceived(uint8_t *packet, int len)
             break;
         case CMD_EMV_DUMP_CARD:
             EMVdumpcard();
+                       break;
 #endif
 #ifdef WITH_ICLASS
                // Makes use of ISO14443a FPGA Firmware
Impressum, Datenschutz