Fix the rejection of words in a wordlist if it's exactly of length 32

This fixes https://github.com/hashcat/hashcat/issues/502
pull/570/head
jsteube 8 years ago
parent 492f9f2290
commit f234f729f5

@ -85,10 +85,7 @@ int build_plain (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
plain_len += comb_len;
if (hashconfig->pw_max != PW_DICTMAX1)
{
if (plain_len > (int) hashconfig->pw_max) plain_len = (int) hashconfig->pw_max;
}
if (plain_len > (int) hashconfig->pw_max) plain_len = (int) hashconfig->pw_max;
}
else if (user_options->attack_mode == ATTACK_MODE_BF)
{
@ -130,10 +127,7 @@ int build_plain (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
plain_len += start + stop;
if (hashconfig->pw_max != PW_DICTMAX1)
{
if (plain_len > (int) hashconfig->pw_max) plain_len = (int) hashconfig->pw_max;
}
if (plain_len > (int) hashconfig->pw_max) plain_len = (int) hashconfig->pw_max;
}
else if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
{
@ -161,10 +155,7 @@ int build_plain (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
plain_len += start + stop;
if (hashconfig->pw_max != PW_DICTMAX1)
{
if (plain_len > (int) hashconfig->pw_max) plain_len = (int) hashconfig->pw_max;
}
if (plain_len > (int) hashconfig->pw_max) plain_len = (int) hashconfig->pw_max;
}
if (user_options->attack_mode == ATTACK_MODE_BF)

@ -138,7 +138,7 @@ int process_stdout (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param,
plain_len = pw.pw_len;
char *comb_buf = (char *) device_param->combs_buf[il_pos].i;
u32 comb_len = device_param->combs_buf[il_pos].pw_len;
u32 comb_len = device_param->combs_buf[il_pos].pw_len;
if (combinator_ctx->combs_mode == COMBINATOR_MODE_BASE_LEFT)
{
@ -153,10 +153,7 @@ int process_stdout (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param,
plain_len += comb_len;
if (hashconfig->pw_max != PW_DICTMAX1)
{
if (plain_len > hashconfig->pw_max) plain_len = hashconfig->pw_max;
}
if (plain_len > hashconfig->pw_max) plain_len = hashconfig->pw_max;
out_push (&out, plain_ptr, plain_len);
}

@ -229,9 +229,9 @@ int straight_ctx_init (hashcat_ctx_t *hashcat_ctx)
{
switch (user_options_extra->attack_kern)
{
case ATTACK_KERN_STRAIGHT: if (pw_max > PW_DICTMAX) pw_max = PW_DICTMAX1;
case ATTACK_KERN_STRAIGHT: if (pw_max > PW_DICTMAX) pw_max = PW_DICTMAX;
break;
case ATTACK_KERN_COMBI: if (pw_max > PW_DICTMAX) pw_max = PW_DICTMAX1;
case ATTACK_KERN_COMBI: if (pw_max > PW_DICTMAX) pw_max = PW_DICTMAX;
break;
}
}
@ -241,9 +241,9 @@ int straight_ctx_init (hashcat_ctx_t *hashcat_ctx)
{
switch (user_options_extra->attack_kern)
{
case ATTACK_KERN_STRAIGHT: if (pw_max > PW_DICTMAX) pw_max = PW_DICTMAX1;
case ATTACK_KERN_STRAIGHT: if (pw_max > PW_DICTMAX) pw_max = PW_DICTMAX;
break;
case ATTACK_KERN_COMBI: if (pw_max > PW_DICTMAX) pw_max = PW_DICTMAX1;
case ATTACK_KERN_COMBI: if (pw_max > PW_DICTMAX) pw_max = PW_DICTMAX;
break;
}
}

Loading…
Cancel
Save