mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-21 07:46:12 +08:00
cliparser cleaning
checked cmdhf.c and cmddata.c and tweaked cliparser.c
This commit is contained in:
parent
38358e2e2a
commit
561c5f779e
|
@ -77,7 +77,7 @@ int CLIParserParseArg(CLIParserContext *ctx, int argc, char **argv, void *vargta
|
|||
|
||||
PrintAndLogEx(NORMAL,"");
|
||||
if (ctx->programHelp) {
|
||||
PrintAndLogEx(NORMAL,_SectionTagColor_("examples:"));
|
||||
PrintAndLogEx(NORMAL,_SectionTagColor_("examples/notes:"));
|
||||
char *buf = NULL;
|
||||
int idx = 0;
|
||||
buf = realloc (buf,strlen (ctx->programHelp)+1); // more then enough as we are splitting
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <stdlib.h>
|
||||
#include "util.h"
|
||||
|
||||
#define arg_param_begin arg_lit0("hH", "help", "This help")
|
||||
#define arg_param_begin arg_lit0("h", "help", "This help")
|
||||
#define arg_param_end arg_end(20)
|
||||
|
||||
#define arg_getsize(a) (sizeof(a) / sizeof(a[0]))
|
||||
|
|
|
@ -2264,15 +2264,14 @@ static int CmdDataNDEF(const char *Cmd) {
|
|||
CLIParserContext *ctx;
|
||||
CLIParserInit(&ctx, "data ndef",
|
||||
"Decode and print NFC Data Exchange Format (NDEF)",
|
||||
"Samples:\n"
|
||||
_YELLOW_("\tdata ndef -d 9101085402656e48656c6c6f5101085402656e576f726c64\n")
|
||||
_YELLOW_("\tdata ndef -d 0103d020240203e02c040300fe\n")
|
||||
"data ndef -d 9101085402656e48656c6c6f5101085402656e576f726c64\n"
|
||||
"data ndef -d 0103d020240203e02c040300fe\n"
|
||||
);
|
||||
|
||||
void *argtable[] = {
|
||||
arg_param_begin,
|
||||
arg_strx0("dD", "data", "<hex>", "NDEF data to decode"),
|
||||
arg_lit0("vV", "verbose", "verbose mode"),
|
||||
arg_strx0("d", "data", "<hex>", "NDEF data to decode"),
|
||||
arg_lit0("v", "verbose", "verbose mode"),
|
||||
arg_param_end
|
||||
};
|
||||
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
||||
|
|
Loading…
Reference in a new issue