mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
hf legic wipe - now use cliparser
This commit is contained in:
parent
0ce10e18df
commit
85b1a833fc
2 changed files with 11 additions and 15 deletions
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue