1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
5 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
6 // at your option, any later version. See the LICENSE.txt file for the text of
8 //-----------------------------------------------------------------------------
9 // High frequency commands
10 //-----------------------------------------------------------------------------
17 #include "cmdparser.h"
22 #include "cmdhflegic.h"
23 #include "cmdhficlass.h"
27 #include "cmdhftopaz.h"
28 #include "cmdhflist.h"
29 #include "cmdhffido.h"
31 static int CmdHelp(const char *Cmd
);
33 int CmdHFTune(const char *Cmd
)
35 UsbCommand c
={CMD_MEASURE_ANTENNA_TUNING_HF
};
40 int CmdHFSearch(const char *Cmd
){
43 ans
= CmdHF14AInfo("s");
45 PrintAndLog("\nValid ISO14443A Tag Found - Quiting Search\n");
48 ans
= HFiClassReader("", false, false);
50 PrintAndLog("\nValid iClass Tag (or PicoPass Tag) Found - Quiting Search\n");
53 ans
= HF15Reader("", false);
55 PrintAndLog("\nValid ISO15693 Tag Found - Quiting Search\n");
58 //14b is longest test currently (and rarest chip type) ... put last
59 ans
= HF14BInfo(false);
61 PrintAndLog("\nValid ISO14443B Tag Found - Quiting Search\n");
64 PrintAndLog("\nno known/supported 13.56 MHz tags found\n");
68 int CmdHFSnoop(const char *Cmd
)
71 UsbCommand c
= {CMD_HF_SNIFFER
, {strtol(Cmd
, &pEnd
,0),strtol(pEnd
, &pEnd
,0),0}};
76 static command_t CommandTable
[] =
78 {"help", CmdHelp
, 1, "This help"},
79 {"14a", CmdHF14A
, 1, "{ ISO14443A RFIDs... }"},
80 {"14b", CmdHF14B
, 1, "{ ISO14443B RFIDs... }"},
81 {"15", CmdHF15
, 1, "{ ISO15693 RFIDs... }"},
82 {"epa", CmdHFEPA
, 1, "{ German Identification Card... }"},
83 {"legic", CmdHFLegic
, 0, "{ LEGIC RFIDs... }"},
84 {"iclass", CmdHFiClass
, 1, "{ ICLASS RFIDs... }"},
85 {"mf", CmdHFMF
, 1, "{ MIFARE RFIDs... }"},
86 {"mfu", CmdHFMFUltra
, 1, "{ MIFARE Ultralight RFIDs... }"},
87 {"mfp", CmdHFMFP
, 1, "{ MIFARE Plus RFIDs... }"},
88 {"topaz", CmdHFTopaz
, 1, "{ TOPAZ (NFC Type 1) RFIDs... }"},
89 {"fido", CmdHFFido
, 1, "{ FIDO and FIDO2 authenticators... }"},
90 {"tune", CmdHFTune
, 0, "Continuously measure HF antenna tuning"},
91 {"list", CmdHFList
, 1, "List protocol data in trace buffer"},
92 {"search", CmdHFSearch
, 1, "Search for known HF tags [preliminary]"},
93 {"snoop", CmdHFSnoop
, 0, "<samples to skip (10000)> <triggers to skip (1)> Generic HF Snoop"},
97 int CmdHF(const char *Cmd
)
99 CmdsParse(CommandTable
, Cmd
);
103 int CmdHelp(const char *Cmd
)
105 CmdsHelp(CommandTable
);