From 57e1191307a805a1ea8d88285b917adeacc0f989 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Tue, 24 May 2016 19:30:55 +0200 Subject: [PATCH] Fix bug in -a 1 mode: If left wordlist has less entries than right wordlist then 0x80 was not added --- src/hashcat.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/hashcat.c b/src/hashcat.c index 316c769..c9e69a2 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -2760,7 +2760,35 @@ static void run_copy (hc_device_param_t *device_param, const uint pws_cnt) } else if (data.attack_kern == ATTACK_KERN_COMBI) { - if (data.attack_mode == ATTACK_MODE_HYBRID2) + if (data.attack_mode == ATTACK_MODE_COMBI) + { + if (data.combs_mode == COMBINATOR_MODE_BASE_RIGHT) + { + if (data.opts_type & OPTS_TYPE_PT_ADD01) + { + for (u32 i = 0; i < pws_cnt; i++) + { + const u32 pw_len = device_param->pws_buf[i].pw_len; + + u8 *ptr = (u8 *) device_param->pws_buf[i].i; + + ptr[pw_len] = 0x01; + } + } + else if (data.opts_type & OPTS_TYPE_PT_ADD80) + { + for (u32 i = 0; i < pws_cnt; i++) + { + const u32 pw_len = device_param->pws_buf[i].pw_len; + + u8 *ptr = (u8 *) device_param->pws_buf[i].i; + + ptr[pw_len] = 0x80; + } + } + } + } + else if (data.attack_mode == ATTACK_MODE_HYBRID2) { if (data.opts_type & OPTS_TYPE_PT_ADD01) { -- 2.43.0