more pre-8.0 fixes

This commit is contained in:
vanhauser-thc 2014-04-28 11:45:11 +02:00
parent ebbd664e07
commit 163a499bfe
18 changed files with 74 additions and 76 deletions

View file

@ -28,8 +28,8 @@ int start_asterisk(int s, char *ip, int port, unsigned char options, char *miscp
memset(buffer, 0, sizeof(buffer));
sprintf(buffer, "Action: Login\r\nUsername: %.250s\r\nSecret: %.250s\r\n\r\n", login, pass);
if (verbose || debug)
hydra_report(stderr, "[VERBOSE] C: %s\n", buffer);
if (debug)
hydra_report(stderr, "[DEBUG] C: %s\n", buffer);
if (hydra_send(s, buffer, strlen(buffer), 0) < 0) {
return 1;
@ -37,8 +37,8 @@ int start_asterisk(int s, char *ip, int port, unsigned char options, char *miscp
if ((buf = hydra_receive_line(s)) == NULL)
return 1;
if (verbose || debug)
hydra_report(stderr, "[VERBOSE] S: %s\n", buf);
if (debug)
hydra_report(stderr, "[DEBUG] S: %s\n", buf);
if (buf == NULL || (strstr(buf, "Response: ") == NULL)) {
hydra_report(stderr, "[ERROR] Asterisk Call Manager protocol error or service shutdown: %s\n", buf);