1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-13 19:28:56 +00:00

Small wordlist loading performance optimization

This commit is contained in:
jsteube 2017-09-20 11:03:38 +02:00
parent 8462b9afb7
commit 57a70710ae
2 changed files with 6 additions and 1 deletions

View File

@ -154,6 +154,8 @@ static int calc_stdin (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_par
u32 words_extra_total = 0;
memset (device_param->pws_buf, 0, device_param->size_pws);
while (device_param->pws_cnt < device_param->kernel_power)
{
char *line_buf = fgets (buf, HCBUFSIZ_LARGE - 1, stdin);
@ -483,6 +485,8 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
u32 words_extra_total = 0;
memset (device_param->pws_buf, 0, device_param->size_pws);
while (words_extra)
{
const u32 work = get_work (hashcat_ctx, device_param, words_extra);

View File

@ -248,7 +248,8 @@ void pw_add (hc_device_param_t *device_param, const u8 *pw_buf, const int pw_len
memcpy (ptr, pw_buf, pw_len);
memset (ptr + pw_len, 0, sizeof (pw->i) - pw_len);
//memset zero to entire buffer done in outer loop
//memset (ptr + pw_len, 0, sizeof (pw->i) - pw_len);
pw->pw_len = pw_len;