mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 10:40:36 +00:00
[BETA] FIX beta-test-blocker-quick.sh cases
False Positive Case Testing now in beta-test-blocker-false-positives.sh REF: #277
This commit is contained in:
parent
4a3fec72fb
commit
b56822e75c
1 changed files with 1 additions and 41 deletions
|
@ -159,42 +159,6 @@ fi
|
|||
}
|
||||
|
||||
run_curltest10 () {
|
||||
if curl -A "Mozilla/5.0 (compatible; Googlebot/Nutch2.1; +http://www.google.com/bot.html)" http://localhost:9000 2>&1 | grep -i '(52)'; then
|
||||
echo "${bold}${green}PASSED - ${red}Googlebot/Nutch2.1 BAD BOT DETECTED"
|
||||
else
|
||||
echo "${bold}${red}FAILED - ${red}Googlebot/Nutch2.1 BAD BOT NOT DETECTED"
|
||||
#exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
run_curltest11 () {
|
||||
if curl -A "Mozilla/5.0 (compatible; Googlebot/nutch/-2.1; +http://www.google.com/bot.html)" http://localhost:9000 2>&1 | grep -i '(52)'; then
|
||||
echo "${bold}${green}PASSED - ${red}Googlebot/nutch/-2.1 BAD BOT DETECTED"
|
||||
else
|
||||
echo "${bold}${red}FAILED - Googlebot/nutch/-2.1 BAD BOT NOT DETECTED"
|
||||
#exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
run_curltest12 () {
|
||||
if curl -A "Mozilla/5.0 (compatible; Googlebot-Image/Snutch\-/-2.1; +http://www.google.com/bot.html)" http://localhost:9000 2>&1 | grep -i 'Welcome'; then
|
||||
echo "${bold}${green}PASSED - NO FALSE POSITIVE on Googlebot-Image/Snutch\-/-2.1"
|
||||
else
|
||||
echo "${bold}${red}FAILED - FALSE POSITIVE FOUND on Googlebot-Image/Snutch\-/-2.1"
|
||||
#exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
run_curltest13 () {
|
||||
if curl -A "SnutchMozilla/5.0 (compatible; Googlebot-Image/SMutch\-/-2.1; +http://www.google.com/bot.html)" http://localhost:9000 2>&1 | grep -i 'Welcome'; then
|
||||
echo "${bold}${green}PASSED - NO FALSE POSITIVE on SnutchMozilla/5.0"
|
||||
else
|
||||
echo "${bold}${red}FAILED - FALSE POSITIVE FOUND on SnutchMozilla/5.0"
|
||||
#exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
run_curltest14 () {
|
||||
if curl -A "Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0" http://localhost:9000 2>&1 | grep -i 'Welcome'; then
|
||||
echo "${bold}${green}PASSED - NO FALSE POSITIVE on Mozilla/5.0"
|
||||
else
|
||||
|
@ -203,7 +167,7 @@ else
|
|||
fi
|
||||
}
|
||||
|
||||
run_curltest15 () {
|
||||
run_curltest11 () {
|
||||
if curl -A "Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/604.1" http://localhost:9000 2>&1 | grep -i 'Welcome'; then
|
||||
echo "${bold}${green}PASSED - NO FALSE POSITIVE on Safari"
|
||||
else
|
||||
|
@ -357,10 +321,6 @@ run_curltest8
|
|||
run_curltest9
|
||||
run_curltest10
|
||||
run_curltest11
|
||||
run_curltest12
|
||||
run_curltest13
|
||||
run_curltest14
|
||||
run_curltest15
|
||||
testBadUserAgents
|
||||
testGoodUserAgents
|
||||
testAllowedUserAgents
|
||||
|
|
Loading…
Add table
Reference in a new issue