]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhf.c
hitag sim fix
[proxmark3-svn] / client / cmdhf.c
index ee0b4fd8c1855f83da631df3476ad46b6de83bbd..cb71b93b4f568367bfce75eba6fa8fd21fe8e6b0 100644 (file)
@@ -8,11 +8,15 @@
 // High frequency commands
 //-----------------------------------------------------------------------------
 
+#include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include "proxmark3.h"
-#include "graph.h"
+#include "util.h"
+#include "data.h"
 #include "ui.h"
+#include "iso14443crc.h"
+#include "cmdmain.h"
 #include "cmdparser.h"
 #include "cmdhf.h"
 #include "cmdhf14a.h"
@@ -669,14 +673,14 @@ int CmdHFSearch(const char *Cmd){
                PrintAndLog("\nValid ISO14443A Tag Found - Quiting Search\n");
                return ans;
        }
-       ans = HF14BInfo(false);
+       ans = HFiClassReader("", false, false);
        if (ans) {
-               PrintAndLog("\nValid ISO14443B Tag Found - Quiting Search\n");
+               PrintAndLog("\nValid iClass Tag (or PicoPass Tag) Found - Quiting Search\n");
                return ans;
        }
-       ans = HFiClassReader("", false, false);
+       ans = HF14BInfo(false);
        if (ans) {
-               PrintAndLog("\nValid iClass Tag (or PicoPass Tag) Found - Quiting Search\n");
+               PrintAndLog("\nValid ISO14443B Tag Found - Quiting Search\n");
                return ans;
        }
        ans = HF15Reader("", false);
@@ -688,9 +692,16 @@ int CmdHFSearch(const char *Cmd){
        return 0;
 }
 
+int CmdHFSnoop(const char *Cmd)
+{
+       char * pEnd;
+       UsbCommand c = {CMD_HF_SNIFFER, {strtol(Cmd, &pEnd,0),strtol(pEnd, &pEnd,0),0}};
+       SendCommand(&c);
+       return 0;
+}
+
 static command_t CommandTable[] = 
 {
-<<<<<<< HEAD
        {"help",        CmdHelp,                1, "This help"},
        {"14a",         CmdHF14A,               1, "{ ISO14443A RFIDs... }"},
        {"14b",         CmdHF14B,               1, "{ ISO14443B RFIDs... }"},
@@ -703,22 +714,9 @@ static command_t CommandTable[] =
        {"topaz",       CmdHFTopaz,             1, "{ TOPAZ (NFC Type 1) RFIDs... }"},
        {"tune",        CmdHFTune,              0, "Continuously measure HF antenna tuning"},
        {"list",        CmdHFList,              1, "List protocol data in trace buffer"},
+       {"search",      CmdHFSearch,    1, "Search for known HF tags [preliminary]"},
+       {"snoop",   CmdHFSnoop,     0, "<samples to skip (10000)> <triggers to skip (1)> Generic HF Snoop"},
        {NULL,          NULL,                   0, NULL}
-=======
-  {"help",        CmdHelp,          1, "This help"},
-  {"14a",         CmdHF14A,         1, "{ ISO14443A RFIDs... }"},
-  {"14b",         CmdHF14B,         1, "{ ISO14443B RFIDs... }"},
-  {"15",          CmdHF15,          1, "{ ISO15693 RFIDs... }"},
-  {"epa",         CmdHFEPA,         1, "{ German Identification Card... }"},
-  {"legic",       CmdHFLegic,       0, "{ LEGIC RFIDs... }"},
-  {"iclass",      CmdHFiClass,      1, "{ ICLASS RFIDs... }"},
-  {"mf",          CmdHFMF,          1, "{ MIFARE RFIDs... }"},
-  {"mfu",         CmdHFMFUltra,     1, "{ MIFARE Ultralight RFIDs... }"},
-  {"tune",        CmdHFTune,        0, "Continuously measure HF antenna tuning"},
-  {"list",        CmdHFList,        1, "List protocol data in trace buffer"},
-  {"search",      CmdHFSearch,      1, "Search for known HF tags [preliminary]"},
-       {NULL, NULL, 0, NULL}
->>>>>>> master
 };
 
 int CmdHF(const char *Cmd)
Impressum, Datenschutz