From 2e61685f48a26efbf889d88591ac61b4973b45a9 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Thu, 14 Jan 2016 23:03:23 +0100 Subject: [PATCH] Fix outputting wrong password for weak-hash-check in case user defined -r or -g --- src/oclHashcat.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/oclHashcat.c b/src/oclHashcat.c index 780b6f0b1..9fdf0c927 100644 --- a/src/oclHashcat.c +++ b/src/oclHashcat.c @@ -4545,6 +4545,10 @@ static void weak_hash_check (hc_device_param_t *device_param, const uint salt_po data.dictfile = (char *) weak_hash_check; + uint cmd0_rule_old = data.kernel_rules_buf[0].cmds[0]; + + data.kernel_rules_buf[0].cmds[0] = 0; + /** * run the kernel */ @@ -4594,6 +4598,8 @@ static void weak_hash_check (hc_device_param_t *device_param, const uint salt_po device_param->kernel_params_buf32[31] = 0; data.dictfile = dictfile_old; + + data.kernel_rules_buf[0].cmds[0] = cmd0_rule_old; } // hlfmt hashcat