From 67de882790486b74c81c66be0ee72dbfa2842e65 Mon Sep 17 00:00:00 2001 From: jsteube Date: Sun, 16 Jul 2017 16:13:45 +0200 Subject: [PATCH] Allow weak-hash-check support in -L mode --- src/weak_hash.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/weak_hash.c b/src/weak_hash.c index 96ebf14aa..1de57815e 100644 --- a/src/weak_hash.c +++ b/src/weak_hash.c @@ -15,6 +15,7 @@ int weak_hash_check (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param hashconfig_t *hashconfig = hashcat_ctx->hashconfig; hashes_t *hashes = hashcat_ctx->hashes; straight_ctx_t *straight_ctx = hashcat_ctx->straight_ctx; + user_options_t *user_options = hashcat_ctx->user_options; salt_t *salt_buf = &hashes->salts_buf[salt_pos]; @@ -37,9 +38,18 @@ int weak_hash_check (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param if (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL) { - CL_rc = run_kernel (hashcat_ctx, device_param, KERN_RUN_1, 1, false, 0); + if (user_options->length_limit_disable == true) + { + CL_rc = run_kernel (hashcat_ctx, device_param, KERN_RUN_4, 1, false, 0); - if (CL_rc == -1) return -1; + if (CL_rc == -1) return -1; + } + else + { + CL_rc = run_kernel (hashcat_ctx, device_param, KERN_RUN_1, 1, false, 0); + + if (CL_rc == -1) return -1; + } } else {