hf legic wipe - now use cliparser

This commit is contained in:
tcprst 2020-12-21 12:17:05 -05:00
commit 85b1a833fc
No known key found for this signature in database
GPG key ID: 9145EAF5121AED25
2 changed files with 11 additions and 15 deletions

View file

@ -86,17 +86,6 @@ static int usage_legic_esave(void) {
PrintAndLogEx(NORMAL, _YELLOW_(" hf legic esave 2 f myfile")); PrintAndLogEx(NORMAL, _YELLOW_(" hf legic esave 2 f myfile"));
return PM3_SUCCESS; return PM3_SUCCESS;
} }
static int usage_legic_wipe(void) {
PrintAndLogEx(NORMAL, "Fills a LEGIC Prime tags memory with zeros. From byte7 and to the end");
PrintAndLogEx(NORMAL, "It autodetects card type\n");
PrintAndLogEx(NORMAL, "Usage: hf legic wipe [h]\n");
PrintAndLogEx(NORMAL, "Options:");
PrintAndLogEx(NORMAL, " h : this help");
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(NORMAL, "Examples:");
PrintAndLogEx(NORMAL, _YELLOW_(" hf legic wipe"));
return PM3_SUCCESS;
}
static bool legic_xor(uint8_t *data, uint16_t cardsize) { static bool legic_xor(uint8_t *data, uint16_t cardsize) {
@ -1198,10 +1187,18 @@ static int CmdLegicESave(const char *Cmd) {
} }
static int CmdLegicWipe(const char *Cmd) { static int CmdLegicWipe(const char *Cmd) {
CLIParserContext *ctx;
CLIParserInit(&ctx, "hf legic wipe",
"Fills a LEGIC Prime tags memory with zeros. From byte7 and to the end\n"
"It autodetects card type",
"hf legic wipe");
char cmdp = tolower(param_getchar(Cmd, 0)); void *argtable[] = {
arg_param_begin,
if (cmdp == 'h') return usage_legic_wipe(); arg_param_end
};
CLIExecWithReturn(ctx, Cmd, argtable, true);
CLIParserFree(ctx);
// tagtype // tagtype
legic_card_select_t card; legic_card_select_t card;

View file

@ -78,7 +78,6 @@ hf legic dump
hf legic restore hf legic restore
hf legic eload hf legic eload
hf legic esave hf legic esave
hf legic wipe
hf mf darkside hf mf darkside
hf mf nested hf mf nested
hf mf hardnested hf mf hardnested