mirror of
https://github.com/hashcat/hashcat
synced 2025-05-09 02:52:15 +02: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
|
## 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 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 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
|
- 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");
|
FILE *fd = fopen (filename, "rb");
|
||||||
|
|
||||||
size_t nread = fread (buf, sizeof (u8), FBUFSZ, fd);
|
while (!feof (fd))
|
||||||
|
|
||||||
XXH64_update (state, buf, nread);
|
|
||||||
|
|
||||||
while (nread <= 0)
|
|
||||||
{
|
{
|
||||||
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);
|
fclose (fd);
|
||||||
|
@ -164,7 +164,10 @@ static int inner2_loop (hashcat_ctx_t *hashcat_ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_BRAIN
|
#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
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user