hint now uses session struct, in preperation for a preference file.
This commit is contained in:
@@ -196,30 +196,25 @@ static int CmdHints(const char *Cmd) {
|
||||
char ctmp = tolower(param_getchar(Cmd, 0));
|
||||
if (ctmp == 'h') return usage_hints();
|
||||
|
||||
if (strlen(Cmd) < 1) {
|
||||
PrintAndLogEx(INFO, "Hints are %s", (g_showhints) ? "ON" : "OFF");
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
if (strlen(Cmd) > 1){
|
||||
str_lower((char *)Cmd);
|
||||
if (str_startswith(Cmd, "of")) {
|
||||
g_showhints = false;
|
||||
session.show_hints = false;
|
||||
} else {
|
||||
g_showhints = true;
|
||||
session.show_hints = true;
|
||||
}
|
||||
} else {
|
||||
} else if (strlen(Cmd) == 1) {
|
||||
if (param_getchar(Cmd, 0) != 0x00) {
|
||||
ms = param_get32ex(Cmd, 0, 0, 10);
|
||||
if (ms == 0) {
|
||||
g_showhints = false;
|
||||
session.show_hints = false;
|
||||
} else {
|
||||
g_showhints = true;
|
||||
session.show_hints = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PrintAndLogEx(INFO, "Hints are %s", (g_showhints) ? "ON" : "OFF");
|
||||
PrintAndLogEx(INFO, "Hints are %s", (session.show_hints) ? "ON" : "OFF");
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user