mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 10:40:36 +00:00
Improve Test Commenting and Coloring
This commit is contained in:
parent
bee219ba84
commit
7cd3e80f26
1 changed files with 8 additions and 8 deletions
|
@ -294,9 +294,9 @@ lines=$(cat ${file})
|
|||
for line in ${lines}; do
|
||||
if
|
||||
curl -v -A "${line}" http://localhost:9000 2>&1 | grep -i 'Welcome'; then
|
||||
echo "${bold}$(tput setaf 2)${line} $(tput setaf 2)was ALLOWED - ${bold}$(tput setaf 2)TEST PASSED"
|
||||
echo "${bold}${green}PASSED - ${green}${line}was ALLOWED"
|
||||
else
|
||||
echo "${bold}$(tput setaf 1)${line} $(tput setaf 1)was NOT ALLOWED - ${bold}$(tput setaf 1)TEST FAILED"
|
||||
echo "${bold}${red}FAILED - ${red}${line} was BLOCKED"
|
||||
fi
|
||||
done
|
||||
IFS=""
|
||||
|
@ -314,9 +314,9 @@ lines=$(cat ${file})
|
|||
for line in ${lines}; do
|
||||
if
|
||||
curl -v -A "${line}" http://localhost:9000 2>&1 | grep -i 'Welcome'; then
|
||||
echo "${bold}$(tput setaf 2)${line} $(tput setaf 2)was ALLOWED - ${bold}$(tput setaf 2)TEST PASSED"
|
||||
echo "${bold}${green}PASSED - ${green}${line} was ALLOWED"
|
||||
else
|
||||
echo "${bold}$(tput setaf 1)${line} $(tput setaf 1)was NOT ALLOWED - ${bold}$(tput setaf 1)TEST FAILED"
|
||||
echo "${bold}${red}FAILED - ${red}${line} was BLOCKED"
|
||||
fi
|
||||
done
|
||||
IFS=""
|
||||
|
@ -333,9 +333,9 @@ lines=$(cat ${file})
|
|||
for line in ${lines}; do
|
||||
if
|
||||
curl -v -A "${line}" http://localhost:9000 2>&1 | grep -i 'Welcome'; then
|
||||
echo "${bold}$(tput setaf 2)${line} $(tput setaf 2)was ALLOWED - ${bold}$(tput setaf 2)TEST PASSED"
|
||||
echo "${bold}${green}PASSED - ${green}${line} was ALLOWED"
|
||||
else
|
||||
echo "${bold}$(tput setaf 1)${line} $(tput setaf 1)was NOT ALLOWED - ${bold}$(tput setaf 1)TEST FAILED"
|
||||
echo "${bold}${green}FAILED - ${red}${line} was BLOCKED"
|
||||
fi
|
||||
done
|
||||
IFS=""
|
||||
|
@ -353,9 +353,9 @@ lines=$(cat ${file})
|
|||
for line in ${lines}; do
|
||||
if
|
||||
curl -I http://localhost:9000 -e "http://${line}" 2>&1 | grep -i '(52)'; then
|
||||
echo "${bold}$(tput setaf 1)${line} $(tput setaf 1)was BLOCKED - ${bold}$(tput setaf 2)TEST PASSED"
|
||||
echo "${bold}${green}PASSED - ${red}${line} was BLOCKED"
|
||||
else
|
||||
echo "${bold}$(tput setaf 1)${line} $(tput setaf 1)was NOT BLOCKED - ${bold}$(tput setaf 1)TEST FAILED"
|
||||
echo "${bold}${red}FAILED - ${red}${line} was NOT BLOCKED"
|
||||
fi
|
||||
done
|
||||
IFS=""
|
||||
|
|
Loading…
Add table
Reference in a new issue