mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-24 07:05:40 -07:00
auto - optional parameter to keep searching
This commit is contained in:
parent
a1d21e56d8
commit
21f311cf8c
1 changed files with 8 additions and 4 deletions
|
@ -129,27 +129,31 @@ static int CmdAuto(const char *Cmd) {
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
|
arg_lit0("a", "all", ""),
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||||
|
bool exit_first = (arg_get_lit(ctx, 1) == false);
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
|
|
||||||
PrintAndLogEx(INFO, "lf search");
|
PrintAndLogEx(INFO, "lf search");
|
||||||
int ret = CmdLFfind("");
|
int ret = CmdLFfind("");
|
||||||
if (ret == PM3_SUCCESS)
|
if (ret == PM3_SUCCESS && exit_first)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
PrintAndLogEx(INFO, "hf search");
|
PrintAndLogEx(INFO, "hf search");
|
||||||
ret = CmdHFSearch("");
|
ret = CmdHFSearch("");
|
||||||
if (ret == PM3_SUCCESS)
|
if (ret == PM3_SUCCESS && exit_first)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
PrintAndLogEx(INFO, "lf search - unknown");
|
PrintAndLogEx(INFO, "lf search - unknown");
|
||||||
ret = lf_search_plus("");
|
ret = lf_search_plus("");
|
||||||
if (ret == PM3_SUCCESS)
|
if (ret == PM3_SUCCESS && exit_first)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
PrintAndLogEx(INFO, "Failed both LF / HF SEARCH,");
|
if (ret != PM3_SUCCESS)
|
||||||
|
PrintAndLogEx(INFO, "Failed both LF / HF SEARCH,");
|
||||||
|
|
||||||
PrintAndLogEx(INFO, "Trying " _YELLOW_("`lf read`") " and save a trace for you");
|
PrintAndLogEx(INFO, "Trying " _YELLOW_("`lf read`") " and save a trace for you");
|
||||||
|
|
||||||
CmdPlot("");
|
CmdPlot("");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue