mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 18:50:13 +00:00
Improve Test Coloring
This commit is contained in:
parent
7020eaeac1
commit
0ac0167344
1 changed files with 4 additions and 2 deletions
|
@ -258,6 +258,8 @@ fi
|
||||||
run_curltest15
|
run_curltest15
|
||||||
|
|
||||||
bold=$(tput bold)
|
bold=$(tput bold)
|
||||||
|
red=$(tput setaf 1)
|
||||||
|
green=$(tput setaf 2)
|
||||||
# ************************************************
|
# ************************************************
|
||||||
# Test 100 Random User-Agents from Bad-User-Agents
|
# Test 100 Random User-Agents from Bad-User-Agents
|
||||||
# ************************************************
|
# ************************************************
|
||||||
|
@ -273,9 +275,9 @@ lines=$(cat ${file})
|
||||||
for line in ${lines}; do
|
for line in ${lines}; do
|
||||||
if
|
if
|
||||||
curl -v -A "${line}" http://localhost:9000 2>&1 | grep -i '(52)'; then
|
curl -v -A "${line}" http://localhost:9000 2>&1 | grep -i '(52)'; then
|
||||||
echo "${bold}$(tput setaf 1)${line} $(tput setaf 1)was BLOCKED - $(tput setaf 2)TEST PASSED"
|
echo "${bold}${green}PASSED - ${red}${line} was BLOCKED"
|
||||||
else
|
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
|
fi
|
||||||
done
|
done
|
||||||
IFS=""
|
IFS=""
|
||||||
|
|
Loading…
Add table
Reference in a new issue