]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/appmain.c
fix 'hf iclass snoop'
[proxmark3-svn] / armsrc / appmain.c
index 5169383ee20112af9f9e3d93a83f3188a7abde72..589f394d5cea78de9106402f1b46499644fd09c5 100644 (file)
 #include "legicrfsim.h"
 #include "hitag2.h"
 #include "hitagS.h"
+#include "iclass.h"
 #include "iso14443b.h"
 #include "iso15693.h"
 #include "lfsampling.h"
 #include "BigBuf.h"
+#include "mifarecmd.h"
 #include "mifareutil.h"
 #include "mifaresim.h"
 #include "pcf7931.h"
@@ -996,7 +998,7 @@ void UsbPacketReceived(uint8_t *packet, int len)
        switch(c->cmd) {
 #ifdef WITH_LF
                case CMD_SET_LF_SAMPLING_CONFIG:
-                       setSamplingConfig((sample_config *) c->d.asBytes);
+                       setSamplingConfig(c->d.asBytes);
                        break;
                case CMD_ACQUIRE_RAW_ADC_SAMPLES_125K:
                        cmd_send(CMD_ACK,SampleLF(c->arg[0], c->arg[1]),0,0,0,0);
@@ -1140,7 +1142,7 @@ void UsbPacketReceived(uint8_t *packet, int len)
                        break;
                        
                case CMD_SNOOP_ISO_15693:
-                       SnoopIso15693();
+                       SnoopIso15693(0, NULL);
                        break;
                        
                case CMD_ISO_15693_COMMAND:
@@ -1158,9 +1160,14 @@ void UsbPacketReceived(uint8_t *packet, int len)
                case CMD_READER_ISO_15693:
                        ReaderIso15693(c->arg[0]);
                        break;
+
                case CMD_SIMTAG_ISO_15693:
                        SimTagIso15693(c->arg[0], c->d.asBytes);
                        break;
+
+               case CMD_CSETUID_ISO_15693:
+                       SetTag15693Uid(c->d.asBytes);
+                       break;
 #endif
 
 #ifdef WITH_LEGICRF
@@ -1237,6 +1244,9 @@ void UsbPacketReceived(uint8_t *packet, int len)
                case CMD_MIFARE_WRITEBL:
                        MifareWriteBlock(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
                        break;
+               case CMD_MIFARE_PERSONALIZE_UID:
+                       MifarePersonalizeUID(c->arg[0], c->arg[1], c->d.asBytes);
+                       break;
                //case CMD_MIFAREU_WRITEBL_COMPAT:
                        //MifareUWriteBlockCompat(c->arg[0], c->d.asBytes);
                        //break;
@@ -1297,7 +1307,7 @@ void UsbPacketReceived(uint8_t *packet, int len)
 #ifdef WITH_ICLASS
                // Makes use of ISO14443a FPGA Firmware
                case CMD_SNOOP_ICLASS:
-                       SnoopIClass();
+                       SnoopIClass(c->arg[0], c->d.asBytes);
                        break;
                case CMD_SIMULATE_TAG_ICLASS:
                        SimulateIClass(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
@@ -1314,14 +1324,14 @@ void UsbPacketReceived(uint8_t *packet, int len)
                case CMD_ICLASS_WRITEBLOCK:
                        iClass_WriteBlock(c->arg[0], c->d.asBytes);
                        break;
-               case CMD_ICLASS_READCHECK:  // auth step 1
-                       iClass_ReadCheck(c->arg[0], c->arg[1]);
-                       break;
                case CMD_ICLASS_READBLOCK:
                        iClass_ReadBlk(c->arg[0]);
                        break;
-               case CMD_ICLASS_AUTHENTICATION: //check
-                       iClass_Authentication(c->d.asBytes);
+               case CMD_ICLASS_CHECK:
+                       iClass_Check(c->d.asBytes);
+                       break;
+               case CMD_ICLASS_READCHECK:
+                       iClass_Readcheck(c->arg[0], c->arg[1]);
                        break;
                case CMD_ICLASS_DUMP:
                        iClass_Dump(c->arg[0], c->arg[1]);
Impressum, Datenschutz