From 85b16ef844bc80816441de976b0826e1b59713d5 Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Mon, 29 Jul 2019 14:29:43 +0200 Subject: [PATCH] do not call mp_css_utf16le_expand() in case this is a slow_candidate session --- src/interface.c | 2 +- src/mpsp.c | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/interface.c b/src/interface.c index c908d9c0c..442076317 100644 --- a/src/interface.c +++ b/src/interface.c @@ -353,7 +353,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) { if (user_options->quiet == false) event_log_warning (hashcat_ctx, "%s: Optimized OpenCL kernel requested but not needed - falling back to pure OpenCL kernel", source_file); } - else if (user_options->slow_candidates == false) + else { hashconfig->opti_type |= OPTI_TYPE_OPTIMIZED_KERNEL; } diff --git a/src/mpsp.c b/src/mpsp.c index 0fce4d5fb..2ebf72d72 100644 --- a/src/mpsp.c +++ b/src/mpsp.c @@ -1297,13 +1297,16 @@ int mask_ctx_update_loop (hashcat_ctx_t *hashcat_ctx) return -1; } - if (hashconfig->opts_type & OPTS_TYPE_PT_UTF16LE) + if (user_options->slow_candidates == false) { - if (mp_css_utf16le_expand (hashcat_ctx) == -1) return -1; - } - else if (hashconfig->opts_type & OPTS_TYPE_PT_UTF16BE) - { - if (mp_css_utf16be_expand (hashcat_ctx) == -1) return -1; + if (hashconfig->opts_type & OPTS_TYPE_PT_UTF16LE) + { + if (mp_css_utf16le_expand (hashcat_ctx) == -1) return -1; + } + else if (hashconfig->opts_type & OPTS_TYPE_PT_UTF16BE) + { + if (mp_css_utf16be_expand (hashcat_ctx) == -1) return -1; + } } u32 css_cnt_orig = mask_ctx->css_cnt;