1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-24 23:48:39 +00:00

Merge pull request #982 from philsmd/pr/combinator_max_pw

fixes #980: combinator attack needs special formula for max pass length
This commit is contained in:
Jens Steube 2017-01-21 18:28:44 +01:00 committed by GitHub
commit f88644f8c1
2 changed files with 18 additions and 1 deletions

View File

@ -18,6 +18,12 @@
- Workaround added for AMDGPU-Pro OpenCL runtime: AES encrypt and decrypt Invertkey function was calculated wrong in certain cases - Workaround added for AMDGPU-Pro OpenCL runtime: AES encrypt and decrypt Invertkey function was calculated wrong in certain cases
##
## Bugs
##
- Fixed a problem with maximal password length with the combinator attack
* changes v3.20 -> v3.30: * changes v3.20 -> v3.30:
## ##

View File

@ -84,9 +84,20 @@ int build_plain (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
memcpy (plain_ptr, comb_buf, comb_len); memcpy (plain_ptr, comb_buf, comb_len);
} }
int pw_max_combi;
if (hashconfig->pw_max < PW_DICTMAX)
{
pw_max_combi = hashconfig->pw_max;
}
else
{
pw_max_combi = PW_MAX;
}
plain_len += comb_len; plain_len += comb_len;
if (plain_len > (int) hashconfig->pw_max) plain_len = (int) hashconfig->pw_max; if (plain_len > pw_max_combi) plain_len = pw_max_combi;
} }
else if (user_options->attack_mode == ATTACK_MODE_BF) else if (user_options->attack_mode == ATTACK_MODE_BF)
{ {