diff --git a/dev-tools/install-nginx-2.sh b/dev-tools/install-nginx-2.sh index fa933c99c..9e6f0ef00 100755 --- a/dev-tools/install-nginx-2.sh +++ b/dev-tools/install-nginx-2.sh @@ -201,10 +201,10 @@ echo "${bold}${green}-------------------------------------------------------" echo "${bold}${green}Backup all conf files and folders used during this test" echo "${bold}${green}-------------------------------------------------------" printf "\n" -sudo cp ./usr/local/nginx/bots.d/* ./dev-tools/test2_conf_files/bots.d/ -sudo cp ./usr/local/nginx/conf.d/* ./dev-tools/test2_conf_files/conf.d/ -sudo cp ./etc/nginx/sites-available/default.vhost ./dev-tools/test2_conf_files/default.vhost -sudo cp ./etc/nginx/nginx.conf ./dev-tools/test2_conf_files/nginx.conf +sudo cp /usr/local/nginx/bots.d/* ./dev-tools/test2_conf_files/bots.d/ +sudo cp /usr/local/nginx/conf.d/* ./dev-tools/test2_conf_files/conf.d/ +sudo cp /etc/nginx/sites-available/default.vhost ./dev-tools/test2_conf_files/default.vhost +sudo cp /etc/nginx/nginx.conf ./dev-tools/test2_conf_files/nginx.conf } diff --git a/dev-tools/test-blocker-false-positives.sh b/dev-tools/test-blocker-false-positives.sh index 5c7ee0f90..fc6ccd068 100755 --- a/dev-tools/test-blocker-false-positives.sh +++ b/dev-tools/test-blocker-false-positives.sh @@ -127,11 +127,11 @@ UAtest_mustmatch () { for mustmatch in "${UAmustmatch[@]}" do if - curl -A "${mustmatch}" http://localhost:80 2>&1 | grep -i '(52))'; then + curl -A "${mustmatch}" http://localhost:80 2>&1 | grep -i '(52)'; then echo "${bold}${green}PASSED - ${red}${mustmatch} was ${bold}${red}BLOCKED" else echo "${bold}${red}FAILED - ${red}${mustmatch} was ${bold}${red}NOT BLOCKED" - exit 0 + exit 1 fi done } @@ -142,7 +142,7 @@ do if curl -A "${mustnotmatch}" http://localhost:80 2>&1 | grep -i '(52)'; then echo "${bold}${red}FAILED (FALSE POSITIVE DETECTED) - ${bold}${red}${mustnotmatch}" - exit 0 + exit 1 else echo "${bold}${green}PASSED (No False Positive) - ${bold}${red}${mustnotmatch}" fi @@ -161,7 +161,7 @@ do echo "${bold}${green}PASSED - ${red}${mustmatch} was ${bold}${red}BLOCKED" else echo "${bold}${red}FAILED - ${red}${mustmatch} was ${bold}${red}NOT BLOCKED" - exit 0 + exit 1 fi done } @@ -172,7 +172,7 @@ do if curl -I http://localhost:80 -e "${mustnotmatch}" 2>&1 | grep -i '(52)'; then echo "${bold}${red}FAILED (FALSE POSITIVE DETECTED) - ${bold}${red}${mustnotmatch}" - exit 0 + exit 1 else echo "${bold}${green}PASSED (No False Positive) - ${bold}${red}${mustnotmatch}" fi