1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 08:08:10 +00:00

do not allow --show and --restore

This commit is contained in:
Gabriele Gristina 2024-10-26 14:51:11 +02:00
parent 6716447dfc
commit e3c097c88b
2 changed files with 9 additions and 0 deletions

View File

@ -1430,6 +1430,8 @@ bool autodetect_hashmode_test (hashcat_ctx_t *hashcat_ctx)
{
char *input_buf = user_options_extra->hc_hash;
if (!input_buf) return false;
size_t input_len = strlen (input_buf);
char *hash_buf = NULL;

View File

@ -1059,6 +1059,13 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
return 0;
}
if (user_options->show == true && user_options->restore == true)
{
event_log_error (hashcat_ctx, "Mixing --show and --restore is not allowed.");
return -1;
}
if (user_options->show == true || user_options->left == true)
{
if (user_options->remove == true)