mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-21 05:43:52 -07:00
crash fix
This commit is contained in:
parent
71d407d641
commit
9597bafb17
1 changed files with 11 additions and 6 deletions
17
hydra.c
17
hydra.c
|
@ -3540,12 +3540,17 @@ int main(int argc, char *argv[]) {
|
|||
printf(" per task\n");
|
||||
|
||||
if (hydra_brains.targets == 1) {
|
||||
if (index(hydra_targets[0]->target, ':') == NULL)
|
||||
printf("[DATA] attacking %s%s://%s:%d%s%s\n", hydra_options.service, hydra_options.ssl == 1 ? "s" : "", hydra_targets[0]->target, port, strstr(hydra_options.miscptr, "/") == hydra_options.miscptr ? "" : "/", hydra_options.miscptr != NULL ? hydra_options.miscptr : "");
|
||||
else
|
||||
printf("[DATA] attacking %s%s://[%s]:%d%s%s\n", hydra_options.service, hydra_options.ssl == 1 ? "s" : "", hydra_targets[0]->target, port, strstr(hydra_options.miscptr, "/") == hydra_options.miscptr ? "" : "/", hydra_options.miscptr != NULL ? hydra_options.miscptr : "");
|
||||
} else
|
||||
printf("[DATA] attacking %s%s://(%d targets):%d%s%s\n", hydra_options.service, hydra_options.ssl == 1 ? "s" : "", hydra_brains.targets, port, strstr(hydra_options.miscptr, "/") == hydra_options.miscptr ? "" : "/", hydra_options.miscptr != NULL ? hydra_options.miscptr : "");
|
||||
if (index(hydra_targets[0]->target, ':') == NULL) {
|
||||
printf("[DATA] attacking %s%s://%s:", hydra_options.service, hydra_options.ssl == 1 ? "s" : "", hydra_targets[0]->target);
|
||||
printf("%d%s%s\n", port, hydra_options.miscptr == NULL || hydra_options.miscptr[0] != '/' ? "/" : "", hydra_options.miscptr != NULL ? hydra_options.miscptr : "");
|
||||
} else {
|
||||
printf("[DATA] attacking %s%s://[%s]:", hydra_options.service, hydra_options.ssl == 1 ? "s" : "", hydra_targets[0]->target);
|
||||
printf("%d%s%s\n", port, hydra_options.miscptr == NULL || hydra_options.miscptr[0] != '/' ? "/" : "", hydra_options.miscptr != NULL ? hydra_options.miscptr : "");
|
||||
}
|
||||
} else {
|
||||
printf("[DATA] attacking %s%s://(%d targets):", hydra_options.service, hydra_options.ssl == 1 ? "s" : "", hydra_brains.targets);
|
||||
printf("%d%s%s\n", port, hydra_options.miscptr == NULL || hydra_options.miscptr[0] != '/' ? "/" : "", hydra_options.miscptr != NULL ? hydra_options.miscptr : "");
|
||||
}
|
||||
//service %s on port %d%s\n", hydra_options.service, port, hydra_options.ssl == 1 ? " with SSL" : "");
|
||||
// if (hydra_options.miscptr != NULL && hydra_options.miscptr[0] != 0)
|
||||
// printf("[DATA] with additional data %s\n", hydra_options.miscptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue