mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-05 12:09:57 +00:00
Fix new curl tests (3)
This commit is contained in:
parent
daa4084bf0
commit
16d4553d0e
2 changed files with 4 additions and 4 deletions
|
@ -128,7 +128,7 @@ run_curltest7 () {
|
||||||
truncate -s 0 $_curltest7
|
truncate -s 0 $_curltest7
|
||||||
printf '\n%s\n%s\n%s\n\n' "################################" "TESTING GOOD REFERRER IS ALLOWED" "################################"
|
printf '\n%s\n%s\n%s\n\n' "################################" "TESTING GOOD REFERRER IS ALLOWED" "################################"
|
||||||
printf '%s%s\n\n' "Last Tested: " "$_now" >> "$_curltest7"
|
printf '%s%s\n\n' "Last Tested: " "$_now" >> "$_curltest7"
|
||||||
curl http://localhost:9000/index.php -e http://google.com 2>> $_curltest7
|
curl http://localhost:9000/index.php -e http://google.com 2>&1 >> $_curltest7
|
||||||
if grep -i 'Welcome' $_curltest7; then
|
if grep -i 'Welcome' $_curltest7; then
|
||||||
echo 'GOOD REFERRER DETECTED - TEST PASSED'
|
echo 'GOOD REFERRER DETECTED - TEST PASSED'
|
||||||
else
|
else
|
||||||
|
@ -145,7 +145,7 @@ run_curltest8 () {
|
||||||
truncate -s 0 $_curltest8
|
truncate -s 0 $_curltest8
|
||||||
printf '\n%s\n%s\n%s\n\n' "################################" "TESTING GOOD REFERRER IS ALLOWED" "################################"
|
printf '\n%s\n%s\n%s\n\n' "################################" "TESTING GOOD REFERRER IS ALLOWED" "################################"
|
||||||
printf '%s%s\n\n' "Last Tested: " "$_now" >> "$_curltest8"
|
printf '%s%s\n\n' "Last Tested: " "$_now" >> "$_curltest8"
|
||||||
curl http://localhost:9000/index.php -e http://bing.com 2>> $_curltest8
|
curl http://localhost:9000/index.php -e http://bing.com 2>&1 >> $_curltest8
|
||||||
if grep -i 'Welcome' $_curltest8; then
|
if grep -i 'Welcome' $_curltest8; then
|
||||||
echo 'GOOD REFERRER DETECTED - TEST PASSED'
|
echo 'GOOD REFERRER DETECTED - TEST PASSED'
|
||||||
else
|
else
|
||||||
|
|
|
@ -128,7 +128,7 @@ run_curltest7 () {
|
||||||
truncate -s 0 $_curltest7
|
truncate -s 0 $_curltest7
|
||||||
printf '\n%s\n%s\n%s\n\n' "################################" "TESTING GOOD REFERRER IS ALLOWED" "################################"
|
printf '\n%s\n%s\n%s\n\n' "################################" "TESTING GOOD REFERRER IS ALLOWED" "################################"
|
||||||
printf '%s%s\n\n' "Last Tested: " "$_now" >> "$_curltest7"
|
printf '%s%s\n\n' "Last Tested: " "$_now" >> "$_curltest7"
|
||||||
curl http://localhost:9000/index.php -e http://google.com 2>> $_curltest7
|
curl http://localhost:9000/index.php -e http://google.com 2>&1 >> $_curltest7
|
||||||
if grep -i 'Welcome' $_curltest7; then
|
if grep -i 'Welcome' $_curltest7; then
|
||||||
echo 'GOOD REFERRER DETECTED - TEST PASSED'
|
echo 'GOOD REFERRER DETECTED - TEST PASSED'
|
||||||
else
|
else
|
||||||
|
@ -145,7 +145,7 @@ run_curltest8 () {
|
||||||
truncate -s 0 $_curltest8
|
truncate -s 0 $_curltest8
|
||||||
printf '\n%s\n%s\n%s\n\n' "################################" "TESTING GOOD REFERRER IS ALLOWED" "################################"
|
printf '\n%s\n%s\n%s\n\n' "################################" "TESTING GOOD REFERRER IS ALLOWED" "################################"
|
||||||
printf '%s%s\n\n' "Last Tested: " "$_now" >> "$_curltest8"
|
printf '%s%s\n\n' "Last Tested: " "$_now" >> "$_curltest8"
|
||||||
curl http://localhost:9000/index.php -e http://bing.com 2>> $_curltest8
|
curl http://localhost:9000/index.php -e http://bing.com 2>&1 >> $_curltest8
|
||||||
if grep -i 'Welcome' $_curltest8; then
|
if grep -i 'Welcome' $_curltest8; then
|
||||||
echo 'GOOD REFERRER DETECTED - TEST PASSED'
|
echo 'GOOD REFERRER DETECTED - TEST PASSED'
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue