Skip to content

Commit 48219ba

Browse files
Fix curl tests
1 parent 6c3513c commit 48219ba

26 files changed

+10494
-1
lines changed

.dev-tools/test-blocker-quick.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ if curl -A "Googlebot/Nutch-1.7" http://local.dev:80/index.html 2>&1 | grep -i '
135135
echo "${bold}${green}PASSED - ${red}Googlebot/Nutch-1.7 BAD BOT DETECTED"
136136
else
137137
echo "${bold}${red}FAILED - ${red}Googlebot/Nutch-1.7 BAD BOT NOT DETECTED"
138-
exit 0
138+
#exit 1
139139
fi
140140
}
141141

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
jetmon
2+
libwww-perl
3+
Lynx
4+
munin
5+
Presto
6+
Wget/1.15
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# EDIT THIS FILE AS YOU LIKE TO ADD OR REMOVE ANY BAD WORDS YOU WANT TO SCAN FOR ###
2+
3+
### VERSION INFORMATION #
4+
###################################################
5+
### Version: V4.2019.07
6+
### Updated: 2019-06-24
7+
###################################################
8+
### VERSION INFORMATION ##
9+
10+
##############################################################################
11+
# _ __ _ #
12+
# / |/ /__ _(_)__ __ __ #
13+
# / / _ `/ / _ \\ \ / #
14+
# /_/|_/\_, /_/_//_/_\_\ #
15+
# __/___/ __ ___ __ ___ __ __ #
16+
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
17+
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
18+
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
19+
# #
20+
##############################################################################
21+
22+
# This is merely an example and gets auto included as since Version 2.2017.07 introduced on 2017-04-20
23+
# This file must exist on your system or Nginx will fail a reload due to a missing file
24+
# For all intensive purpose you can delete everything inside this file and leave it
25+
# completely blank if you do not want your Nginx Blocker to include scanning for bad words within urls or referrer string
26+
# Only add one entry per line
27+
28+
# *******************************
29+
# !!! WARNING WARNING WARNING !!!
30+
# *******************************
31+
32+
# ***************************************
33+
# PLEASE BE VERY CAREFUL HOW YOU USE THIS
34+
# ***************************************
35+
# Here is an example of how one supposed bad word can cause your whole site to go down.
36+
# An issue was logged where the users own domain name was specialisteparquet.com
37+
# Because this list contained the word "cialis" it was detected within his domain name causing
38+
# his entire site to go down and not server any assets.
39+
# That one entry would even cause any site containing a word like "specialist" anywhere in any
40+
# of their sites pages to cause them to be blocked and whitelisting your own domain name in the
41+
# whitelist-domains.conf file will not even bypass this, SO BE CAREFUL PLEASE
42+
43+
# Think very carefully before you add any word here
44+
45+
# *****************************************************************************************
46+
# PLEASE MAKE SURE that you use word regex boundaries to avoid false positive detection !!!
47+
# *****************************************************************************************
48+
49+
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
50+
51+
# As you can see in the examples below the word "adultgalls" is entered with a preceding \b and an ending \b
52+
# this makes it now "\badultgalls\b". It is crucial to use the word boundaries regex formatting.
53+
54+
# ---------
55+
# EXAMPLES:
56+
# ---------
57+
# "~*\badultgalls\b" 1;
58+
# "~*\bamateurxpass\b" 1;
59+
# "~*\bbigblackbooty\b" 1;
60+
# "~*\bblacktits\b" 1;
61+
# "~*\bcookie\-law\-enforcement\b" 1;
62+
# "~*\bfree\-share\-buttons\b" 1;
63+
# "~*\bfree\-social\-buttons\b" 1;
64+
# "~*\bfuck\-paid\-share\-buttons\b" 1;
65+
# "~*\bilovevitaly\b" 1;
66+
# "~*\blaw\-enforcement\-bot\b" 1;
67+
# "~*\blaw\-enforcement\-check\b" 1;
68+
# "~*\bshare\-buttons\-for\-free\b" 1;
69+
# "~*\bwebfuck\b" 1;
70+
# "~*\bxxxrus\b" 1;
71+
# "~*\bzeroredirect\b" 1;
72+
73+
"~*(?:\b)thisisabadword(?:\b|)" 1;
74+
"~*(?:\b)thisisanotherbadword(?:\b|)" 1;
75+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
34.66.200.49 1;
2+
127.0.0.1 1;
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# EDIT THIS FILE AS YOU LIKE TO BLACKLIST OR WHITELIST ANY BAD USER-AGENT STRINGS YOU WANT TO SCAN FOR
2+
# ****************************************************************************************************
3+
4+
### VERSION INFORMATION #
5+
###################################################
6+
### Version: V3.2018.05
7+
### Updated: 2018-08-21
8+
###################################################
9+
### VERSION INFORMATION ##
10+
11+
##############################################################################
12+
# _ __ _ #
13+
# / |/ /__ _(_)__ __ __ #
14+
# / / _ `/ / _ \\ \ / #
15+
# /_/|_/\_, /_/_//_/_\_\ #
16+
# __/___/ __ ___ __ ___ __ __ #
17+
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
18+
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
19+
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
20+
# #
21+
##############################################################################
22+
23+
# Add One Entry Per Line - List all the extra bad User-Agents you want to permanently block or whitelist.
24+
25+
# This is for User-Agents that are not included in the main list of the bot blocker
26+
# This file must exist on your system or Nginx will fail a reload due to a missing file
27+
# This allows you finer control of keeping certain bots blocked and automatic updates will
28+
# Never be able to remove this custom list of yours
29+
30+
# Please note this include file loads first before any of the already whitelisted User-Agents
31+
# in the bad bot blocker. By loading first in line it over-rides anything below it so for instance
32+
# if you want to block Baidu, Google or Bing for any reason you add them to this file which loads
33+
# first and takes precedence over anything below it. This now allows even finer control over the
34+
# bad bot blocker. Enjoy !!!
35+
36+
# Even though this file is called blacklist-user-agents, as mentioned it can also be used to whitelist user agents
37+
# By adding them below and setting the 3; to 0; this will permanently whitelist the User-Agent.
38+
39+
# Make sure any words that contain special characters are escaped and include word boundaries as per the Regex examples below.
40+
41+
# Example the User-Agent name "someverybaduseragentname1" is entered as "\bsomeverybaduseragentname1\b"
42+
# Example the User-Agent name "some-very-bad-useragentname2" is entered as "\bsome\-very\-bad\-useragentname1\b"
43+
# the "\b" are word boundaries which prevents partial matching and false positives.
44+
45+
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
46+
47+
# ---------------------
48+
# WHITELISTING EXAMPLES
49+
# ---------------------
50+
# "~*\bsomeverygooduseragentname1\b" 0;
51+
# "~*\bsomeverygooduseragentname2\b" 0;
52+
# "~*\bsome\-very\-good\-useragentname2\b" 0;
53+
54+
# ---------------------
55+
# BLACKLISTING EXAMPLES
56+
# ---------------------
57+
# "~*\bsomeverybaduseragentname1\b" 3;
58+
# "~*\bsomeverybaduseragentname2\b" 3;
59+
# "~*\bsome\-very\-bad\-useragentname2\b" 3;
60+
61+

0 commit comments

Comments
 (0)