mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 20:41:39 -07:00
fixed crash in rtsp module
This commit is contained in:
parent
0b093e67c4
commit
5b6fc88428
14 changed files with 107 additions and 86 deletions
12
hydra-smtp.c
12
hydra-smtp.c
|
@ -37,7 +37,7 @@ char *smtp_read_server_capacity(int32_t sock) {
|
|||
}
|
||||
|
||||
int32_t start_smtp(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE *fp) {
|
||||
char *empty = "";
|
||||
char *empty = "", *result = NULL;
|
||||
char *login, *pass, buffer[500], buffer2[500], *fooptr, *buf;
|
||||
|
||||
if (strlen(login = hydra_get_next_login()) == 0)
|
||||
|
@ -67,7 +67,8 @@ int32_t start_smtp(int32_t s, char *ip, int32_t port, unsigned char options, cha
|
|||
free(buf);
|
||||
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
sasl_plain(buffer, login, pass);
|
||||
result = sasl_plain(buffer, login, pass);
|
||||
if (result == NULL) return 3;
|
||||
|
||||
char tmp_buffer[sizeof(buffer)];
|
||||
sprintf(tmp_buffer, "%.250s\r\n", buffer);
|
||||
|
@ -102,7 +103,8 @@ int32_t start_smtp(int32_t s, char *ip, int32_t port, unsigned char options, cha
|
|||
free(buf);
|
||||
|
||||
memset(buffer2, 0, sizeof(buffer2));
|
||||
sasl_cram_md5(buffer2, pass, buffer);
|
||||
result = sasl_cram_md5(buffer2, pass, buffer);
|
||||
if (result == NULL) return 3;
|
||||
|
||||
sprintf(buffer, "%s %.250s", preplogin, buffer2);
|
||||
hydra_tobase64((unsigned char *)buffer, strlen(buffer), sizeof(buffer));
|
||||
|
@ -135,8 +137,8 @@ int32_t start_smtp(int32_t s, char *ip, int32_t port, unsigned char options, cha
|
|||
hydra_report(stderr, "DEBUG S: %s\n", buffer);
|
||||
|
||||
fooptr = buffer2;
|
||||
sasl_digest_md5(fooptr, login, pass, buffer, miscptr, "smtp", NULL, 0, NULL);
|
||||
if (fooptr == NULL)
|
||||
result = sasl_digest_md5(fooptr, login, pass, buffer, miscptr, "smtp", NULL, 0, NULL);
|
||||
if (result == NULL)
|
||||
return 3;
|
||||
|
||||
if (debug)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue