1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-01-11 00:01:16 +00:00

Fix mask length check for algorithms using unicode

This commit is contained in:
jsteube 2016-10-04 11:40:18 +02:00
parent 578f6816c6
commit 3ac0737b19
2 changed files with 7 additions and 7 deletions

View File

@ -660,12 +660,6 @@ static int inner1_loop (hashcat_ctx_t *hashcat_ctx)
u32 mask_min = hashconfig->pw_min;
u32 mask_max = hashconfig->pw_max;
if (hashconfig->opts_type & OPTS_TYPE_PT_UNICODE)
{
mask_min *= 2;
mask_max *= 2;
}
if ((mask_ctx->css_cnt < mask_min) || (mask_ctx->css_cnt > mask_max))
{
if (mask_ctx->css_cnt < mask_min)
@ -685,6 +679,12 @@ static int inner1_loop (hashcat_ctx_t *hashcat_ctx)
return 0;
}
if (hashconfig->opts_type & OPTS_TYPE_PT_UNICODE)
{
mask_min *= 2;
mask_max *= 2;
}
if (hashconfig->opts_type & OPTS_TYPE_PT_UNICODE)
{
mp_css_unicode_expand (mask_ctx);

View File

@ -50,7 +50,7 @@ void mp_css_split_cnt (const mask_ctx_t *mask_ctx, const hashconfig_t *hashconfi
}
else
{
if ((mask_ctx->css_buf[0].cs_len * mask_ctx->css_buf[1].cs_len * mask_ctx->css_buf[2].cs_len) > 128)
if ((mask_ctx->css_buf[0].cs_len * mask_ctx->css_buf[1].cs_len * mask_ctx->css_buf[2].cs_len) > 256)
{
css_cnt_r = 3;
}