diff --git a/client/cmdmain.c b/client/cmdmain.c index d9cbbac74..57cd4d10a 100644 --- a/client/cmdmain.c +++ b/client/cmdmain.c @@ -194,20 +194,31 @@ int CmdRem(const char *Cmd) { static int CmdHints(const char *Cmd) { uint32_t ms = 0; char ctmp = tolower(param_getchar(Cmd, 0)); - if (ctmp == 'h') return usage_hints(); + if (ctmp == 'h') return usage_hints(); if (strlen(Cmd) < 1) { PrintAndLogEx(INFO, "Hints are %s", (g_showhints) ? "ON" : "OFF"); return PM3_SUCCESS; } - if (param_getchar(Cmd, 0) != 0x00) { - ms = param_get32ex(Cmd, 0, 0, 10); - if (ms == 0) + if (strlen(Cmd) > 1){ + str_lower((char *)Cmd); + if (str_startswith(Cmd, "of")) { g_showhints = false; - else - g_showhints = true; + } else { + g_showhints = true; + } + } else { + if (param_getchar(Cmd, 0) != 0x00) { + ms = param_get32ex(Cmd, 0, 0, 10); + if (ms == 0) { + g_showhints = false; + } else { + g_showhints = true; + } + } } + PrintAndLogEx(INFO, "Hints are %s", (g_showhints) ? "ON" : "OFF"); return PM3_SUCCESS; }