diff --git a/plug-ins/sslstrip/sslstrip.c b/plug-ins/sslstrip/sslstrip.c index e1b3457eb..feaec37a7 100644 --- a/plug-ins/sslstrip/sslstrip.c +++ b/plug-ins/sslstrip/sslstrip.c @@ -458,8 +458,10 @@ static int http_insert_redirect(u_int16 dport) char **param = NULL; if (GBL_CONF->redir_command_on == NULL) + { + USER_MSG("SSLStrip: cannot setup the redirect, did you uncomment the redir_command_on command on your etter.conf file?"); return -EFATAL; - + } snprintf(asc_dport, 16, "%u", dport); command = strdup(GBL_CONF->redir_command_on); @@ -486,7 +488,9 @@ static int http_insert_redirect(u_int16 dport) switch(fork()) { case 0: execvp(param[0], param); - break; + WARN_MSG("Cannot setup http redirect (command: %s), please edit your etter.conf file and put a valid value in redir_command_on field\n", param[0]); + safe_free_http_redirect(param, ¶m_length, command, orig_command); + _exit(EINVALID); case -1: safe_free_http_redirect(param, ¶m_length, command, orig_command); return -EINVALID; @@ -512,8 +516,12 @@ static int http_remove_redirect(u_int16 dport) char *command, *orig_command, *p; char **param = NULL; + if (GBL_CONF->redir_command_off == NULL) - return -EFATAL; + { + USER_MSG("SSLStrip: cannot remove the redirect, did you uncomment the redir_command_off command on your etter.conf file?"); + return -EFATAL; + } snprintf(asc_dport, 16, "%u", dport); @@ -539,9 +547,11 @@ static int http_remove_redirect(u_int16 dport) param_length= i + 1; //because there is a SAFE_REALLOC after the for. switch(fork()) { - case 0: - execvp(param[0], param); - break; + case 0: + execvp(param[0], param); + WARN_MSG("Cannot remove http redirect (command: %s), please edit your etter.conf file and put a valid value in redir_command_on field\n", param[0]); + safe_free_http_redirect(param, ¶m_length, command, orig_command); + _exit(EINVALID); case -1: safe_free_http_redirect(param, ¶m_length, command, orig_command); return -EINVALID; diff --git a/src/ec_sslwrap.c b/src/ec_sslwrap.c index bc9cb2818..c059afc68 100644 --- a/src/ec_sslwrap.c +++ b/src/ec_sslwrap.c @@ -392,8 +392,10 @@ static int sslw_insert_redirect(u_int16 sport, u_int16 dport) /* the script is not defined */ if (GBL_CONF->redir_command_on == NULL) + { + USER_MSG("SSLStrip: cannot setup the redirect, did you uncomment the redir_command_on command on your etter.conf file?"); return -EFATAL; - + } snprintf(asc_sport, 16, "%u", sport); snprintf(asc_dport, 16, "%u", dport); @@ -427,6 +429,7 @@ static int sslw_insert_redirect(u_int16 sport, u_int16 dport) switch (fork()) { case 0: execvp(param[0], param); + WARN_MSG("Cannot setup http redirect (command: %s), please edit your etter.conf file and put a valid value in redir_command_on field\n", param[0]); safe_free_mem(param, ¶m_length, command); _exit(EINVALID); case -1: @@ -456,8 +459,11 @@ static int sslw_remove_redirect(u_int16 sport, u_int16 dport) /* the script is not defined */ if (GBL_CONF->redir_command_off == NULL) + { + USER_MSG("SSLStrip: cannot remove the redirect, did you uncomment the redir_command_off command on your etter.conf file?"); return -EFATAL; - + } + snprintf(asc_sport, 16, "%u", sport); snprintf(asc_dport, 16, "%u", dport); @@ -491,6 +497,7 @@ static int sslw_remove_redirect(u_int16 sport, u_int16 dport) switch (fork()) { case 0: execvp(param[0], param); + WARN_MSG("Cannot remove http redirect (command: %s), please edit your etter.conf file and put a valid value in redir_command_on field\n", param[0]); safe_free_mem(param, ¶m_length, command); _exit(EINVALID); case -1: