mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 20:41:39 -07:00
fixes
This commit is contained in:
parent
7a4fa7b51e
commit
d5827c4182
3 changed files with 10 additions and 9 deletions
2
CHANGES
2
CHANGES
|
@ -5,7 +5,9 @@ Release 8.5-dev
|
|||
* New command line option:
|
||||
-b : format option for -o output file (json only so far, happy for patches supporting others :) ) - thanks to veggiespam for the patch
|
||||
* ./configure now honors the CC enviroment variable if present
|
||||
* fixed a bug in the NCP module
|
||||
* Favor strrchr() over rindex()
|
||||
* Added refactoring patch by diadlo
|
||||
* Updated man page with missing command line options
|
||||
|
||||
|
||||
|
|
|
@ -64,8 +64,10 @@ int start_ncp(int s, char *ip, int port, unsigned char options, char *miscptr, F
|
|||
return 4;
|
||||
}
|
||||
memset(context, 0, sizeof(context));
|
||||
strncpy(context, login, strlen(login));
|
||||
strncpy(context + strlen(login), miscptr, sizeof(char) + 1);
|
||||
strncpy(context, login, sizeof(context) - 2);
|
||||
context[sizeof(context) - 2] = 0;
|
||||
strncpy(context + strlen(login), miscptr, sizeof(context) - strlen(login) - 1);
|
||||
context[sizeof(context) - 1] = 0;
|
||||
login = context;
|
||||
}
|
||||
}
|
||||
|
|
11
hydra.c
11
hydra.c
|
@ -663,9 +663,7 @@ void module_usage() {
|
|||
#define STR_NULL(s) ((s) == NULL ? "(null)" : (s))
|
||||
|
||||
void hydra_debug(int force, char *string) {
|
||||
int active = 0;
|
||||
int inactive = 0;
|
||||
int i;
|
||||
int active = 0, inactive = 0, i;
|
||||
|
||||
if (!debug && !force)
|
||||
return;
|
||||
|
@ -700,9 +698,8 @@ void hydra_debug(int force, char *string) {
|
|||
STR_NULL(target->pass_ptr));
|
||||
}
|
||||
|
||||
if (hydra_heads == NULL) {
|
||||
return
|
||||
}
|
||||
if (hydra_heads == NULL)
|
||||
return;
|
||||
|
||||
for (i = 0; i < hydra_options.max_use; i++) {
|
||||
if (hydra_heads[i]->active >= 0) {
|
||||
|
@ -4174,7 +4171,7 @@ int main(int argc, char *argv[]) {
|
|||
hydra_brains.sent, // tries
|
||||
(long unsigned int) ((elapsed_status - starttime) / 3600), // hours
|
||||
(long unsigned int) (((elapsed_status - starttime) % 3600) / 60), // minutes
|
||||
(hydra_brains.todo_all + total_redo_count) - hydra_brains.sent, // left todo
|
||||
(hydra_brains.todo_all + total_redo_count) - hydra_brains.sent != 0 ? (hydra_brains.todo_all + total_redo_count) - hydra_brains.sent : 1, // left todo
|
||||
(long unsigned int) (((double) (hydra_brains.todo_all + total_redo_count) - hydra_brains.sent) / ((double) hydra_brains.sent / (elapsed_status - starttime))
|
||||
) / 3600, // hours
|
||||
(((long unsigned int) (((double) (hydra_brains.todo_all + total_redo_count) - hydra_brains.sent) / ((double) hydra_brains.sent / (elapsed_status - starttime))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue