1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-01-11 16:21:12 +00:00

Added sanity check to confirm --machine-readable and --status-json do not run at the same time.

Fixed typo in existing sanity check.
This commit is contained in:
Chick3nman 2019-03-27 06:53:34 -05:00
parent f434809921
commit 0cc365139b
2 changed files with 13 additions and 4 deletions

View File

@ -889,7 +889,6 @@ void status_display_machine_readable (hashcat_ctx_t *hashcat_ctx)
}
void status_display_status_json (hashcat_ctx_t *hashcat_ctx)
{
hashcat_status_t *hashcat_status = (hashcat_status_t *) hcmalloc (sizeof (hashcat_status_t));

View File

@ -913,12 +913,22 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
return -1;
}
}
if (user_options->machine_readable == true)
{
if (user_options->status_json == true)
{
event_log_error (hashcat_ctx, "The --status-json flag can not be used with --machine-readable.");
return -1;
}
}
if (user_options->remove_timer_chgd == true)
{
if (user_options->remove == false)
{
event_log_error (hashcat_ctx, "The --remove-timer requires --remove.");
event_log_error (hashcat_ctx, "The --remove-timer flag requires --remove.");
return -1;
}
@ -1110,7 +1120,7 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
return -1;
}
}
if (user_options->stdin_timeout_abort_chgd == true)
{
if (user_options->attack_mode != ATTACK_MODE_STRAIGHT)