mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-24 07:05:44 -07:00
fix hydra telnet in some terminals, login failure will be accompanied by %, for example:% Authenticate failed
This commit is contained in:
parent
1756a99580
commit
a69c5d87d6
2 changed files with 14 additions and 9 deletions
|
@ -504,7 +504,10 @@ int32_t service_http_init(char *ip, int32_t sp, unsigned char options, char *mis
|
||||||
}
|
}
|
||||||
|
|
||||||
match_status_code = atoi(status_code);
|
match_status_code = atoi(status_code);
|
||||||
free(status_code);
|
|
||||||
|
if (debug) {
|
||||||
|
hydra_report(stdout, "Find match reply status code: %d", match_status_code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -517,8 +520,8 @@ void usage_http(const char *service) {
|
||||||
"NTLM or MD5\n"
|
"NTLM or MD5\n"
|
||||||
" (h|H)=My-Hdr\\: foo to send a user defined HTTP header with each "
|
" (h|H)=My-Hdr\\: foo to send a user defined HTTP header with each "
|
||||||
"request\n"
|
"request\n"
|
||||||
" (c|C)=check for status code in the HTTP reply. If the reply status "
|
" (c|C)=check for status code in the HTTP reply. If the reply status code\n"
|
||||||
" code matches it, it is judged as successful \n"
|
" matches it, it is judged as successful \n"
|
||||||
" (F|S)=check for text in the HTTP reply. S= means if this text is "
|
" (F|S)=check for text in the HTTP reply. S= means if this text is "
|
||||||
"found, a\n"
|
"found, a\n"
|
||||||
" valid account has been found, F= means if this string is "
|
" valid account has been found, F= means if this string is "
|
||||||
|
|
|
@ -37,6 +37,7 @@ int32_t start_telnet(int32_t s, char *ip, int32_t port, unsigned char options, c
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (strchr(buf, '/') != NULL || strchr(buf, '>') != NULL || strchr(buf, '%') != NULL || strchr(buf, '$') != NULL || strchr(buf, '#') != NULL) {
|
if (strchr(buf, '/') != NULL || strchr(buf, '>') != NULL || strchr(buf, '%') != NULL || strchr(buf, '$') != NULL || strchr(buf, '#') != NULL) {
|
||||||
|
if (strstr(buf, "ailed") == NULL) {
|
||||||
hydra_report_found_host(port, ip, "telnet", fp);
|
hydra_report_found_host(port, ip, "telnet", fp);
|
||||||
hydra_completed_pair_found();
|
hydra_completed_pair_found();
|
||||||
free(buf);
|
free(buf);
|
||||||
|
@ -44,6 +45,7 @@ int32_t start_telnet(int32_t s, char *ip, int32_t port, unsigned char options, c
|
||||||
return 3;
|
return 3;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
(void)make_to_lower(buf);
|
(void)make_to_lower(buf);
|
||||||
|
|
||||||
if (hydra_strcasestr(buf, "asswor") != NULL || hydra_strcasestr(buf, "asscode") != NULL || hydra_strcasestr(buf, "ennwort") != NULL)
|
if (hydra_strcasestr(buf, "asswor") != NULL || hydra_strcasestr(buf, "asscode") != NULL || hydra_strcasestr(buf, "ennwort") != NULL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue