mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-21 05:43:52 -07:00
fixed -U crash
This commit is contained in:
parent
f2a328d35a
commit
f340852655
2 changed files with 15 additions and 5 deletions
1
CHANGES
1
CHANGES
|
@ -12,6 +12,7 @@ Release 8.4-dev
|
|||
-I : ignore an existing hydra.restore file (dont wait for 10 seconds)
|
||||
* Upgraded hydra-svn to work with the current libsvn version
|
||||
* Fixed dpl4hydra to be able to update from the web again
|
||||
* Fixed crash when -U was used without any service (thanks to thecarterb for reporting)
|
||||
* Updated default password lists
|
||||
* The protocols vnc, xmpp, telnet, imap, nntp and pcanywhere got accidentially long sleep commands due a patch in 8.2, fixed
|
||||
* Added special error message for clueless users :)
|
||||
|
|
19
hydra.c
19
hydra.c
|
@ -2725,16 +2725,20 @@ int main(int argc, char *argv[]) {
|
|||
if (debug)
|
||||
printf("[DEBUG] opt:%d argc:%d mod:%s tgt:%s port:%u misc:%s\n", optind, argc, hydra_options.service, hydra_options.server, hydra_options.port, hydra_options.miscptr);
|
||||
} else {
|
||||
hydra_options.server = NULL;
|
||||
hydra_options.server = NULL;
|
||||
hydra_options.service = NULL;
|
||||
|
||||
if (modusage)
|
||||
if (modusage) {
|
||||
hydra_options.service = targetdef;
|
||||
else
|
||||
} else
|
||||
help(0);
|
||||
}
|
||||
} else {
|
||||
if (strstr(argv[optind], "://") != NULL) {
|
||||
if (modusage && argv[optind] == NULL) {
|
||||
printf("[ERROR] you must supply a service name after the -U help switch\n");
|
||||
exit(-1);
|
||||
}
|
||||
if (argv[optind] == NULL || strstr(argv[optind], "://") != NULL) {
|
||||
printf("[ERROR] Invalid target definition!\n");
|
||||
printf("[ERROR] Either you use \"www.example.com module [optional-module-parameters]\" *or* you use the \"module://www.example.com/optional-module-parameters\" syntax!\n");
|
||||
exit(-1);
|
||||
|
@ -2801,8 +2805,13 @@ int main(int argc, char *argv[]) {
|
|||
if (strcmp(hydra_options.service, "https-form-post") == 0)
|
||||
strcpy(hydra_options.service, "https-post-form");
|
||||
|
||||
if (modusage == 1)
|
||||
if (modusage == 1) {
|
||||
if (hydra_options.service == NULL) {
|
||||
printf("[ERROR] you must supply a service name after the -U help switch\n");
|
||||
exit(-1);
|
||||
}
|
||||
module_usage();
|
||||
}
|
||||
|
||||
i = 0;
|
||||
if (strcmp(hydra_options.service, "telnet") == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue