hf mfdes getuid/info/eum - with a default cliparser

This commit is contained in:
iceman1001 2021-01-07 11:40:10 +01:00
commit e96cfa94b6
2 changed files with 34 additions and 4 deletions

View file

@ -2256,7 +2256,17 @@ static int desfire_authenticate(int cmdAuthMode, int cmdAuthAlgo, uint8_t *aid,
} }
static int CmdHF14ADesGetUID(const char *Cmd) { static int CmdHF14ADesGetUID(const char *Cmd) {
(void)Cmd; CLIParserContext *ctx;
CLIParserInit(&ctx, "hf mfdes getuid",
"Get UID from a MIFARE DESfire tag",
"hf mfdes getuid");
void *argtable[] = {
arg_param_begin,
arg_param_end
};
CLIExecWithReturn(ctx, Cmd, argtable, true);
CLIParserFree(ctx);
uint8_t uid[16] = {0}; uint8_t uid[16] = {0};
int res = handler_desfire_getuid(uid); int res = handler_desfire_getuid(uid);
@ -3438,7 +3448,18 @@ static int CmdHF14ADesFormatPICC(const char *Cmd) {
} }
static int CmdHF14ADesInfo(const char *Cmd) { static int CmdHF14ADesInfo(const char *Cmd) {
(void)Cmd; // Cmd is not used so far CLIParserContext *ctx;
CLIParserInit(&ctx, "hf mfdes info",
"Get info from MIFARE DESfire tags",
"hf mfdes info");
void *argtable[] = {
arg_param_begin,
arg_param_end
};
CLIExecWithReturn(ctx, Cmd, argtable, true);
CLIParserFree(ctx);
DropFieldDesfire(); DropFieldDesfire();
mfdes_info_res_t info; mfdes_info_res_t info;
@ -3862,8 +3883,18 @@ static int CmdHF14ADesDump(const char *Cmd) {
} }
static int CmdHF14ADesEnumApplications(const char *Cmd) { static int CmdHF14ADesEnumApplications(const char *Cmd) {
CLIParserContext *ctx;
CLIParserInit(&ctx, "hf mfdes enum",
"Enumerate all AID's on MIFARE DESfire tag",
"hf mfdes enum");
void *argtable[] = {
arg_param_begin,
arg_param_end
};
CLIExecWithReturn(ctx, Cmd, argtable, true);
CLIParserFree(ctx);
(void)Cmd; // Cmd is not used so far
DropFieldDesfire(); DropFieldDesfire();
uint8_t aid[3] = {0}; uint8_t aid[3] = {0};

View file

@ -102,7 +102,6 @@ hf mf gen3uid
hf mf gen3blk hf mf gen3blk
hf mf gen3freeze hf mf gen3freeze
hf mf ice hf mf ice
hf mfdes getuid
lf config lf config
lf cmdread lf cmdread
lf read lf read