mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
trace list: check protocol exists and allows to run without arg
This commit is contained in:
parent
0bad12fcac
commit
89554501bb
1 changed files with 6 additions and 1 deletions
|
@ -729,7 +729,7 @@ int CmdTraceList(const char *Cmd) {
|
||||||
arg_str0(NULL, "dict", "<file>", "use dictionary keys file"),
|
arg_str0(NULL, "dict", "<file>", "use dictionary keys file"),
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||||
|
|
||||||
bool use_buffer = arg_get_lit(ctx, 1);
|
bool use_buffer = arg_get_lit(ctx, 1);
|
||||||
bool show_wait_cycles = arg_get_lit(ctx, 2);
|
bool show_wait_cycles = arg_get_lit(ctx, 2);
|
||||||
|
@ -775,6 +775,11 @@ int CmdTraceList(const char *Cmd) {
|
||||||
else if (strcmp(type, "lto") == 0) protocol = LTO;
|
else if (strcmp(type, "lto") == 0) protocol = LTO;
|
||||||
else if (strcmp(type, "cryptorf") == 0) protocol = PROTO_CRYPTORF;
|
else if (strcmp(type, "cryptorf") == 0) protocol = PROTO_CRYPTORF;
|
||||||
else if (strcmp(type, "raw") == 0) protocol = -1;
|
else if (strcmp(type, "raw") == 0) protocol = -1;
|
||||||
|
else if (strcmp(type, "") == 0) protocol = -1;
|
||||||
|
else {
|
||||||
|
PrintAndLogEx(FAILED, "Unknown protocol \"%s\"", type);
|
||||||
|
return PM3_EINVARG;
|
||||||
|
}
|
||||||
|
|
||||||
if (use_buffer == false) {
|
if (use_buffer == false) {
|
||||||
download_trace();
|
download_trace();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue