better warnings

This commit is contained in:
van Hauser 2014-11-19 20:11:05 +01:00
commit 4a1c774531
2 changed files with 5 additions and 2 deletions

2
TODO
View file

@ -1,5 +1,7 @@
Prio 1: Prio 1:
* fix -M
* print hostnames if present, not IP
* hydra-smb more than 1 connection? * hydra-smb more than 1 connection?
* add help hints? * add help hints?
* test teamspeak, icq * test teamspeak, icq

View file

@ -2346,6 +2346,7 @@ int main(int argc, char *argv[]) {
bail("You need to define a service to attack"); bail("You need to define a service to attack");
if (optind + 2 == argc) if (optind + 2 == argc)
fprintf(stderr, "[WARNING] With the -M FILE option you can not specify a server on the commandline. Lets hope you did everything right!\n"); fprintf(stderr, "[WARNING] With the -M FILE option you can not specify a server on the commandline. Lets hope you did everything right!\n");
/*!!!*/ fprintf(stderr, "[WARNING] the -M option is not working correctly at the moment for larger target lists!\n");
hydra_options.server = NULL; hydra_options.server = NULL;
hydra_options.service = argv[optind]; hydra_options.service = argv[optind];
if (optind + 2 == argc) if (optind + 2 == argc)
@ -2930,7 +2931,7 @@ int main(int argc, char *argv[]) {
hydra_options.port = port; hydra_options.port = port;
} }
if (hydra_options.ssl == 1 && strncmp(hydra_options.service, "http-", 5) == 0 && hydra_options.port == 443) if (hydra_options.ssl == 0 && hydra_options.port == 443)
fprintf(stderr, fprintf(stderr,
"[WARNING] you specified port 443 for attacking a http service, however did not specify the -S ssl switch nor used https-..., therefore using plain HTTP\n"); "[WARNING] you specified port 443 for attacking a http service, however did not specify the -S ssl switch nor used https-..., therefore using plain HTTP\n");
@ -3376,7 +3377,7 @@ int main(int argc, char *argv[]) {
hydra_brains.targets, hydra_brains.targets == 1 ? "" : "s", hydra_options.max_use, hydra_brains.todo, hydra_brains.todo == 1 ? "y" : "ies", hydra_brains.targets, hydra_brains.targets == 1 ? "" : "s", hydra_options.max_use, hydra_brains.todo, hydra_brains.todo == 1 ? "y" : "ies",
(unsigned long int) hydra_brains.countlogin, (unsigned long int) hydra_brains.countpass, math2, math2 == 1 ? "y" : "ies"); (unsigned long int) hydra_brains.countlogin, (unsigned long int) hydra_brains.countpass, math2, math2 == 1 ? "y" : "ies");
printf("[DATA] attacking service %s on port %d\n", hydra_options.service, port); printf("[DATA] attacking service %s on port %d%s\n", hydra_options.service, port, hydra_options.ssl == 1 ? " with SSL" : "");
if (hydra_options.outfile_ptr != NULL) { if (hydra_options.outfile_ptr != NULL) {
if ((hydra_brains.ofp = fopen(hydra_options.outfile_ptr, "a+")) == NULL) { if ((hydra_brains.ofp = fopen(hydra_options.outfile_ptr, "a+")) == NULL) {