mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-22 16:18:09 +00:00
Fixed calculation of brain-attack if a given wordlist has the size zero
Fixes https://github.com/hashcat/hashcat/issues/1756
This commit is contained in:
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
|
||||
|
10
src/brain.c
10
src/brain.c
@ -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…
Reference in New Issue
Block a user