mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-06 04:51:40 -07:00
warning for smtp/pop3/imap usage with -S when starttls is needed
This commit is contained in:
parent
d89983364b
commit
d1d39badc0
4 changed files with 10 additions and 3 deletions
|
@ -409,7 +409,7 @@ void service_imap(char *ip, int sp, unsigned char options, char *miscptr, FILE *
|
||||||
for (i = 0; i < strlen(miscptr); i++)
|
for (i = 0; i < strlen(miscptr); i++)
|
||||||
miscptr[i] = (char) toupper((int) miscptr[i]);
|
miscptr[i] = (char) toupper((int) miscptr[i]);
|
||||||
|
|
||||||
if (strstr(miscptr, "TLS") || strstr(miscptr, "SSL")) {
|
if (strstr(miscptr, "TLS") || strstr(miscptr, "SSL") || strstr(miscptr, "STARTTLS")) {
|
||||||
disable_tls = 0;
|
disable_tls = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -577,7 +577,7 @@ int service_pop3_init(char *ip, int sp, unsigned char options, char *miscptr, FI
|
||||||
for (i = 0; i < strlen(miscptr); i++)
|
for (i = 0; i < strlen(miscptr); i++)
|
||||||
miscptr[i] = (char) toupper((int) miscptr[i]);
|
miscptr[i] = (char) toupper((int) miscptr[i]);
|
||||||
|
|
||||||
if (strstr(miscptr, "TLS") || strstr(miscptr, "SSL")) {
|
if (strstr(miscptr, "TLS") || strstr(miscptr, "SSL") || strstr(miscptr, "STARTTLS")) {
|
||||||
p.disable_tls = 0;
|
p.disable_tls = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -312,7 +312,7 @@ void service_smtp(char *ip, int sp, unsigned char options, char *miscptr, FILE *
|
||||||
for (i = 0; i < strlen(miscptr); i++)
|
for (i = 0; i < strlen(miscptr); i++)
|
||||||
miscptr[i] = (char) toupper((int) miscptr[i]);
|
miscptr[i] = (char) toupper((int) miscptr[i]);
|
||||||
|
|
||||||
if (strstr(miscptr, "TLS") || strstr(miscptr, "SSL")) {
|
if (strstr(miscptr, "TLS") || strstr(miscptr, "SSL") || strstr(miscptr, "STARTTLS")) {
|
||||||
disable_tls = 0;
|
disable_tls = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
7
hydra.c
7
hydra.c
|
@ -2599,6 +2599,13 @@ int main(int argc, char *argv[]) {
|
||||||
if (getenv("HYDRA_PROXY_CONNECT"))
|
if (getenv("HYDRA_PROXY_CONNECT"))
|
||||||
fprintf(stderr, "[WARNING] The environment variable HYDRA_PROXY_CONNECT is not used! Use HYDRA_PROXY instead!\n");
|
fprintf(stderr, "[WARNING] The environment variable HYDRA_PROXY_CONNECT is not used! Use HYDRA_PROXY instead!\n");
|
||||||
|
|
||||||
|
// wrong option use patch
|
||||||
|
if (hydra_options.ssl && ( ((strcmp(hydra_options.service, "smtp") == 0 || strcmp(hydra_options.service, "smtp-enum") == 0) && hydra_options.port != 465) || \
|
||||||
|
(strcmp(hydra_options.service, "pop3") == 0 && hydra_options.port != 995) || \
|
||||||
|
(strcmp(hydra_options.service, "imap") == 0 && hydra_options.port != 993)
|
||||||
|
))
|
||||||
|
fprintf(stderr, "[WARNING] you want to access SMTP/POP3/IMAP with SSL. Are you sure you want to use direct SSL (-S) instead of STARTTLS (-m TLS)?\n");
|
||||||
|
|
||||||
if (strcmp(hydra_options.service, "http") == 0 || strcmp(hydra_options.service, "https") == 0) {
|
if (strcmp(hydra_options.service, "http") == 0 || strcmp(hydra_options.service, "https") == 0) {
|
||||||
fprintf(stderr, "[ERROR] There is no service \"%s\", most likely you mean one of the many web modules, e.g. http-get or http-form-post. Read it up!\n", hydra_options.service);
|
fprintf(stderr, "[ERROR] There is no service \"%s\", most likely you mean one of the many web modules, e.g. http-get or http-form-post. Read it up!\n", hydra_options.service);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue