diff --git a/docs/changes.txt b/docs/changes.txt index ae0878f57..d3213a234 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -22,6 +22,7 @@ - Fixed kernel loops in --increment mode leading to slower performance - Fixed custom char parsing code in maskfiles in --increment mode: Custom charset wasn't used - Fixed hex output of plaintext in case --outfile-format 4, 5, 6 or 7 was used +- Fixed mask length check in hybrid attack-modes: Do not include hash-mode dependant mask length checks - Removed access to readlink() on FreeBSD: Causes problem building hashcat ## diff --git a/src/mpsp.c b/src/mpsp.c index 8ca9751de..ad2215a67 100644 --- a/src/mpsp.c +++ b/src/mpsp.c @@ -936,16 +936,20 @@ static int mask_append (hashcat_ctx_t *hashcat_ctx, const char *mask, const char { const u32 mask_length = mp_get_length (mask); - const u32 pw_min = hashconfig->pw_min; - const u32 pw_max = hashconfig->pw_max; - u32 increment_min = user_options->increment_min; u32 increment_max = user_options->increment_max; - increment_min = MAX (increment_min, pw_min); - increment_max = MIN (increment_max, pw_max); increment_max = MIN (increment_max, mask_length); + if (user_options->attack_mode == ATTACK_MODE_BF) + { + const u32 pw_min = hashconfig->pw_min; + const u32 pw_max = hashconfig->pw_max; + + increment_min = MAX (increment_min, pw_min); + increment_max = MIN (increment_max, pw_max); + } + for (u32 increment_len = increment_min; increment_len <= increment_max; increment_len++) { char *mask_truncated = (char *) hcmalloc (256);