mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 10:40:36 +00:00
Introduce Random Bot Testing in Builds
This commit is contained in:
parent
78e7c1098a
commit
ba0d30a558
1 changed files with 0 additions and 15 deletions
15
test.sh
15
test.sh
|
@ -1,15 +0,0 @@
|
|||
#!/bin/bash
|
||||
echo "Testing 50 Random Bots"
|
||||
IFS=$'\n'
|
||||
file=/home/mitchellkrog/GIT/nginx-ultimate-bad-bot-blocker/.dev-tools/test_units/random-bots-for-test.list
|
||||
lines=$(cat $file)
|
||||
#echo ${lines}
|
||||
for line in $lines; do
|
||||
if
|
||||
curl -v -A "${line}" http://localhost 2>&1 | grep -i '(52)'; then
|
||||
echo "$(tput setaf 1)BAD BOT DETECTED - $(tput setaf 2)TEST PASSED"
|
||||
else
|
||||
echo "$(tput setaf 1)BAD REFERRER NOT DETECTED - TEST FAILED"
|
||||
curl -v -A "${line}" http://localhost 2>&1
|
||||
fi
|
||||
done
|
Loading…
Add table
Reference in a new issue