]>
cvs.zerfleddert.de Git - proxmark3-svn/blob - client/cmdmain.c
1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
4 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
5 // at your option, any later version. See the LICENSE.txt file for the text of
7 //-----------------------------------------------------------------------------
8 // Main command parser entry point
9 //-----------------------------------------------------------------------------
18 #include "cmdparser.h"
19 #include "proxmark3.h"
27 #include "util_posix.h"
28 #include "cmdscript.h"
29 #include "emv/cmdemv.h" // EMV
31 #include "cmdsmartcard.h"
34 static int CmdHelp(const char *Cmd
);
35 static int CmdQuit(const char *Cmd
);
38 static command_t CommandTable
[] =
40 {"help", CmdHelp
, 1, "This help. Use '<command> help' for details of a particular command."},
41 {"data", CmdData
, 1, "{ Plot window / data buffer manipulation... }"},
42 {"hf", CmdHF
, 1, "{ High Frequency commands... }"},
43 {"hw", CmdHW
, 1, "{ Hardware commands... }"},
44 {"lf", CmdLF
, 1, "{ Low Frequency commands... }"},
46 {"emv", CmdEMV
, 1, "{ EMV iso14443 and iso7816... }"},
47 {"sc", CmdSmartcard
,1,"{ Smartcard commands... }"},
49 {"emv", CmdEMV
, 1, "{ EMV iso14443 }"},
51 {"script",CmdScript
,1, "{ Scripting commands }"},
52 {"quit", CmdQuit
, 1, "Exit program"},
53 {"exit", CmdQuit
, 1, "Exit program"},
57 command_t
* getTopLevelCommandTable()
62 static int CmdHelp(const char *Cmd
)
64 CmdsHelp(CommandTable
);
68 static int CmdQuit(const char *Cmd
)
73 //-----------------------------------------------------------------------------
74 // Entry point into our code: called whenever the user types a command and
75 // then presses Enter, which the full command line that they typed.
76 //-----------------------------------------------------------------------------
77 int CommandReceived(char *Cmd
) {
78 return CmdsParse(CommandTable
, Cmd
);