mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 20:41:39 -07:00
-x fix
This commit is contained in:
parent
1415b72731
commit
325318039d
2 changed files with 11 additions and 3 deletions
1
CHANGES
1
CHANGES
|
@ -14,6 +14,7 @@ Release 8.2-pre
|
|||
* Fixed a bug where the cisco-enable module was not working with the password-only logon mode
|
||||
* Fixed an out of memory bug in http-form
|
||||
* Fixed imap PLAIN method
|
||||
* Fixed -x option to bail if it would generate too many passwords (more than 4 billion)
|
||||
* Added warning if HYDRA_PROXY_CONNECT environment is detected, that is an outdated setting
|
||||
* Added --fhs switch to configure (for Linux distribution usage)
|
||||
* ... your patch?
|
||||
|
|
13
bfg.c
13
bfg.c
|
@ -158,11 +158,18 @@ int bf_init(char *arg) {
|
|||
|
||||
unsigned long int bf_get_pcount() {
|
||||
int i;
|
||||
unsigned long int count = 0;
|
||||
double count = 0;
|
||||
unsigned long int foo;
|
||||
|
||||
for (i = bf_options.from; i <= bf_options.to; i++)
|
||||
count += (unsigned long int) (pow((float) bf_options.crs_len, (float) i));
|
||||
return count;
|
||||
count += (pow((double) bf_options.crs_len, (double) i));
|
||||
if (count >= 0xffffffff) {
|
||||
fprintf(stderr, "\n[ERROR] definition for password bruteforce (-x) generates more than 4 billion passwords\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
foo = count / 1;
|
||||
return foo;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue