1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-02-02 19:01:09 +00:00

Allow weak-hash-check support in -L mode

This commit is contained in:
jsteube 2017-07-16 16:13:45 +02:00
parent 3d9b071e1e
commit 67de882790

View File

@ -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
{