Skip to content

Commit

Permalink
fix smtp
Browse files Browse the repository at this point in the history
  • Loading branch information
vanhauser-thc committed Nov 3, 2022
1 parent 8fb5f5e commit feaab90
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ Changelog for hydra
-------------------

Release 9.5-dev
* The help for http-form was wrong. the condition variable must always be
the *last* parameter, not the third
* smb2: fix for updated libsmb2 which resulted in correct guessing attempts
not being detected
* The help for http forms was wrong. the condition variable must always be
the *last* parameter, not the third
* smtp: break early if the server does not allow authentication


Release 9.4
Expand Down
10 changes: 10 additions & 0 deletions hydra-smtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ int32_t start_smtp(int32_t s, char *ip, int32_t port, unsigned char options, cha
return 1;
if (strstr(buf, "334") == NULL) {
hydra_report(stderr, "[ERROR] SMTP PLAIN AUTH : %s\n", buf);
if (strstr(buf, "503") != NULL) {
free(buf);
return 4;
}
free(buf);
return 3;
}
Expand Down Expand Up @@ -438,6 +442,12 @@ void service_smtp(char *ip, int32_t sp, unsigned char options, char *miscptr, FI
}
hydra_child_exit(0);
return;
case 4: /* error exit */
if (sock >= 0) {
sock = hydra_disconnect(sock);
}
hydra_child_exit(3);
return;
default:
hydra_report(stderr, "[ERROR] Caught unknown return code, exiting!\n");
hydra_child_exit(0);
Expand Down

0 comments on commit feaab90

Please sign in to comment.