From f9ba94954bed4c1203dd4ac2d054e738b528acc6 Mon Sep 17 00:00:00 2001 From: jsteube Date: Fri, 9 Dec 2016 15:26:35 +0100 Subject: [PATCH] Added sanity check to disallow --speed-only in combination with -i --- docs/changes.txt | 1 + src/user_options.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 1e4c4c73b..682629e80 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -17,6 +17,7 @@ ## Technical ## +- Sanity: Added sanity check to disallow --speed-only in combination with -i - Potfile: In v3.10 already, the default potfile suffix changed but the note about was missing. The "hashcat.pot" became "hashcat.potfile" - Threads: Replaced all calls to strerror() with %m printf() GNU extension to ensure thread safety - Threads: Replaced all calls to ctime() with ctime_r() to ensure thread safety diff --git a/src/user_options.c b/src/user_options.c index 7a6024e32..24c61e5da 100644 --- a/src/user_options.c +++ b/src/user_options.c @@ -465,6 +465,13 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) return -1; } + if ((user_options->increment == true) && (user_options->speed_only == true)) + { + event_log_error (hashcat_ctx, "Increment is not allowed in combination with --speed-only"); + + return -1; + } + if ((user_options->increment == true) && (user_options->attack_mode == ATTACK_MODE_STRAIGHT)) { event_log_error (hashcat_ctx, "Increment is not allowed in attack-mode 0"); @@ -1069,6 +1076,10 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx) else if (user_options->opencl_info == true) { + } + else if (user_options->speed_only == true) + { + } else if (user_options->keyspace == true) {