mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 02:27:26 -07:00
chg: hints - allow ON/OFF
This commit is contained in:
parent
fb3f4ecd36
commit
e5b38c46c6
1 changed files with 17 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue