mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-23 00:28:11 +00:00
Small wordlist loading performance optimization
This commit is contained in:
parent
8462b9afb7
commit
57a70710ae
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user