Fixed calculation of brain-attack if a given wordlist has the size zero

Fixes https://github.com/hashcat/hashcat/issues/1756
pull/1761/head
Jens Steube 6 years ago
parent 6b2c56118c
commit a4a9d29420

@ -27,6 +27,7 @@
## Bugs
##
- Fixed calculation of brain-attack if a given wordlist has the size zero
- Fixed automated calculation of brain-session when not using all hashes in the hashlist
- Fixed endianness and invalid separator character in outfile format for hash-mode 16801 (WPA-PMKID-PMK)
- Fixed ignoring --brain-client-features configuration when brain-server has attack positions information from a previous run

@ -536,15 +536,11 @@ u64 brain_compute_attack_wordlist (const char *filename)
FILE *fd = fopen (filename, "rb");
size_t nread = fread (buf, sizeof (u8), FBUFSZ, fd);
XXH64_update (state, buf, nread);
while (nread <= 0)
while (!feof (fd))
{
XXH64_update (state, buf, nread);
const size_t nread = fread (buf, 1, FBUFSZ, fd);
nread = fread (buf, sizeof (u8), FBUFSZ, fd);
XXH64_update (state, buf, nread);
}
fclose (fd);

@ -164,7 +164,10 @@ static int inner2_loop (hashcat_ctx_t *hashcat_ctx)
}
#ifdef WITH_BRAIN
user_options->brain_attack = brain_compute_attack (hashcat_ctx);
if (user_options->brain_client == true)
{
user_options->brain_attack = brain_compute_attack (hashcat_ctx);
}
#endif
/**

Loading…
Cancel
Save