Test GHA [ci skip]

This commit is contained in:
Mitchell Krog 2021-07-04 13:55:11 +02:00
parent 517296007a
commit 867894b483
No known key found for this signature in database
GPG key ID: E02E9D10427B6A43
447 changed files with 336888 additions and 0 deletions

59
.github/workflows/action.yml vendored Normal file
View file

@ -0,0 +1,59 @@
# Build Script for Nginx Ultimate Bad Bot Blocker using GHA
name: CI
defaults:
run:
shell: bash
on:
push:
branches:
- master
pull_request:
branches:
- master
services:
nginx:
image: nginx
# Map port 8080 on the Docker host to port 80 on the nginx container
ports:
- 8080:80
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Nginx Stable
run: |
cat /etc/nginx/sites-available/default
sudo apt remove nginx
sudo apt purge nginx
sudo add-apt-repository -y ppa:nginx/stable
sudo apt update
sudo apt install -y --assume-yes nginx-extras
sudo apt -y install dos2unix
- name: Run build
shell: bash
run: |
echo "export TERM=xterm" >> ~/.bashrc
source ~/.bashrc
./dev-tools/generate-files.sh
./dev-tools/install-nginx-1.sh
- name: Debug
shell: bash
run: |
sudo netstat -napt
cat /etc/nginx/nginx.conf
sudo systemctl status nginx.service
if: always()

8
dev-tools/.directory Normal file
View file

@ -0,0 +1,8 @@
[Dolphin]
PreviewsShown=false
Timestamp=2021,6,21,11,38,5.373
Version=4
ViewMode=1
[Settings]
HiddenFilesShown=true

1
dev-tools/.trigger Normal file
View file

@ -0,0 +1 @@
3

View file

@ -0,0 +1,615 @@
01h4x.com
360Spider
404checker
404enemy
80legs
Abonti
Aboundex
Aboundexbot
Acunetix
ADmantX
AfD-Verbotsverfahren
AhrefsBot
AIBOT
AiHitBot
Aipbot
Alexibot
Alligator
AllSubmitter
AlphaBot
Anarchie
Anarchy
Anarchy99
Ankit
Anthill
Apexoo
archive.org_bot
arquivo.pt
arquivo-web-crawler
Aspiegel
ASPSeek
Asterias
Attach
autoemailspider
AwarioRssBot
AwarioSmartBot
BackDoorBot
Backlink-Ceck
backlink-check
BacklinkCrawler
BackStreet
BackWeb
Badass
Bandit
Barkrowler
BatchFTP
Battleztar Bazinga
BBBike
BDCbot
BDFetch
BetaBot
Bigfoot
Bitacle
Blackboard
Black Hole
BlackWidow
BLEXBot
Blow
BlowFish
Boardreader
Bolt
BotALot
Brandprotect
Brandwatch
Buck
Buddy
BuiltBotTough
BuiltWith
Bullseye
BunnySlippers
BuzzSumo
Calculon
CATExplorador
CazoodleBot
CCBot
Cegbfeieh
CensysInspect
check1.exe
CheeseBot
CherryPicker
CheTeam
ChinaClaw
Chlooe
Claritybot
Cliqzbot
Cloud mapping
coccocbot-web
Cocolyzebot
CODE87
Cogentbot
cognitiveseo
Collector
com.plumanalytics
Copier
CopyRightCheck
Copyscape
Cosmos
Craftbot
crawler4j
crawler.feedback
crawl.sogou.com
CrazyWebCrawler
Crescent
CrunchBot
CSHttp
Curious
Custo
CyotekWebCopy
DatabaseDriverMysqli
DataCha0s
DBLBot
demandbase-bot
Demon
Deusu
Devil
Digincore
DigitalPebble
DIIbot
Dirbuster
Disco
Discobot
Discoverybot
Dispatch
DittoSpyder
DnyzBot
DomainAppender
DomainCrawler
DomainSigmaCrawler
Domains Project
domainsproject.org
DomainStatsBot
DomCopBot
Dotbot
Download Wonder
Dragonfly
Drip
DSearch
DTS Agent
EasyDL
Ebingbong
eCatch
ECCP/1.0
Ecxi
EirGrabber
EMail Siphon
EMail Wolf
EroCrawler
evc-batch
Evil
Exabot
Express WebPictures
ExtLinksBot
Extractor
ExtractorPro
Extreme Picture Finder
EyeNetIE
Ezooms
facebookscraper
FDM
FemtosearchBot
FHscan
Fimap
Firefox/7.0
FlashGet
Flunky
Foobot
Freeuploader
FrontPage
Fuzz
FyberSpider
Fyrebot
GalaxyBot
Genieo
GermCrawler
Getintent
GetRight
GetWeb
Gigablast
Gigabot
G-i-g-a-b-o-t
Go-Ahead-Got-It
gopher
Gotit
GoZilla
Go!Zilla
Grabber
GrabNet
Grafula
GrapeFX
GrapeshotCrawler
GridBot
GT::WWW
Haansoft
HaosouSpider
Harvest
Havij
HEADMasterSEO
heritrix
Heritrix
Hloader
HMView
HTMLparser
HTTP::Lite
HTTrack
Humanlinks
HybridBot
Iblog
IDBot
IDBTE4M
Id-search
IlseBot
Image Fetch
Image Sucker
IndeedBot
Indy Library
InfoNaviRobot
InfoTekies
instabid
Intelliseek
InterGET
Internet Ninja
InternetSeer
internetVista monitor
ips-agent
Iria
IRLbot
isitwp.com
Iskanie
IstellaBot
JamesBOT
Jbrofuzz
JennyBot
JetCar
Jetty
JikeSpider
JOC Web Spider
Joomla
Jorgee
JustView
Jyxobot
Kenjin Spider
Keyword Density
Kinza
Kozmosbot
Lanshanbot
Larbin
LeechFTP
LeechGet
LexiBot
Lftp
LibWeb
Libwhisker
LieBaoFast
Lightspeedsystems
Likse
Linkbot
Linkdexbot
LinkextractorPro
LinkpadBot
LinkScan
LinksManager
LinkWalker
LinqiaMetadataDownloaderBot
LinqiaRSSBot
LinqiaScrapeBot
Lipperhey
Lipperhey Spider
Litemage_walker
Lmspider
LNSpiderguy
Ltx71
lwp-request
LWP::Simple
lwp-trivial
Magnet
Mag-Net
magpie-crawler
Mail.RU_Bot
Majestic12
Majestic-SEO
Majestic SEO
MarkMonitor
MarkWatch
Masscan
Mass Downloader
Mata Hari
MauiBot
Mb2345Browser
meanpathbot
Meanpathbot
MeanPath Bot
Mediatoolkitbot
mediawords
MegaIndex.ru
Metauri
MFC_Tear_Sample
MicroMessenger
Microsoft Data Access
Microsoft URL Control
MIDown tool
MIIxpc
Mister PiX
MJ12bot
Moblie Safari
Mojeek
Mojolicious
Morfeus Fucking Scanner
Mozlila
MQQBrowser
Mr.4x3
MSFrontPage
MSIECrawler
Msrabot
MTRobot
muhstik-scan
Musobot
Name Intelligence
Nameprotect
Navroad
NearSite
Needle
Nessus
NetAnts
Netcraft
netEstate NE Crawler
NetLyzer
NetMechanic
NetSpider
Nettrack
Net Vampire
Netvibes
NetZIP
NextGenSearchBot
Nibbler
NICErsPRO
Niki-bot
Nikto
NimbleCrawler
Nimbostratus
Ninja
Nmap
NPbot
Nuclei
Nutch
oBot
Octopus
Offline Explorer
Offline Navigator
OnCrawl
Openfind
OpenLinkProfiler
Openvas
OpenVAS
OPPO A33
OrangeBot
OrangeSpider
OutclicksBot
OutfoxBot
PageAnalyzer
Page Analyzer
PageGrabber
page scorer
PageScorer
PageThing.com
Pandalytics
Panscient
Papa Foto
Pavuk
pcBrowser
PECL::HTTP
PeoplePal
Petalbot
PHPCrawl
Picscout
Picsearch
PictureFinder
Piepmatz
Pimonster
Pi-Monster
Pixray
PleaseCrawl
plumanalytics
Pockey
POE-Component-Client-HTTP
polaris version
probe-image-size
Probethenet
ProPowerBot
ProWebWalker
Psbot
Pu_iN
Pump
PxBroker
PyCurl
QueryN Metasearch
Quick-Crawler
RankActive
RankActiveLinkBot
RankFlex
RankingBot
RankingBot2
Rankivabot
RankurBot
RealDownload
Reaper
RebelMouse
Recorder
RedesScrapy
ReGet
RepoMonkey
Re-re
Ripper
ripz
RocketCrawler
Rogerbot
RSSingBot
s1z.ru
SalesIntelligent
satoristudio.net
SBIder
scalaj-http
ScanAlert
Scanbot
scan.lol
ScoutJet
Scrapy
Screaming
ScreenerBot
ScrepyBot
Searchestate
SearchmetricsBot
Semrush
SemrushBot
SentiBot
seobility
SeobilityBot
SEOkicks
SEOkicks-Robot
SEOlyticsCrawler
Seomoz
SEOprofiler
seoscanners
SeoSiteCheckup
seostar
SEOstats
serpstatbot
sexsearcher
Shodan
Siphon
SISTRIX
Sitebeam
SiteCheckerBotCrawler
sitechecker.pro
SiteExplorer
Siteimprove
SiteLockSpider
siteripz
SiteSnagger
SiteSucker
Site Sucker
Sitevigil
SlySearch
SmartDownload
SMTBot
Snake
Snapbot
Snoopy
SocialRankIOBot
Sociscraper
sogouspider
Sogou web spider
Sosospider
Sottopop
SpaceBison
Spammen
SpankBot
Spanner
sp_auditbot
Spbot
Spinn3r
SputnikBot
spyfu
Sqlmap
Sqlworm
Sqworm
Steeler
Stripper
Sucker
Sucuri
SuperBot
SuperHTTP
Surfbot
SurveyBot
Suzuran
Swiftbot
sysscan
Szukacz
T0PHackTeam
T8Abot
tAkeOut
Teleport
TeleportPro
Telesoft
Telesphoreo
Telesphorep
The Intraformant
TheNomad
Thumbor
TightTwatBot
Titan
Toata
Toweyabot
Tracemyfile
Trendiction
Trendictionbot
trendiction.com
trendiction.de
True_Robot
Turingos
Turnitin
TurnitinBot
TwengaBot
Twice
Typhoeus
UnisterBot
Upflow
URLy.Warning
URLy Warning
Vacuum
Vagabondo
V-BOT
VB Project
VCI
VelenPublicWebCrawler
VeriCiteCrawler
VidibleScraper
Virusdie
VoidEYE
Voil
Voltron
voyagerx.com
Wallpapers/3.0
WallpapersHD
WASALive-Bot
WBSearchBot
Webalta
WebAuto
Web Auto
WebBandit
WebCollage
Web Collage
WebCopier
WEBDAV
WebEnhancer
Web Enhancer
WebFetch
Web Fetch
WebFuck
Web Fuck
WebGo IS
WebImageCollector
WebLeacher
WebmasterWorldForumBot
webmeup-crawler
WebPix
Web Pix
WebReaper
WebSauger
Web Sauger
Webshag
WebsiteExtractor
WebsiteQuester
Website Quester
Webster
WebStripper
WebSucker
Web Sucker
WebWhacker
WebZIP
WeSEE
Whack
Whacker
Whatweb
Who.is Bot
Widow
WinHTTrack
WiseGuys Robot
WISENutbot
Wonderbot
Woobot
Wotbox
Wprecon
WPScan
WWW-Collector-E
WWW-Mechanize
WWW::Mechanize
WWWOFFLE
x09Mozilla
x22Mozilla
Xaldon_WebSpider
Xaldon WebSpider
Xenu
xpymep1.exe
YoudaoBot
Zade
Zauba
zauba.io
Zermelo
Zeus
zgrab
Zitebot
ZmEu
ZoomBot
ZoominfoBot
ZumBot
ZyBorg

71
dev-tools/basic.template Normal file
View file

@ -0,0 +1,71 @@
map $http_user_agent $bad_bot {
default 0;
include /etc/nginx/bots.d/blacklist-user-agents.conf;
# START BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###
# END BAD BOTS ### DO NOT EDIT THIS LINE AT ALL ###
# START GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###
# END GOOD BOTS ### DO NOT EDIT THIS LINE AT ALL ###
# START ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###
# END ALLOWED BOTS ### DO NOT EDIT THIS LINE AT ALL ###
# START LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###
# END LIMITED BOTS ### DO NOT EDIT THIS LINE AT ALL ###
}
map $http_referer $bad_words {
default 0;
include /etc/nginx/bots.d/whitelist-domains.conf;
include /etc/nginx/bots.d/bad-referrer-words.conf;
}
map $http_referer $bad_referer {
hostnames;
default 0;
include /etc/nginx/bots.d/whitelist-domains.conf;
include /etc/nginx/bots.d/custom-bad-referrers.conf;
# START BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###
# END BAD REFERRERS ### DO NOT EDIT THIS LINE AT ALL ###
}
geo $validate_client {
default 0;
include /etc/nginx/bots.d/whitelist-ips.conf;
# START GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###
# END GOOGLE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###
# START BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###
# END BING IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###
# START CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###
# END CLOUDFLARE IP RANGES ### DO NOT EDIT THIS LINE AT ALL ###
# START WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###
# END WP THEME DETECTORS ### DO NOT EDIT THIS LINE AT ALL ###
# START NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###
# END NIBBLER ### DO NOT EDIT THIS LINE AT ALL ###
include /etc/nginx/bots.d/blacklist-ips.conf;
# START KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###
# END KNOWN BAD IP ADDRESSES ### DO NOT EDIT THIS LINE AT ALL ###
}
geo $ratelimited {
default 1;
include /etc/nginx/bots.d/whitelist-ips.conf;
}
map $bad_bot $bot_iplimit {
0 "";
1 "";
2 $binary_remote_addr;
}
limit_conn_zone $bot_iplimit zone=bot2_connlimit:16m;
limit_req_zone $bot_iplimit zone=bot2_reqlimitip:16m rate=2r/s;

View file

@ -0,0 +1,161 @@
#!/bin/bash
# Travis CI Generating and Building for the Nginx Ultimate Bad Bot Blocker (using non standard folder locations)
# Created by: Mitchell Krog (mitchellkrog@gmail.com)
# Copyright: Mitchell Krog - https://github.com/mitchellkrogza
# Repo Url: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------
# ------------------------
# Set Terminal Font Colors
# ------------------------
bold=$(tput bold)
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
blue=$(tput setaf 4)
magenta=$(tput setaf 5)
cyan=$(tput setaf 6)
white=$(tput setaf 7)
defaultcolor=$(tput setaf default)
# ---------
# FUNCTIONS
# ---------
reloadNginX () {
printf "\n"
echo "${bold}${green}---------------"
echo "${bold}${green}Reloading Nginx"
echo "${bold}${green}---------------"
sudo nginx -t && sudo nginx -s reload
}
waitforReload () {
echo "${bold}${yellow}-----------------------------------------------------------------------"
echo "${bold}${yellow}Sleeping for 10 seconds to allow Nginx to Properly Reload inside Travis"
echo "${bold}${yellow}-----------------------------------------------------------------------"
printf "\n"
sleep 10s
}
backupConfFiles () {
echo "${bold}${green}-------------------------------------------------------"
echo "${bold}${green}Backup all conf files and folders used during this test"
echo "${bold}${green}-------------------------------------------------------"
printf "\n"
sudo cp /etc/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files/bots.d/
sudo cp /etc/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files/conf.d/
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files/default.vhost
sudo cp /etc/nginx/nginx.conf ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files/nginx.conf
}
resetNginx () {
printf "\n"
echo "${bold}${yellow}-----------------------------------"
echo "${bold}${yellow}Delete Files to force fresh testing"
echo "${bold}${yellow}-----------------------------------"
printf "\n"
sudo rm /etc/nginx/conf.d/*.conf
sudo rm /etc/nginx/bots.d/*.conf
ls -la /etc/nginx/conf.d/
ls -la /etc/nginx/bots.d/
}
updateBlocker () {
printf "\n"
echo "${bold}${magenta}-------------------------"
echo "${bold}${magenta}Execute update-ngxblocker"
echo "${bold}${magenta}-------------------------"
printf "\n"
cd /usr/sbin
sudo bash ./update-ngxblocker -n
}
copyTestUnit () {
printf "\n"
echo "${bold}${yellow}---------------------------------------------------"
echo "${bold}${yellow}Copy Test Unit of globalblacklist.conf file to test"
echo "${bold}${yellow}---------------------------------------------------"
printf "\n"
#sudo cp ${TRAVIS_BUILD_DIR}/conf.d/globalblacklist-testing-version.conf /etc/nginx/conf.d/globalblacklist.conf
sudo cp ${TRAVIS_BUILD_DIR}/conf.d/globalblacklist-testing-version-oldregexboundaries.conf /etc/nginx/conf.d/globalblacklist.conf
}
# -------------
# Start Install
# -------------
resetNginx
updateBlocker
copyTestUnit
reloadNginX
waitforReload
backupConfFiles
# ----------------------
# Exit With Error Number
# ----------------------
exit ${?}
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------

View file

@ -0,0 +1,153 @@
#!/bin/bash
# Curl Testing Script for Nginx Ultimate Bad Bot Blocker
# Created by: Mitchell Krog (mitchellkrog@gmail.com)
# Copyright: Mitchell Krog - https://github.com/mitchellkrogza
# Repo Url: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------
# ------------------------
# Set Terminal Font Colors
# ------------------------
bold=$(tput bold)
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
blue=$(tput setaf 4)
magenta=$(tput setaf 5)
cyan=$(tput setaf 6)
white=$(tput setaf 7)
defaultcolor=$(tput setaf default)
# ---------
# FUNCTIONS
# ---------
reloadNginX () {
echo "${bold}${green}---------------"
echo "${bold}${green}Reloading Nginx"
echo "${bold}${green}---------------"
printf "\n\n"
sudo nginx -t && sudo nginx -s reload
}
waitforReload () {
echo "${bold}${yellow}-----------------------------------------------------------------------"
echo "${bold}${yellow}Sleeping for 10 seconds to allow Nginx to Properly Reload inside Travis"
echo "${bold}${yellow}-----------------------------------------------------------------------"
printf "\n\n"
sleep 10s
}
activateBadWords () {
echo "${bold}${green}----------------------------------------"
echo "${bold}${green}Activating Users bad-referrer-words.conf"
echo "${bold}${green}----------------------------------------"
printf "\n\n"
sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/bad-referrer-words.conf /etc/nginx/bots.d/bad-referrer-words.conf
}
run_curltest1 () {
if curl -I http://localhost:9000 -e "thisisabadword" 2>&1 | grep -i '(52)'; then
echo "${bold}${green}PASSED - User bad-referrer-words.conf working"
else
echo "${bold}${red}FAILED - User bad-referrer-words.conf NOT working"
exit 1
fi
}
run_curltest2 () {
if curl -I http://localhost:9000 -e "thisisanotherbadword" 2>&1 | grep -i '(52)'; then
echo "${bold}${green}PASSED - User bad-referrer-words.conf working"
else
echo "${bold}${red}FAILED - User bad-referrer-words.conf NOT working"
exit 1
fi
}
# -----------
# Start Tests
# -----------
echo "${bold}${green}--------------------------------"
echo "${bold}${green}Bad Referrer Words Test Starting"
echo "${bold}${green}--------------------------------"
printf "\n\n"
activateBadWords
reloadNginX
waitforReload
run_curltest1
run_curltest2
echo "${bold}${green}--------------------------------"
echo "${bold}${green}Bad Referrer Words Test Complete"
echo "${bold}${green}--------------------------------"
printf "\n\n"
# ----------------------
# Exit With Error Number
# ----------------------
exit ${?}
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------

View file

@ -0,0 +1,224 @@
#!/bin/bash
# Curl Testing Script for Nginx Ultimate Bad Bot Blocker
# Created by: Mitchell Krog (mitchellkrog@gmail.com)
# Copyright: Mitchell Krog - https://github.com/mitchellkrogza
# Repo Url: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------
# -------------------------------------------
# For Testing REGEX and False Positives Cases
# -------------------------------------------
# ------------------------
# Set Terminal Font Colors
# ------------------------
bold=$(tput bold)
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
blue=$(tput setaf 4)
magenta=$(tput setaf 5)
cyan=$(tput setaf 6)
white=$(tput setaf 7)
defaultcolor=$(tput setaf default)
# -----------------------------
# USER-AGENT ARRAY - MUST MATCH
# -----------------------------
UAmustmatch[0]="Titan"
UAmustmatch[1]="Nutch"
UAmustmatch[2]="Ebingbong"
# ---------------------------------
# USER-AGENT ARRAY - MUST NOT MATCH
# ---------------------------------
UAmustnotmatch[0]="Titanium"
UAmustnotmatch[1]="Nutchers"
UAmustnotmatch[2]="SNutch"
UAmustnotmatch[3]="Bing"
UAmustnotmatch[4]="bing"
# ---------------------------
# REFERRER ARRAY - MUST MATCH
# ---------------------------
REFmustmatch[0]="zx6.ru"
REFmustmatch[1]="100dollars-seo.com"
REFmustmatch[2]="googglet.com"
REFmustmatch[3]="www.zx6.ru"
REFmustmatch[4]="www7.100dollars-seo.com"
REFmustmatch[5]="ftp.googglet.com"
# ---------------------------------
# USER-AGENT ARRAY - MUST NOT MATCH
# ---------------------------------
REFmustnotmatch[0]="zx6.russia"
REFmustnotmatch[1]="100dollars-seo.community"
REFmustnotmatch[2]="googglet.co"
REFmustnotmatch[3]="google.com"
# ---------
# FUNCTIONS
# ---------
reloadNginX () {
printf "\n"
echo "${bold}${green}---------------"
echo "${bold}${green}Reloading Nginx"
echo "${bold}${green}---------------"
sudo nginx -t && sudo nginx -s reload
}
waitforReload () {
echo "${bold}${yellow}-----------------------------------------------------------------------"
echo "${bold}${yellow}Sleeping for 10 seconds to allow Nginx to Properly Reload inside Travis"
echo "${bold}${yellow}-----------------------------------------------------------------------"
printf "\n"
sleep 10s
}
# -----------------------
# UA FALSE POSITIVE TESTS
# -----------------------
UAtest_mustmatch () {
for mustmatch in "${UAmustmatch[@]}"
do
if
curl -A "${mustmatch}" http://localhost:9000 2>&1 | grep -i '(52)'; then
echo "${bold}${green}PASSED - ${red}${mustmatch} was ${bold}${red}BLOCKED"
else
echo "${bold}${red}FAILED - ${red}${mustmatch} was ${bold}${red}NOT BLOCKED"
exit 1
fi
done
}
UAtest_mustnotmatch () {
for mustnotmatch in "${UAmustnotmatch[@]}"
do
if
curl -A "${mustnotmatch}" http://localhost:9000 2>&1 | grep -i '(52)'; then
echo "${bold}${red}FAILED (FALSE POSITIVE DETECTED) - ${bold}${red}${mustnotmatch}"
exit 1
else
echo "${bold}${green}PASSED (No False Positive) - ${bold}${red}${mustnotmatch}"
fi
done
}
# -----------------------------
# REFERRER FALSE POSITIVE TESTS
# -----------------------------
REFtest_mustmatch () {
for mustmatch in "${REFmustmatch[@]}"
do
if
curl -I http://localhost:9000 -e "${mustmatch}" 2>&1 | grep -i '(52)'; then
echo "${bold}${green}PASSED - ${red}${mustmatch} was ${bold}${red}BLOCKED"
else
echo "${bold}${red}FAILED - ${red}${mustmatch} was ${bold}${red}NOT BLOCKED"
exit 1
fi
done
}
REFtest_mustnotmatch () {
for mustnotmatch in "${REFmustnotmatch[@]}"
do
if
curl -I http://localhost:9000 -e "${mustnotmatch}" 2>&1 | grep -i '(52)'; then
echo "${bold}${red}FAILED (FALSE POSITIVE DETECTED) - ${bold}${red}${mustnotmatch}"
exit 1
else
echo "${bold}${green}PASSED (No False Positive) - ${bold}${red}${mustnotmatch}"
fi
done
}
# -------------------------
# Trigger Functions / Tests
# -------------------------
UAtest_mustmatch
UAtest_mustnotmatch
REFtest_mustmatch
REFtest_mustnotmatch
echo "${bold}${cyan}False Positive Testing Completed"
echo "${bold}${green}All Tests Passed"
# ----------------------
# Exit With Error Number
# ----------------------
exit ${?}
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------

View file

@ -0,0 +1,242 @@
#!/bin/bash
# Curl Testing Script for Nginx Ultimate Bad Bot Blocker
# Created by: Mitchell Krog (mitchellkrog@gmail.com)
# Copyright: Mitchell Krog - https://github.com/mitchellkrogza
# Repo Url: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------
# ------------------------
# Set Terminal Font Colors
# ------------------------
bold=$(tput bold)
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
blue=$(tput setaf 4)
magenta=$(tput setaf 5)
cyan=$(tput setaf 6)
white=$(tput setaf 7)
defaultcolor=$(tput setaf default)
# ---------
# FUNCTIONS
# ---------
reloadNginX () {
echo "${bold}${green}---------------"
echo "${bold}${green}Reloading Nginx"
echo "${bold}${green}---------------"
printf "\n\n"
sudo nginx -t && sudo nginx -s reload
}
waitforReload () {
echo "${bold}${yellow}-----------------------------------------------------------------------"
echo "${bold}${yellow}Sleeping for 10 seconds to allow Nginx to Properly Reload inside Travis"
echo "${bold}${yellow}-----------------------------------------------------------------------"
printf "\n\n"
sleep 10s
}
ratelimitGoogle () {
echo "${bold}${yellow}-----------------------------"
echo "${bold}${yellow}Making GoogleBot ${yellow}RATE LIMITED"
echo "${bold}${yellow}-----------------------------"
printf "\n\n"
sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/rate-limiting-user-agents.conf /etc/nginx/bots.d/blacklist-user-agents.conf
}
testRateLimiting () {
ratelimittestfile=${TRAVIS_BUILD_DIR}/.dev-tools/test_units/ratelimittest-beta.txt
truncate -s 0 ${ratelimittestfile}
curl -A "GoogleBot" http://localhost:9000 2>&1 > ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile} &
curl -A "GoogleBot" http://localhost:9000 2>&1 >> ${ratelimittestfile}
if grep -i 'Unavailable' < ${ratelimittestfile}; then
echo "${bold}${green}PASSED - ${red}GoogleBot was ${bold}${red}RATE LIMITED"
else
echo "${bold}${red}FAILED - ${red}GoogleBot was ${bold}${red}NOT RATE LIMITED"
#exit 1
fi
}
backupConfFiles () {
printf "\n"
echo "${bold}${green}------------------------------------------------------------"
echo "${bold}${green}Make Backup all conf files and folders used during this test"
echo "${bold}${green}------------------------------------------------------------"
printf "\n"
sudo cp /etc/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files_ratelimiting/bots.d/
sudo cp /etc/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files_ratelimiting/conf.d/
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files_ratelimiting/default.vhost
sudo cp /etc/nginx/nginx.conf ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files_ratelimiting/nginx.conf
}
# -----------
# Start Tests
# -----------
printf "\n"
echo "${bold}${green}---------------------------"
echo "${bold}${green}Starting Rate Limiting Test"
echo "${bold}${green}---------------------------"
printf "\n\n"
ratelimitGoogle
reloadNginX
waitforReload
testRateLimiting
backupConfFiles
printf "\n"
echo "${bold}${green}---------------------------"
echo "${bold}${green}Rate Limiting Test Complete"
echo "${bold}${green}---------------------------"
printf "\n\n"
# ----------------------
# Exit With Error Number
# ----------------------
exit ${?}
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------

View file

@ -0,0 +1,153 @@
#!/bin/bash
# Curl Testing Script for Nginx Ultimate Bad Bot Blocker
# Created by: Mitchell Krog (mitchellkrog@gmail.com)
# Copyright: Mitchell Krog - https://github.com/mitchellkrogza
# Repo Url: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------
# ------------------------
# Set Terminal Font Colors
# ------------------------
bold=$(tput bold)
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
blue=$(tput setaf 4)
magenta=$(tput setaf 5)
cyan=$(tput setaf 6)
white=$(tput setaf 7)
defaultcolor=$(tput setaf default)
# ---------
# FUNCTIONS
# ---------
reloadNginX () {
echo "${bold}${green}---------------"
echo "${bold}${green}Reloading Nginx"
echo "${bold}${green}---------------"
printf "\n\n"
sudo nginx -t && sudo nginx -s reload
}
waitforReload () {
echo "${bold}${yellow}-----------------------------------------------------------------------"
echo "${bold}${yellow}Sleeping for 10 seconds to allow Nginx to Properly Reload inside Travis"
echo "${bold}${yellow}-----------------------------------------------------------------------"
printf "\n\n"
sleep 10s
}
whitelistOwnDomain () {
echo "${bold}${green}---------------------------------------"
echo "${bold}${green}Activating Users whitelist-domains.conf"
echo "${bold}${green}---------------------------------------"
printf "\n\n"
sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/whitelist-domains.conf /etc/nginx/bots.d/whitelist-domains.conf
}
run_curltest1 () {
if curl http://localhost:9000 -e http://www.myowndomain.com 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - User whitelist-domains.conf working"
else
echo "${bold}${red}FAILED - User whitelist-domains.conf NOT working"
exit 1
fi
}
run_curltest2 () {
if curl http://localhost:9000 -e http://www.myotherdomain.com 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - User whitelist-domains.conf working"
else
echo "${bold}${red}FAILED - User whitelist-domains.conf NOT working"
exit 1
fi
}
# -----------
# Start Tests
# -----------
echo "${bold}${green}-------------------------------"
echo "${bold}${green}Whitelist Domains Test Starting"
echo "${bold}${green}-------------------------------"
printf "\n\n"
whitelistOwnDomain
reloadNginX
waitforReload
run_curltest1
run_curltest2
echo "${bold}${green}-------------------------------"
echo "${bold}${green}Whitelist Domains Test Complete"
echo "${bold}${green}-------------------------------"
printf "\n\n"
# ----------------------
# Exit With Error Number
# ----------------------
exit ${?}
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------

View file

@ -0,0 +1,208 @@
#!/bin/bash
# Curl Testing Script for Nginx Ultimate Bad Bot Blocker
# Created by: Mitchell Krog (mitchellkrog@gmail.com)
# Copyright: Mitchell Krog - https://github.com/mitchellkrogza
# Repo Url: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------
# ------------------------
# Set Terminal Font Colors
# ------------------------
bold=$(tput bold)
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
blue=$(tput setaf 4)
magenta=$(tput setaf 5)
cyan=$(tput setaf 6)
white=$(tput setaf 7)
defaultcolor=$(tput setaf default)
thisip=$(dig +short myip.opendns.com @resolver1.opendns.com)
# ---------
# FUNCTIONS
# ---------
reloadNginX () {
echo "${bold}${green}---------------"
echo "${bold}${green}Reloading Nginx"
echo "${bold}${green}---------------"
printf "\n\n"
sudo nginx -t && sudo nginx -s reload
}
waitforReload () {
echo "${bold}${yellow}-----------------------------------------------------------------------"
echo "${bold}${yellow}Sleeping for 10 seconds to allow Nginx to Properly Reload inside Travis"
echo "${bold}${yellow}-----------------------------------------------------------------------"
printf "\n\n"
sleep 10s
}
run_curltest1 () {
if curl http://localhost:9000 2>&1 | grep -i '(52)'; then
echo "${bold}${green}PASSED - ${bold}${red}blacklist own ip is WORKING"
else
echo "${bold}${red}FAILED - blacklist own ip is NOT working"
exit 1
fi
}
run_curltest2 () {
if curl http://localhost:9000 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - whitelist own ip is WORKING"
else
echo "${bold}${red}FAILED - whitelist own ip is NOT working"
curl http://localhost:9000
exit 1
fi
}
backupConfFiles () {
printf "\n"
echo "${bold}${green}------------------------------------------------------------"
echo "${bold}${green}Make Backup all conf files and folders used during this test"
echo "${bold}${green}------------------------------------------------------------"
printf "\n"
sudo cp /etc/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files_ip_whitelist/bots.d/
sudo cp /etc/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files_ip_whitelist/conf.d/
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files_ip_whitelist/default.vhost
sudo cp /etc/nginx/nginx.conf ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files_ip_whitelist/nginx.conf
}
blacklistOwnIP () {
sudo truncate -s 0 ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/blacklist-ips.conf
printf '%s\t%s\n' "${thisip}" "1;" > ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/blacklist-ips.conf
printf '%s\t%s\n' "127.0.0.1" "1;" >> ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/blacklist-ips.conf
sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/blacklist-ips.conf /etc/nginx/bots.d/blacklist-ips.conf
sudo truncate -s 0 ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/whitelist-ips.conf
sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/whitelist-ips.conf /etc/nginx/bots.d/whitelist-ips.conf
}
whitelistOwnIP () {
sudo truncate -s 0 ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/whitelist-ips.conf
printf '%s\t%s\n' "${thisip}" "0;" > ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/whitelist-ips.conf
printf '%s\t%s\n' "127.0.0.1" "0;" >> ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/whitelist-ips.conf
sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/whitelist-ips.conf /etc/nginx/bots.d/whitelist-ips.conf
# TEST ANY CHANGES TO botblocker-nginx-settings.conf
sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/botblocker-nginx-settings.conf /etc/nginx/conf.d/botblocker-nginx-settings.conf
}
# -----------
# Start Tests
# -----------
echo "${bold}${green}--------------------------"
echo "${bold}${green}Whitelist IP Test Starting"
echo "${bold}${green}--------------------------"
printf "\n\n"
echo "${bold}${green}-------------------------"
echo "${bold}${green}Blacklisting own IP First"
echo "${bold}${green}-------------------------"
printf "\n\n"
blacklistOwnIP
reloadNginX
waitforReload
# *************************************************
# Function Curl Test 1 - Test our IP is Blacklisted
# *************************************************
run_curltest1
echo "${bold}${green}--------------------"
echo "${bold}${green}Now Whitelist own IP"
echo "${bold}${green}--------------------"
printf "\n\n"
whitelistOwnIP
reloadNginX
waitforReload
# *************************************************
# Function Curl Test 2 - Test our IP is Whitelisted
# *************************************************
run_curltest2
echo "${bold}${green}-----------------------------"
echo "${bold}${green}Whitelisting IP Test Complete"
echo "${bold}${green}-----------------------------"
printf "\n\n"
# *************************************************************
# Copy all .conf files used in Testing to a folder for checking
# *************************************************************
backupConfFiles
# **********************
# Exit With Error Number
# **********************
exit ${?}
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------

View file

@ -0,0 +1,305 @@
#!/bin/bash
# Curl Testing Script for Nginx Ultimate Bad Bot Blocker
# Created by: Mitchell Krog (mitchellkrog@gmail.com)
# Copyright: Mitchell Krog - https://github.com/mitchellkrogza
# Repo Url: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------
# ------------------------
# Set Terminal Font Colors
# ------------------------
bold=$(tput bold)
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
blue=$(tput setaf 4)
magenta=$(tput setaf 5)
cyan=$(tput setaf 6)
white=$(tput setaf 7)
defaultcolor=$(tput setaf default)
# ---------
# FUNCTIONS
# ---------
reloadNginX () {
echo "${bold}${green}---------------"
echo "${bold}${green}Reloading Nginx"
echo "${bold}${green}---------------"
printf "\n\n"
sudo nginx -t && sudo nginx -s reload
}
waitforReload () {
echo "${bold}${yellow}-----------------------------------------------------------------------"
echo "${bold}${yellow}Sleeping for 10 seconds to allow Nginx to Properly Reload inside Travis"
echo "${bold}${yellow}-----------------------------------------------------------------------"
printf "\n\n"
sleep 10s
}
run_curltest1 () {
if curl -v -A "Nutch" http://localhost:9000 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - WHITELISTING OF BAD BOT Nutch ALLOWED"
else
echo "${bold}${red}FAILED - WHITELISTING of BAD BOT Nutch FAILED"
#exit 1
curl -v -A "Nutch" http://localhost:9000 2>&1
fi
}
run_curltest2 () {
if curl http://localhost:9000 -e http://zx6.ru 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - WHITELISTING OF REFERRER zx6.ru ALLOWED"
else
echo "${bold}${red}FAILED - WHITELISTING OF REFERRER zx6.ru FAILED"
#exit 1
curl http://localhost:9000 -e http://zx6.ru 2>&1
fi
}
generateCustomBlackLists () {
echo "${bold}${magenta}-----------------------------------------------------------------"
echo "${bold}${magenta}Generating blacklist-user-agents.conf & custom-bad-referrers.conf"
echo "${bold}${magenta}-----------------------------------------------------------------"
printf "\n\n"
_input1=${TRAVIS_BUILD_DIR}/_generator_lists/bad-user-agents.list
_input2=${TRAVIS_BUILD_DIR}/.dev-tools/referrers-regex-format-whitelist-test.txt
_inputdb1=${TRAVIS_BUILD_DIR}/.dev-tools/good-bad-user-agents.db
_inputdb2=${TRAVIS_BUILD_DIR}/.dev-tools/good-bad-referrers.db
_tmpnginx1=_tmpnginx1
_tmpnginx2=_tmpnginx2
_start1="# START MAKE BAD BOTS GOOD ### DO NOT EDIT THIS LINE AT ALL ###"
_end1="# END MAKE BAD BOTS GOOD ### DO NOT EDIT THIS LINE AT ALL ###"
_start2="# START MAKE BAD REFERRERS GOOD ### DO NOT EDIT THIS LINE AT ALL ###"
_end2="# END MAKE BAD REFERRERS GOOD ### DO NOT EDIT THIS LINE AT ALL ###"
_action1="0;"
# ----------------------------
# BAD BOTS - Create and Insert
# ----------------------------
echo "${bold}${yellow}------------------------"
echo "${bold}${green}Making all ${red}Bad Bots ${green}GOOD"
echo "${bold}${yellow}------------------------"
printf "\n\n"
printf '%s\n' "$_start1" >> ${_tmpnginx1}
while IFS= read -r LINE
do
printf '\t"~*%s%s"\t\t%s\n' "(?:\b)${LINE}" "(?:\b|)" "$_action1" >> ${_tmpnginx1}
done < ${_input1}
printf '%s\n' "$_end1" >> ${_tmpnginx1}
mv ${_tmpnginx1} ${_inputdb1}
ed -s ${_inputdb1}<<\IN
1,/# START MAKE BAD BOTS GOOD ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END MAKE BAD BOTS GOOD ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/test_units/blacklist-user-agents.conf
/# START MAKE BAD BOTS GOOD ### DO NOT EDIT THIS LINE AT ALL ###/x
.t.
.,/# END MAKE BAD BOTS GOOD ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/test_units/blacklist-user-agents.conf
q
IN
rm ${_inputdb1}
# --------------------------------
# BAD REFERERS - Create and Insert
# --------------------------------
echo "${bold}${yellow}-----------------------------"
echo "${bold}${green}Making all ${red}Bad Referrers ${green}GOOD"
echo "${bold}${yellow}-----------------------------"
printf "\n\n"
printf '%s\n' "$_start2" >> ${_tmpnginx2}
while IFS= read -r LINE
do
printf '\t%s\n' "${LINE}" >> ${_tmpnginx2}
done < ${_input2}
printf '%s\n' "$_end2" >> ${_tmpnginx2}
mv ${_tmpnginx2} ${_inputdb2}
ed -s ${_inputdb2}<<\IN
1,/# START MAKE BAD REFERRERS GOOD ### DO NOT EDIT THIS LINE AT ALL ###/d
/# END MAKE BAD REFERRERS GOOD ### DO NOT EDIT THIS LINE AT ALL ###/,$d
,d
.r /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/test_units/custom-bad-referrers.conf
/# START MAKE BAD REFERRERS GOOD ### DO NOT EDIT THIS LINE AT ALL ###/x
.t.
.,/# END MAKE BAD REFERRERS GOOD ### DO NOT EDIT THIS LINE AT ALL ###/-d
w /home/travis/build/mitchellkrogza/nginx-ultimate-bad-bot-blocker/.dev-tools/test_units/custom-bad-referrers.conf
q
IN
rm ${_inputdb2}
}
activateCustomBlackLists () {
echo "${bold}${green}------------------------------------------------"
echo "${bold}${green}Activating Users User-Agents Whitelist/Blacklist"
echo "${bold}${green}------------------------------------------------"
printf "\n\n"
sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/blacklist-user-agents.conf /etc/nginx/bots.d/blacklist-user-agents.conf
echo "${bold}${green}----------------------------------------------"
echo "${bold}${green}Activating Users Referrers Whitelist/Blacklist"
echo "${bold}${green}----------------------------------------------"
printf "\n\n"
sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/custom-bad-referrers.conf /etc/nginx/bots.d/custom-bad-referrers.conf
}
testBadUserAgents () {
shuf -n 250 ${TRAVIS_BUILD_DIR}/_generator_lists/bad-user-agents.list > ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-bots-for-whitelist-test.tmp
sed 's/\\//g' ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-bots-for-whitelist-test.tmp > ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-bots-for-whitelist-test.list
sudo rm ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-bots-for-whitelist-test.tmp
sort -u ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-bots-for-whitelist-test.list -o ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-bots-for-whitelist-test.list
printf "\n\n"
echo "${bold}${magenta}---------------------------"
echo "${bold}${magenta}Testing 250 Random Bad Bots"
echo "${bold}${magenta}---------------------------"
printf "\n\n"
IFS=$'\n'
file=${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-bots-for-whitelist-test.list
lines=$(cat ${file})
for line in ${lines}; do
if
curl -v -A "${line}" http://localhost:9000 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - ${red}${line} was ${bold}${green}ALLOWED"
else
echo "${bold}${red}FAILED - ${red}${line} was ${bold}${red}NOT ALLOWED"
exit 1
fi
done
IFS=""
}
testBadReferrers () {
shuf -n 250 ${TRAVIS_BUILD_DIR}/_generator_lists/bad-referrers.list > ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-referrers-for-whitelist-test.tmp
sed 's/\\//g' ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-referrers-for-whitelist-test.tmp > ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-referrers-for-whitelist-test.list
sudo rm ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-referrers-for-whitelist-test.tmp
sort -u ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-referrers-for-whitelist-test.list -o ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-referrers-for-whitelist-test.list
printf "\n\n"
echo "${bold}${magenta}----------------------------"
echo "${bold}${magenta}Testing 250 Random Referrers"
echo "${bold}${magenta}----------------------------"
printf "\n\n"
IFS=$'\n'
file=${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-referrers-for-whitelist-test.list
lines=$(cat ${file})
for line in ${lines}; do
if
curl http://localhost:9000 -e "http://${line}" 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - ${red}${line} was ${bold}${green}ALLOWED"
else
echo "${bold}${red}FAILED - ${red}${line} was ${bold}${red}NOT ALLOWED"
exit 1
fi
done
IFS=""
}
backupConfFiles () {
printf "\n"
echo "${bold}${green}------------------------------------------------------------"
echo "${bold}${green}Make Backup all conf files and folders used during this test"
echo "${bold}${green}------------------------------------------------------------"
printf "\n"
sudo cp /etc/nginx/bots.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files_whitelist/bots.d/
sudo cp /etc/nginx/conf.d/* ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files_whitelist/conf.d/
sudo cp /etc/nginx/sites-available/default.vhost ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files_whitelist/default.vhost
sudo cp /etc/nginx/nginx.conf ${TRAVIS_BUILD_DIR}/.dev-tools/beta_conf_files_whitelist/nginx.conf
}
# -----------
# Start Tests
# -----------
echo "${bold}${green}--------------------------"
echo "${bold}${green}Whitelisting Test Starting"
echo "${bold}${green}--------------------------"
printf "\n\n"
generateCustomBlackLists
activateCustomBlackLists
reloadNginX
waitforReload
run_curltest1
run_curltest2
testBadUserAgents
testBadReferrers
backupConfFiles
echo "${bold}${green}--------------------------"
echo "${bold}${green}Whitelisting Test Complete"
echo "${bold}${green}--------------------------"
printf "\n\n"
# ----------------------
# Exit With Error Number
# ----------------------
exit ${?}
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------

371
dev-tools/beta-test-blocker.sh Executable file
View file

@ -0,0 +1,371 @@
#!/bin/bash
# Curl Testing Script for Nginx Ultimate Bad Bot Blocker
# Created by: Mitchell Krog (mitchellkrog@gmail.com)
# Copyright: Mitchell Krog - https://github.com/mitchellkrogza
# Repo Url: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------
# ------------------------
# Set Terminal Font Colors
# ------------------------
bold=$(tput bold)
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
blue=$(tput setaf 4)
magenta=$(tput setaf 5)
cyan=$(tput setaf 6)
white=$(tput setaf 7)
defaultcolor=$(tput setaf default)
# ---------
# FUNCTIONS
# ---------
reloadNginX () {
printf "\n"
echo "${bold}${green}---------------"
echo "${bold}${green}Reloading Nginx"
echo "${bold}${green}---------------"
sudo nginx -t && sudo nginx -s reload
}
waitforReload () {
echo "${bold}${yellow}-----------------------------------------------------------------------"
echo "${bold}${yellow}Sleeping for 10 seconds to allow Nginx to Properly Reload inside Travis"
echo "${bold}${yellow}-----------------------------------------------------------------------"
printf "\n"
sleep 10s
}
run_curltest1 () {
if curl -A "80legs" http://localhost:9000 2>&1 | grep -i '(52)'; then
echo "${bold}${green}PASSED - ${red}80legs BAD BOT DETECTED"
else
echo "${bold}${red}FAILED - ${red}80legs BAD BOT NOT DETECTED"
curl -A "80legs" http://localhost:9000 2>&1
exit 1
fi
}
run_curltest2 () {
if curl -A "Nutch" http://localhost:9000 2>&1 | grep -i '(52)'; then
echo "${bold}${green}PASSED - ${red}Nutch BAD BOT DETECTED"
else
echo "${bold}${red}FAILED - ${red}Nutch BAD BOT NOT DETECTED"
exit 1
fi
}
run_curltest3 () {
if curl -I http://localhost:9000 -e http://100dollars-seo.com 2>&1 | grep -i '(52)'; then
echo "${bold}${green}PASSED - ${red}100dollars-seo.com BAD REFERRER DETECTED"
else
echo "${bold}${red}FAILED - ${red}100dollars-seo.com BAD REFERRER NOT DETECTED"
exit 1
fi
}
run_curltest4 () {
if curl -I http://localhost:9000 -e http://zx6.ru 2>&1 | grep -i '(52)'; then
echo "${bold}${green}PASSED - ${red}zx6.ru BAD REFERRER DETECTED"
else
echo "${bold}${red}FAILED - ${red}zx6.ru BAD REFERRER NOT DETECTED"
exit 1
fi
}
run_curltest5 () {
if curl -A "GoogleBot" http://localhost:9000 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - ${green}GoogleBot GOOD BOT ALLOWED THROUGH"
else
echo "${bold}${red}FAILED - ${red}GoogleBot GOOD BOT NOT ALLOWED THROUGH"
exit 1
fi
}
run_curltest6 () {
if curl -A "BingBot" http://localhost:9000 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - ${green}BingBot GOOD BOT ALLOWED THROUGH"
else
echo "${bold}${red}FAILED - ${red}BingBot GOOD BOT NOT ALLOWED THROUGH"
exit 1
fi
}
run_curltest7 () {
if curl http://localhost:9000 -e http://google.com 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - ${green}google.com GOOD REFERRER DETECTED"
else
echo "${bold}${red}FAILED - ${red}google.com GOOD REFERRER NOT DETECTED"
exit 1
fi
}
run_curltest8 () {
if curl http://localhost:9000 -e http://bing.com 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - ${red}bing.com GOOD REFERRER DETECTED"
else
echo "${bold}${red}FAILED - ${red}bing.com GOOD REFERRER NOT DETECTED"
exit 1
fi
}
run_curltest9 () {
if curl -A "Googlebot/Nutch-1.7" http://localhost:9000 2>&1 | grep -i '(52)'; then
echo "${bold}${green}PASSED - ${red}Googlebot/Nutch-1.7 BAD BOT DETECTED"
else
echo "${bold}${red}FAILED - ${red}Googlebot/Nutch-1.7 BAD BOT NOT DETECTED"
exit 1
fi
}
run_curltest10 () {
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
echo "${bold}${red}FAILED - FALSE POSITIVE FOUND on Mozilla/5.0"
exit 1
fi
}
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
echo "${bold}${red}FAILED - FALSE POSITIVE FOUND on Safari"
exit 1
fi
}
testBadUserAgents () {
shuf -n 250 ${TRAVIS_BUILD_DIR}/_generator_lists/bad-user-agents.list > ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-bots-for-test.tmp
sed 's/\\//g' ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-bots-for-test.tmp > ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-bots-for-test.list
sudo rm ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-bots-for-test.tmp
sort -u ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-bots-for-test.list -o ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-bots-for-test.list
printf "\n"
echo "${bold}${magenta}---------------------------"
echo "${bold}${magenta}Testing 250 Random Bad Bots"
echo "${bold}${magenta}---------------------------"
IFS=$'\n'
file=${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-bots-for-test.list
lines=$(cat ${file})
for line in ${lines}; do
if
curl -A "${line}" http://localhost:9000 2>&1 | grep -i '(52)'; then
echo "${bold}${green}PASSED - ${red}${line} was ${bold}${red}BLOCKED"
else
echo "${bold}${red}FAILED - ${red}${line} was ${bold}${red}NOT BLOCKED"
exit 1
fi
done
IFS=""
}
testGoodUserAgents () {
sed 's/\\//g' ${TRAVIS_BUILD_DIR}/_generator_lists/good-user-agents.list > ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/good-bots-for-test.list
printf "\n"
echo "${bold}${magenta}---------------------"
echo "${bold}${magenta}Testing All Good Bots"
echo "${bold}${magenta}---------------------"
IFS=$'\n'
file=${TRAVIS_BUILD_DIR}/.dev-tools/test_units/good-bots-for-test.list
lines=$(cat ${file})
for line in ${lines}; do
if
curl -A "${line}" http://localhost:9000 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - ${green}${line} was ${bold}${green}ALLOWED"
else
echo "${bold}${red}FAILED - ${red}${line} was ${bold}${red}BLOCKED"
exit 1
fi
done
IFS=""
}
testAllowedUserAgents () {
sed 's/\\//g' ${TRAVIS_BUILD_DIR}/_generator_lists/allowed-user-agents.list > ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/allowed-bots-for-test.list
printf "\n"
echo "${bold}${magenta}------------------------"
echo "${bold}${magenta}Testing All Allowed Bots"
echo "${bold}${magenta}------------------------"
IFS=$'\n'
file=${TRAVIS_BUILD_DIR}/.dev-tools/test_units/allowed-bots-for-test.list
lines=$(cat ${file})
for line in ${lines}; do
if
curl -A "${line}" http://localhost:9000 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - ${green}${line} was ${bold}${green}ALLOWED"
else
echo "${bold}${red}FAILED - ${red}${line} was ${bold}${red}BLOCKED"
exit 1
fi
done
IFS=""
}
testLimitedUserAgents () {
sed 's/\\//g' ${TRAVIS_BUILD_DIR}/_generator_lists/limited-user-agents.list > ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/limited-bots-for-test.list
printf "\n"
echo "${bold}${magenta}------------------------"
echo "${bold}${magenta}Testing All Limited Bots"
echo "${bold}${magenta}------------------------"
IFS=$'\n'
file=${TRAVIS_BUILD_DIR}/.dev-tools/test_units/limited-bots-for-test.list
lines=$(cat ${file})
for line in ${lines}; do
if
curl -A "${line}" http://localhost:9000 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - ${green}${line} was ${bold}${green}ALLOWED and ${bold}${red}RATE LIMITED"
else
echo "${bold}${green}FAILED - ${red}${line} was ${bold}${red}BLOCKED"
exit 1
fi
done
IFS=""
}
testRandomReferrers () {
shuf -n 500 ${TRAVIS_BUILD_DIR}/_generator_lists/bad-referrers.list > ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-referrers-for-test.list
sort -u ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-referrers-for-test.list -o ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-referrers-for-test.list
printf "\n"
echo "${bold}${magenta}---------------------------------"
echo "${bold}${magenta}Testing 500 Random Bad Referrers"
echo "${bold}${magenta}---------------------------------"
IFS=$'\n'
file=${TRAVIS_BUILD_DIR}/.dev-tools/test_units/random-referrers-for-test.list
lines=$(cat ${file})
for line in ${lines}; do
if
curl -I http://localhost:9000 -e "http://${line}" 2>&1 | grep -i '(52)'; then
echo "${bold}${green}PASSED - ${red}${line} was ${bold}${red}BLOCKED"
else
echo "${bold}${red}FAILED - ${red}${line} was ${bold}${red}NOT BLOCKED"
exit 1
fi
done
IFS=""
}
testGoodReferrers () {
printf "\n"
echo "${bold}${magenta}----------------------"
echo "${bold}${magenta}Testing Good Referrers"
echo "${bold}${magenta}----------------------"
IFS=$'\n'
file=${TRAVIS_BUILD_DIR}/.dev-tools/test_units/good-referrers-for-test.list
lines=$(cat ${file})
for line in ${lines}; do
if
curl -A "${line}" http://localhost:9000 2>&1 | grep -i 'Welcome'; then
echo "${bold}${green}PASSED - ${green}${line} was ${bold}${green}ALLOWED"
else
echo "${bold}${green}FAILED - ${red}${line} was ${bold}${red}BLOCKED"
exit 1
fi
done
IFS=""
}
# -----------
# Start Tests
# -----------
echo "${bold}${green}--------------"
echo "${bold}${green}Tests Starting"
echo "${bold}${green}--------------"
printf "\n"
reloadNginX
waitforReload
run_curltest1
run_curltest2
run_curltest3
run_curltest4
run_curltest5
run_curltest6
run_curltest7
run_curltest8
run_curltest9
run_curltest10
run_curltest11
testBadUserAgents
testGoodUserAgents
testAllowedUserAgents
testLimitedUserAgents
testRandomReferrers
testGoodReferrers
echo "${bold}${cyan}Tests Completed"
echo "${bold}${green}All Tests Passed"
echo "${bold}${magenta}Now We Test Whitelisting and then Release a new build"
# ----------------------
# Exit With Error Number
# ----------------------
exit ${?}
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------

View file

View file

@ -0,0 +1 @@
null

View file

@ -0,0 +1,92 @@
# EDIT THIS FILE AS YOU LIKE TO ADD OR REMOVE ANY BAD WORDS YOU WANT TO SCAN FOR ###
# VERSION INFORMATION #
#----------------------
# Version: V4.2019.11
# Updated: 2019-07-05
#----------------------
# VERSION INFORMATION #
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# This is merely an example and gets auto included as since Version 2.2017.07 introduced on 2017-04-20
# This file must exist on your system or Nginx will fail a reload due to a missing file
# For all intensive purpose you can delete everything inside this file and leave it
# completely blank if you do not want your Nginx Blocker to include scanning for bad words within urls or referrer string
# Only add one entry per line
# -------------------------------
# !!! WARNING WARNING WARNING !!!
# -------------------------------
# ---------------------------------------
# PLEASE BE VERY CAREFUL HOW YOU USE THIS
# ---------------------------------------
# Here is an example of how one supposed bad word can cause your whole site to go down.
# An issue was logged where the users own domain name was specialisteparquet.com
# Because this list contained the word "cialis" it was detected within his domain name causing
# his entire site to go down and not server any assets.
# That one entry would even cause any site containing a word like "specialist" anywhere in any
# of their sites pages to cause them to be blocked and whitelisting your own domain name in the
# whitelist-domains.conf file will not even bypass this, SO BE CAREFUL PLEASE
# Think very carefully before you add any word here
# -----------------------------------------------------------------------------------------
# PLEASE MAKE SURE that you use word regex boundaries to avoid false positive detection !!!
# -----------------------------------------------------------------------------------------
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# As you can see in the examples below the word "adultgalls" is entered with a preceding (?:\b) and an ending (?:\b)
# this makes it now "(?:\b)adultgalls(?:\b)". It is crucial to use the word boundaries regex formatting.
# ---------
# EXAMPLES:
# ---------
# "~*(?:\b)adultgalls(?:\b)" 1;
# "~*(?:\b)amateurxpass(?:\b)" 1;
# "~*(?:\b)bigblackbooty(?:\b)" 1;
# "~*(?:\b)blacktits(?:\b)" 1;
# "~*(?:\b)cookie\-law\-enforcement(?:\b)" 1;
# "~*(?:\b)free\-share\-buttons(?:\b)" 1;
# "~*(?:\b)free\-social\-buttons(?:\b)" 1;
# "~*(?:\b)fuck\-paid\-share\-buttons(?:\b)" 1;
# "~*(?:\b)ilovevitaly(?:\b)" 1;
# "~*(?:\b)law\-enforcement\-bot(?:\b)" 1;
# "~*(?:\b)law\-enforcement\-check(?:\b)" 1;
# "~*(?:\b)share\-buttons\-for\-free(?:\b)" 1;
# "~*(?:\b)webfuck(?:\b)" 1;
# "~*(?:\b)xxxrus(?:\b)" 1;
# "~*(?:\b)zeroredirect(?:\b)" 1;
# "~*(?:\b|)x22(?:\b)" 1; (in this string if your own domain name was sex22.com it would be blocked)
# Here is a list of unsanitary words used in referrer strings - used in various injection attacks
# THE RULES BELOW ARE ENABLED BY DEFAULT
# You can disable this default list by switching the values to 0
"~*(?:\b|)mb_ereg_replace(?:\b|)" 1;
# -----------
# PLEASE NOTE
# -----------
# If you whitelist your own domain in whitelist-domains.conf and your own domain is passed in the referrer string with an attack string it will NOT be blocked.
# --------
# EXAMPLE:
# --------
# This string "http://yourwebsite.com/?s=/index/%5Cthink%5Capp/invokefunction&function=call_user_func_array&vars[0]=file_put_contents&vars[1][]=gqopu.php&vars[1][]=<?php mb_ereg_replace('.*',@$_REQUEST[_], '', 'e');?>$"
# contains the above 'mb_ereg_replace" attack string
# If your domain is whitelisted in whitelist-domains.conf this string will NOT be detected

View file

@ -0,0 +1,45 @@
# EDIT THIS FILE AS YOU LIKE TO BLACKLIST YOUR OWN CUSTOM DOMAIN NAMES ###
### VERSION INFORMATION #
###################################################
### Version: V4.2019.05
### Updated: 2019-06-24
###################################################
### VERSION INFORMATION ##
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Add One Entry Per Line - List all your own extra domains you want to blacklist.
# This file must exist on your system or Nginx will fail a reload due to a missing file
# Automatic updates will never be able to remove this custom list of yours
# Add One Entry Per Line
# Make sure any domains have dots and special characters escaped as per the Regex examples below.
# For example myblacklisteddomainname.com should be entered as myfirstowndomainname\.com
# and my-second-blacklisted.com should be entered as my\-second\-owndomainname\.com
# *****************************************************************************************
# PLEASE MAKE SURE that you use word regex boundaries to avoid false positive detection !!!
# *****************************************************************************************
# As you can see in the examples below the domain "myblacklisteddomainname\.com" is entered with a preceding \b and an ending \b
# this makes it now "\bmyblacklisteddomainname\.com\b". It is crucial to use the word boundaries regex formatting.
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# ---------
# EXAMPLES:
# ---------
# "~*\bmyblacklisteddomainname\.com\b" 1;
# "~*\bmy\-second\-blacklisted\.com\b" 1;

View file

@ -0,0 +1,100 @@
# EDIT THIS FILE AS YOU LIKE TO ADD OR REMOVE ANY BAD IP ADDRESSES OR IP RANGES YOU WANT TO BLOCK ###
# VERSION INFORMATION #
#----------------------
# Version: V4.2019.09
# Updated: 2019-06-28
#----------------------
# VERSION INFORMATION #
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# This is merely an example and gets auto included as since Version 2.2017.07 introduced on 2017-04-20
# This file must exist on your system or Nginx will fail a reload due to a missing file
# For all intensive purpose you can delete everything inside this file and leave it
# completely blank if you do not want your Nginx Blocker to do any blocking of bad IP's
# Add IP's you want to blacklist below this line, one per line as per example
# Nginx [warn] notices may be reported when you try reload Nginx if you happen to include an
# IP here that may already be included by the blocker with it's daily updates
# NOTE: It is only an Nginx Warning message and will not cause Nginx to fail a reload.
# 111.111.111.111 1;
# -------------------------------------------
# Cyveillance / Qwest Communications / PSINET
# -------------------------------------------
# I am extensively researching this subject - appears to be US government involved
# and also appears to be used by all sorts of law enforcement agencies. For one they
# do not obey robots.txt and continually disguise their User-Agent strings. Time will
# tell if this is all correct or not.
# For now see - https://en.wikipedia.org/wiki/Cyveillance
# IMPORTANT UPDATE ON Cyveillance / Qwest Communications !!!
# **********************************************************
# I have done a lot of research on Cyveillance now and through monitoring my logs I know
# for sure what companies are using them and what they are actually looking for.
# My research has led me to understand that Cyveillance services are used by hundreds
# of companies to help them dicsover theft of copyrighted materials like images, movies
# music and other materials. I personally believe a lot of block lists who originally recommended
# blocking Cyveillance have done so to protect their torrent or p2p sites from being scanned.
# I personally have now unblocked them as image theft is a big problem of mine but if you
# do want to block Cyveillance you can simply modify the entries in the block below from "0" to "1"
# Getty Images is one such company who appears to use Cyveillance to help monitor for copyright theft.
# If you really do want to block them change all the 0's below to 1.
# Use this section at YOUR OWN RISK, you may block some legitimate networks but after many hours of
# Research this is now the completely updated list of all IP ranges IPV4 and IPV6 owned Qwest Communications
# PSINET and Cyveillance
# IMPORTANT NOTE: If you really want to keeps bot and things out of certain parts of your web site
# Rather implement a comlex Google Re-Captcha to reach sections of your sites and for people to be able
# to access download links. Google Re-Captcha with images is too complex for any bot.
38.0.0.0/8 0;
206.2.138.0/23 0;
208.71.164.0/22 0;
4.17.135.32/27 0;
63.144.0.0/13 0;
65.112.0.0/12 0;
65.192.0.0/11 0;
# ---------------
# Berkely Scanner
# ---------------
# The Berkeley University has a scanner testing all over the web sending a complex
# payload an expecting a reply from servers who are infected or who just respond to such
# a payload. The payload looks similar to this
# "$\xC9\xE1\xDC\x9B+\x8F\x1C\xE71\x99\xA8\xDB6\x1E#\xBB\x19#Hx\xA7\xFD\x0F9-"
# and is sometime VERY long. You may have noticed this in your logs.
# I support research projects and all my servers respond with an error to this type of
# string so I do not block them but if you want to block just uncomment the following line
# or email them asking them not to scan your server. They do respond.
# Visit http://169.229.3.91/ for more info
# If you really do want to block them change all the 0 below to 1.
169.229.3.88/29 0;
# ------------
# MY BLACKLIST
# ------------
# 111.111.111.111 1;
# NOTE: If you blacklist your own IP by mistake whitelist-ips.conf will completely over-ride this.
# whitelist-ips.conf will always WIN and over-ride anything here and in the blocker

View file

@ -0,0 +1,79 @@
# EDIT THIS FILE AS YOU LIKE TO BLACKLIST OR WHITELIST ANY BAD USER-AGENT STRINGS YOU WANT TO SCAN FOR
# ****************************************************************************************************
# THIS IS BOTH YOUR WHITELIST AND BLACKLIST FOR USER-AGENTS
# VERSION INFORMATION #
#----------------------
# Version: V4.2019.08
# Updated: 2019-07-05
#----------------------
# VERSION INFORMATION #
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Add One Entry Per Line - List all the extra bad User-Agents you want to permanently block or whitelist.
# This is for User-Agents that are not included in the main list of the bot blocker
# This file must exist on your system or Nginx will fail a reload due to a missing file
# This allows you finer control of keeping certain bots blocked and automatic updates will
# Never be able to remove this custom list of yours
# Please note this include file loads first before any of the already whitelisted User-Agents
# in the bad bot blocker. By loading first in line it over-rides anything below it so for instance
# if you want to block Baidu, Google or Bing for any reason you add them to this file which loads
# first and takes precedence over anything below it. This now allows even finer control over the
# bad bot blocker. Enjoy !!!
# Even though this file is called blacklist-user-agents, as mentioned it can also be used to whitelist user agents
# By adding them below and setting the 3; to 0; this will permanently whitelist the User-Agent.
# Make sure any words that contain special characters are escaped and include word boundaries as per the Regex examples below.
# Example the User-Agent name "someverybaduseragentname1" is entered as "(?:\b)someverybaduseragentname1(?:\b)"
# Example the User-Agent name "some-very-bad-useragentname2" is entered as "(?:\b)some\-very\-bad\-useragentname1(?:\b)"
# the "(?:\b)" and "(?:\b)" are word boundaries which prevents partial matching and false positives.
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# ---------------------
# WHITELISTING EXAMPLES
# ---------------------
# "~*(?:\b)someverygooduseragentname1(?:\b)" 0;
# "~*(?:\b)someverygooduseragentname2(?:\b)" 0;
# "~*(?:\b)some\-very\-good\-useragentname2(?:\b)" 0;
# ---------------------
# BLACKLISTING EXAMPLES
# ---------------------
# "~*(?:\b)someverybaduseragentname1(?:\b)" 3;
# "~*(?:\b)someverybaduseragentname2(?:\b)" 3;
# "~*(?:\b)some\-very\-bad\-useragentname2(?:\b)" 3;
# Here are some default things I block on my own server, these appear in various types of injection attacks
# You can disable them if you have problems or don't agree by switching thir value to 0 or moving them into the whitelist section first and then making their value 0
# ------------
# MY WHITELIST
# ------------
# ------------
# MY BLACKLIST
# ------------
"~*(?:\b)x22(?:\b)" 3;
"~*(?:\b){|}(?:\b)" 3;
"~*(?:\b)mb_ereg_replace(?:\b)" 3;
"~*(?:\b)file_put_contents(?:\b)" 3;

View file

@ -0,0 +1,85 @@
# Author/Copyright: Mitchell Krog <mitchellkrog@gmail.com> - https://github.com/mitchellkrogza/
# VERSION INFORMATION #
#----------------------
# Version: V4.2019.04
# Updated: 2019-06-28
#----------------------
# VERSION INFORMATION #
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Include this in a vhost file within a server {} block using and include statement like below
# Place it near the top of your server {} block before any location / statements and it will block everywhere on your site.
# server {
# #Config stuff here
# include /etc/nginx/bots.d/blockbots.conf
# include /etc/nginx/bots.d/ddos.conf
# #Other config stuff here
# }
#######################################################################
# -----------------------------------
# OVER-RIDE BLOCKER / SUPER WHITELIST
# -----------------------------------
# In this block you can allow any IP address specified here to over-ride any bad bot or IP blocking of the blocker.
# This is useful for testing or allowing only specific IP's (ie. Internal ranges) to never be blocked.
# More IP's can be added example > "(127.0.0.1)|(192.168.0.1)|(192.168.1.1)"
# If you even blacklisted 127.0.0.1 or your own IP by giving it a value of 1 in any of the includes, this will over-ride that block.
# UNCOMMENT THE NEXT 4 LINES TO ACTIVATE THE SUPER WHITELIST
#if ($remote_addr ~ "(127.0.0.1)|(192.168.0.1)" ) {
#set $bad_bot '0'; #Uncommenting this line will disable bad_bots functionality for specified IP(s)
#set $validate_client '0'; #Uncommenting this line will disable validate_client ip blocking functionality for specified IP(s)
#}
# --------------
# BLOCK BAD BOTS
# --------------
# Section bot_1 Unused
#limit_conn bot1_connlimit 100;
#limit_req zone=bot1_reqlimitip burst=50;
limit_conn bot2_connlimit 10;
limit_req zone=bot2_reqlimitip burst=10;
if ($bad_bot = '3') {
return 444; # << Response Code Issued May Be Modified to Whatever you Choose ie. 404 but 444 wastes less of Nginxs time
}
# ---------------------
# BLOCK BAD REFER WORDS
# ---------------------
if ($bad_words) {
return 444; # << Response Code Issued May Be Modified to Whatever you Choose ie. 404 but 444 wastes less of Nginxs time
}
# ------------------
# BLOCK BAD REFERERS
# ------------------
if ($bad_referer) {
return 444; # << Response Code Issued May Be Modified to Whatever you Choose ie. 404 but 444 wastes less of Nginxs time
}
# -----------------------------
# BLOCK IP ADDRESSES and RANGES
# -----------------------------
if ($validate_client) {
return 444; # << Response Code Issued May Be Modified to Whatever you Choose ie. 404 but 444 wastes less of Nginxs time
}

View file

@ -0,0 +1,62 @@
# EDIT THIS FILE AS YOU LIKE TO ADD ANY ADDITIONAL BAD REFERRER DOMAINS YOU WANT TO SCAN FOR ###
# THIS IS BOTH YOUR WHITELIST AND BLACKLIST FOR REFERRERS and DOMAINS
# VERSION INFORMATION #
#----------------------
# Version: V4.2019.09
# Updated: 2019-07-05
#----------------------
# VERSION INFORMATION #
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# This is merely an example and gets auto included as since Version 2.2017.07 introduced on 2017-04-20
# This file must exist on your system or Nginx will fail a reload due to a missing file
# Only add one entry per line
# Make sure any domains have dots and special characters escaped as per the Regex examples below.
# For example some-veryvery-randomwebsitename-thatdoesnotexist4.com should be entered as
# some\-veryvery\-randomwebsitename\-thatdoesnotexist4\.com
# *****************************************************************************************
# PLEASE MAKE SURE that you use word regex boundaries to avoid false positive detection !!!
# *****************************************************************************************
# As you can see in the examples below the domain "someveryveryrandomwebsitenamethatdoesnotexist1\.com"
# is entered with a preceding (?:\b) and an ending (?:\b)
# this makes it now "(?:\b)someveryveryrandomwebsitenamethatdoesnotexist1\.com(?:\b)".
# It is crucial to use the word boundaries regex formatting.
# ---------
# EXAMPLES:
# ---------
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# "~*(?:\b)someveryveryrandomwebsitenamethatdoesnotexist1\.com(?:\b)" 1;
# "~*(?:\b)someveryveryrandomwebsitenamethatdoesnotexist2\.com(?:\b)" 1;
# "~*(?:\b)someveryveryrandomwebsitenamethatdoesnotexist3\.com(?:\b)" 1;
# "~*(?:\b)some\-veryvery\-randomweb\-sitenamethatdoesnotexist4\.com(?:\b)" 1;
# ------------
# MY WHITELIST
# ------------
# "~*(?:\b)mywebsite\.com(?:\b)" 0;
# ------------
# MY BLACKLIST
# ------------
# "~*(?:\b)someotherwebsite\.com(?:\b)" 1;

View file

@ -0,0 +1,36 @@
#######################################################################
### VERSION INFORMATION #
###################################################
### Version: V4.2019.02
### Updated: 2019-06-24
###################################################
### VERSION INFORMATION ##
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Author: Mitchell Krog <mitchellkrog@gmail.com> - https://github.com/mitchellkrogza/
# Include this in a vhost file within a server {} block using and include statement like below
# server {
# #Config stuff here
# include /etc/nginx/bots.d/blockbots.conf
# include /etc/nginx/bots.d/ddos.conf
# #Other config stuff here
# }
#######################################################################
limit_conn addr 200;
limit_req zone=flood burst=200 nodelay;

View file

@ -0,0 +1,57 @@
# EDIT THIS FILE AS YOU LIKE TO WHITELIST YOUR OWN DOMAIN NAMES AND SPARE THEM FROM ANY REFERRER CHECKING ###
# VERSION INFORMATION #
#----------------------
# Version: V4.2019.08
# Updated: 2019-07-05
#----------------------
# VERSION INFORMATION #
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Add One Entry Per Line - List all your own domains of the sites you host on the server
# This file must exist on your system or Nginx will fail a reload due to a missing file
# Automatic updates will never be able to remove this custom list of yours
# Add One Entry Per Line
# Make sure any domains have dots and special characters escaped as per the Regex examples below.
# For example myfirstowndomainname.com should be entered as myfirstowndomainname\.com
# and my-second-owndomainname.com should be entered as my\-second\-owndomainname\.com
# *****************************************************************************************
# PLEASE MAKE SURE that you use word regex boundaries to avoid false positive detection !!!
# *****************************************************************************************
# As you can see in the examples below the domain "myfirstowndomainname\.com" is entered with a preceding (?:\b) and an ending (?:\b)
# this makes it now "(?:\b)myfirstowndomainname\.com(?:\b)". It is important to use the word boundaries regex formatting.
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# ---------
# EXAMPLES:
# ---------
# "~*(?:\b)myfirstowndomainname\.com(?:\b)" 0;
# "~*(?:\b)my\-second\-owndomainname\.com(?:\b)" 0;
# ------------
# MY WHITELIST
# ------------
# NOTE: This file can also blacklist by giving something a value of 1
# but rather please do your blacklisting in the custom-bad-referrers.conf include file.
# NOTE: If you whitelist your own domain here, any words in bad-referrer-words.conf will not be effective if the attacker passes your own domain name in the referrer string.
# SEE NOTES: in bad-referrer-words.conf

View file

@ -0,0 +1,47 @@
# EDIT THIS FILE AS YOU LIKE TO WHITELIST ALL YOUR IP ADDRESSES AND IP RANGES ###
# VERSION INFORMATION #
#----------------------
# Version: V4.2019.05
# Updated: 2019-06-28
#----------------------
# VERSION INFORMATION #
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Add One Entry Per Line - List all your IP's and IP Ranges you want to whitelist
# This file must exist on your system or Nginx will fail a reload due to a missing file
# Automatic updates will never be able to remove this custom list of yours
# Add One Entry Per Line as per the example
# Only add actual IP addresses and ranges here
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# REFRAIN FROM USING 127.0.0.1 AS IT MAY CAUSE UNDESIRABLE RESULTS ON SOME SYSTEMS
# ---------
# EXAMPLES:
# ---------
# 111.111.111.111 0;
# ------------
# MY WHITELIST
# ------------
# ------
# NOTES:
# ------
# - This file rules over any other other parts of the IP blocking.
# - If you blacklisted your own IP in blacklist-ips.conf whitelisting it here will over-ride the blacklisting.
# - Whitelisting IP's and RANGES here ONLY affects the IP blocking functions.
# - This file will NOT allow your own IP to bypass bad User-Agent or Referrer String checks.
# - To bypass everything for a certain IP see notes in blockbots.conf on SUPER WHITELIST

View file

@ -0,0 +1 @@
null

View file

@ -0,0 +1,31 @@
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Version 1.1
# ! new directives also to be added to include_filelist.txt ! #
server_names_hash_bucket_size 256;
server_names_hash_max_size 4096;
variables_hash_max_size 4096;
variables_hash_bucket_size 4096;
limit_req_zone $binary_remote_addr zone=flood:50m rate=90r/s;
limit_conn_zone $binary_remote_addr zone=addr:50m;
# ****************************************************************************
# NOTE: IF you are using a system like Nginx-Proxy from @JWilder
# ****************************************************************************
# Repo URL: https://github.com/jwilder/nginx-proxy
# You will need to comment out the first line here as follows.
# #server_names_hash_bucket_size 128;
# You will also need to modify the nginx.tmpl file to add the default include
# include /etc/nginx/conf.d/*
# ****************************************************************************

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,21 @@
server {
listen *:9000;
root /var/www/html;
server_name localhost;
charset UTF-8;
##
# Nginx Bad Bot Blocker Includes
# REPO: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##
include /etc/nginx/bots.d/ddos.conf;
include /etc/nginx/bots.d/blockbots.conf;
index index.html;
location / {
root /var/www/html/;
}
}

View file

@ -0,0 +1,93 @@
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
##
# Nginx Bad Bot Blocker Includes
# REPO: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##
include /etc/nginx/conf.d/botblocker-nginx-settings.conf;
include /etc/nginx/conf.d/globalblacklist.conf;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}

View file

@ -0,0 +1 @@
null

View file

@ -0,0 +1,75 @@
# EDIT THIS FILE AS YOU LIKE TO ADD OR REMOVE ANY BAD WORDS YOU WANT TO SCAN FOR ###
### VERSION INFORMATION #
###################################################
### Version: V4.2019.07
### Updated: 2019-06-24
###################################################
### VERSION INFORMATION ##
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# This is merely an example and gets auto included as since Version 2.2017.07 introduced on 2017-04-20
# This file must exist on your system or Nginx will fail a reload due to a missing file
# For all intensive purpose you can delete everything inside this file and leave it
# completely blank if you do not want your Nginx Blocker to include scanning for bad words within urls or referrer string
# Only add one entry per line
# *******************************
# !!! WARNING WARNING WARNING !!!
# *******************************
# ***************************************
# PLEASE BE VERY CAREFUL HOW YOU USE THIS
# ***************************************
# Here is an example of how one supposed bad word can cause your whole site to go down.
# An issue was logged where the users own domain name was specialisteparquet.com
# Because this list contained the word "cialis" it was detected within his domain name causing
# his entire site to go down and not server any assets.
# That one entry would even cause any site containing a word like "specialist" anywhere in any
# of their sites pages to cause them to be blocked and whitelisting your own domain name in the
# whitelist-domains.conf file will not even bypass this, SO BE CAREFUL PLEASE
# Think very carefully before you add any word here
# *****************************************************************************************
# PLEASE MAKE SURE that you use word regex boundaries to avoid false positive detection !!!
# *****************************************************************************************
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# As you can see in the examples below the word "adultgalls" is entered with a preceding \b and an ending \b
# this makes it now "\badultgalls\b". It is crucial to use the word boundaries regex formatting.
# ---------
# EXAMPLES:
# ---------
# "~*\badultgalls\b" 1;
# "~*\bamateurxpass\b" 1;
# "~*\bbigblackbooty\b" 1;
# "~*\bblacktits\b" 1;
# "~*\bcookie\-law\-enforcement\b" 1;
# "~*\bfree\-share\-buttons\b" 1;
# "~*\bfree\-social\-buttons\b" 1;
# "~*\bfuck\-paid\-share\-buttons\b" 1;
# "~*\bilovevitaly\b" 1;
# "~*\blaw\-enforcement\-bot\b" 1;
# "~*\blaw\-enforcement\-check\b" 1;
# "~*\bshare\-buttons\-for\-free\b" 1;
# "~*\bwebfuck\b" 1;
# "~*\bxxxrus\b" 1;
# "~*\bzeroredirect\b" 1;
"~*(?:\b)thisisabadword(?:\b|)" 1;
"~*(?:\b)thisisanotherbadword(?:\b|)" 1;

View file

@ -0,0 +1,45 @@
# EDIT THIS FILE AS YOU LIKE TO BLACKLIST YOUR OWN CUSTOM DOMAIN NAMES ###
### VERSION INFORMATION #
###################################################
### Version: V4.2019.05
### Updated: 2019-06-24
###################################################
### VERSION INFORMATION ##
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Add One Entry Per Line - List all your own extra domains you want to blacklist.
# This file must exist on your system or Nginx will fail a reload due to a missing file
# Automatic updates will never be able to remove this custom list of yours
# Add One Entry Per Line
# Make sure any domains have dots and special characters escaped as per the Regex examples below.
# For example myblacklisteddomainname.com should be entered as myfirstowndomainname\.com
# and my-second-blacklisted.com should be entered as my\-second\-owndomainname\.com
# *****************************************************************************************
# PLEASE MAKE SURE that you use word regex boundaries to avoid false positive detection !!!
# *****************************************************************************************
# As you can see in the examples below the domain "myblacklisteddomainname\.com" is entered with a preceding \b and an ending \b
# this makes it now "\bmyblacklisteddomainname\.com\b". It is crucial to use the word boundaries regex formatting.
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# ---------
# EXAMPLES:
# ---------
# "~*\bmyblacklisteddomainname\.com\b" 1;
# "~*\bmy\-second\-blacklisted\.com\b" 1;

View file

@ -0,0 +1,2 @@
34.66.25.221 1;
127.0.0.1 1;

View file

@ -0,0 +1,79 @@
# EDIT THIS FILE AS YOU LIKE TO BLACKLIST OR WHITELIST ANY BAD USER-AGENT STRINGS YOU WANT TO SCAN FOR
# ****************************************************************************************************
# THIS IS BOTH YOUR WHITELIST AND BLACKLIST FOR USER-AGENTS
# VERSION INFORMATION #
#----------------------
# Version: V4.2019.08
# Updated: 2019-07-05
#----------------------
# VERSION INFORMATION #
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Add One Entry Per Line - List all the extra bad User-Agents you want to permanently block or whitelist.
# This is for User-Agents that are not included in the main list of the bot blocker
# This file must exist on your system or Nginx will fail a reload due to a missing file
# This allows you finer control of keeping certain bots blocked and automatic updates will
# Never be able to remove this custom list of yours
# Please note this include file loads first before any of the already whitelisted User-Agents
# in the bad bot blocker. By loading first in line it over-rides anything below it so for instance
# if you want to block Baidu, Google or Bing for any reason you add them to this file which loads
# first and takes precedence over anything below it. This now allows even finer control over the
# bad bot blocker. Enjoy !!!
# Even though this file is called blacklist-user-agents, as mentioned it can also be used to whitelist user agents
# By adding them below and setting the 3; to 0; this will permanently whitelist the User-Agent.
# Make sure any words that contain special characters are escaped and include word boundaries as per the Regex examples below.
# Example the User-Agent name "someverybaduseragentname1" is entered as "(?:\b)someverybaduseragentname1(?:\b)"
# Example the User-Agent name "some-very-bad-useragentname2" is entered as "(?:\b)some\-very\-bad\-useragentname1(?:\b)"
# the "(?:\b)" and "(?:\b)" are word boundaries which prevents partial matching and false positives.
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# ---------------------
# WHITELISTING EXAMPLES
# ---------------------
# "~*(?:\b)someverygooduseragentname1(?:\b)" 0;
# "~*(?:\b)someverygooduseragentname2(?:\b)" 0;
# "~*(?:\b)some\-very\-good\-useragentname2(?:\b)" 0;
# ---------------------
# BLACKLISTING EXAMPLES
# ---------------------
# "~*(?:\b)someverybaduseragentname1(?:\b)" 3;
# "~*(?:\b)someverybaduseragentname2(?:\b)" 3;
# "~*(?:\b)some\-very\-bad\-useragentname2(?:\b)" 3;
# Here are some default things I block on my own server, these appear in various types of injection attacks
# You can disable them if you have problems or don't agree by switching thir value to 0 or moving them into the whitelist section first and then making their value 0
# ------------
# MY WHITELIST
# ------------
# ------------
# MY BLACKLIST
# ------------
"~*(?:\b)x22(?:\b)" 3;
"~*(?:\b){|}(?:\b)" 3;
"~*(?:\b)mb_ereg_replace(?:\b)" 3;
"~*(?:\b)file_put_contents(?:\b)" 3;

View file

@ -0,0 +1,85 @@
# Author/Copyright: Mitchell Krog <mitchellkrog@gmail.com> - https://github.com/mitchellkrogza/
# VERSION INFORMATION #
#----------------------
# Version: V4.2019.04
# Updated: 2019-06-28
#----------------------
# VERSION INFORMATION #
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Include this in a vhost file within a server {} block using and include statement like below
# Place it near the top of your server {} block before any location / statements and it will block everywhere on your site.
# server {
# #Config stuff here
# include /etc/nginx/bots.d/blockbots.conf
# include /etc/nginx/bots.d/ddos.conf
# #Other config stuff here
# }
#######################################################################
# -----------------------------------
# OVER-RIDE BLOCKER / SUPER WHITELIST
# -----------------------------------
# In this block you can allow any IP address specified here to over-ride any bad bot or IP blocking of the blocker.
# This is useful for testing or allowing only specific IP's (ie. Internal ranges) to never be blocked.
# More IP's can be added example > "(127.0.0.1)|(192.168.0.1)|(192.168.1.1)"
# If you even blacklisted 127.0.0.1 or your own IP by giving it a value of 1 in any of the includes, this will over-ride that block.
# UNCOMMENT THE NEXT 4 LINES TO ACTIVATE THE SUPER WHITELIST
#if ($remote_addr ~ "(127.0.0.1)|(192.168.0.1)" ) {
#set $bad_bot '0'; #Uncommenting this line will disable bad_bots functionality for specified IP(s)
#set $validate_client '0'; #Uncommenting this line will disable validate_client ip blocking functionality for specified IP(s)
#}
# --------------
# BLOCK BAD BOTS
# --------------
# Section bot_1 Unused
#limit_conn bot1_connlimit 100;
#limit_req zone=bot1_reqlimitip burst=50;
limit_conn bot2_connlimit 10;
limit_req zone=bot2_reqlimitip burst=10;
if ($bad_bot = '3') {
return 444; # << Response Code Issued May Be Modified to Whatever you Choose ie. 404 but 444 wastes less of Nginxs time
}
# ---------------------
# BLOCK BAD REFER WORDS
# ---------------------
if ($bad_words) {
return 444; # << Response Code Issued May Be Modified to Whatever you Choose ie. 404 but 444 wastes less of Nginxs time
}
# ------------------
# BLOCK BAD REFERERS
# ------------------
if ($bad_referer) {
return 444; # << Response Code Issued May Be Modified to Whatever you Choose ie. 404 but 444 wastes less of Nginxs time
}
# -----------------------------
# BLOCK IP ADDRESSES and RANGES
# -----------------------------
if ($validate_client) {
return 444; # << Response Code Issued May Be Modified to Whatever you Choose ie. 404 but 444 wastes less of Nginxs time
}

View file

@ -0,0 +1,62 @@
# EDIT THIS FILE AS YOU LIKE TO ADD ANY ADDITIONAL BAD REFERRER DOMAINS YOU WANT TO SCAN FOR ###
# THIS IS BOTH YOUR WHITELIST AND BLACKLIST FOR REFERRERS and DOMAINS
# VERSION INFORMATION #
#----------------------
# Version: V4.2019.09
# Updated: 2019-07-05
#----------------------
# VERSION INFORMATION #
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# This is merely an example and gets auto included as since Version 2.2017.07 introduced on 2017-04-20
# This file must exist on your system or Nginx will fail a reload due to a missing file
# Only add one entry per line
# Make sure any domains have dots and special characters escaped as per the Regex examples below.
# For example some-veryvery-randomwebsitename-thatdoesnotexist4.com should be entered as
# some\-veryvery\-randomwebsitename\-thatdoesnotexist4\.com
# *****************************************************************************************
# PLEASE MAKE SURE that you use word regex boundaries to avoid false positive detection !!!
# *****************************************************************************************
# As you can see in the examples below the domain "someveryveryrandomwebsitenamethatdoesnotexist1\.com"
# is entered with a preceding (?:\b) and an ending (?:\b)
# this makes it now "(?:\b)someveryveryrandomwebsitenamethatdoesnotexist1\.com(?:\b)".
# It is crucial to use the word boundaries regex formatting.
# ---------
# EXAMPLES:
# ---------
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# "~*(?:\b)someveryveryrandomwebsitenamethatdoesnotexist1\.com(?:\b)" 1;
# "~*(?:\b)someveryveryrandomwebsitenamethatdoesnotexist2\.com(?:\b)" 1;
# "~*(?:\b)someveryveryrandomwebsitenamethatdoesnotexist3\.com(?:\b)" 1;
# "~*(?:\b)some\-veryvery\-randomweb\-sitenamethatdoesnotexist4\.com(?:\b)" 1;
# ------------
# MY WHITELIST
# ------------
# "~*(?:\b)mywebsite\.com(?:\b)" 0;
# ------------
# MY BLACKLIST
# ------------
# "~*(?:\b)someotherwebsite\.com(?:\b)" 1;

View file

@ -0,0 +1,36 @@
#######################################################################
### VERSION INFORMATION #
###################################################
### Version: V4.2019.02
### Updated: 2019-06-24
###################################################
### VERSION INFORMATION ##
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Author: Mitchell Krog <mitchellkrog@gmail.com> - https://github.com/mitchellkrogza/
# Include this in a vhost file within a server {} block using and include statement like below
# server {
# #Config stuff here
# include /etc/nginx/bots.d/blockbots.conf
# include /etc/nginx/bots.d/ddos.conf
# #Other config stuff here
# }
#######################################################################
limit_conn addr 200;
limit_req zone=flood burst=200 nodelay;

View file

@ -0,0 +1,47 @@
# EDIT THIS FILE AS YOU LIKE TO WHITELIST YOUR OWN DOMAIN NAMES AND SPARE THEM FROM ANY REFERRER CHECKING ###
### VERSION INFORMATION #
###################################################
### Version: V4.2019.05
### Updated: 2019-06-24
###################################################
### VERSION INFORMATION ##
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Add One Entry Per Line - List all your own domains of the sites you host on the server
# This file must exist on your system or Nginx will fail a reload due to a missing file
# Automatic updates will never be able to remove this custom list of yours
# Add One Entry Per Line
# Make sure any domains have dots and special characters escaped as per the Regex examples below.
# For example myfirstowndomainname.com should be entered as myfirstowndomainname\.com
# and my-second-owndomainname.com should be entered as my\-second\-owndomainname\.com
# *****************************************************************************************
# PLEASE MAKE SURE that you use word regex boundaries to avoid false positive detection !!!
# *****************************************************************************************
# As you can see in the examples below the domain "myfirstowndomainname\.com" is entered with a preceding \b and an ending \b
# this makes it now "\bmyfirstowndomainname\.com\b". It is crucial to use the word boundaries regex formatting.
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# ---------
# EXAMPLES:
# ---------
# "~*\bmyfirstowndomainname\.com\b" 0;
# "~*\bmy\-second\-owndomainname\.com\b" 0;
"~*(?:\b)myowndomain\.com(?:\b|)" 0;
"~*(?:\b)myotherdomain\.com(?:\b|)" 0;

View file

@ -0,0 +1,2 @@
34.66.25.221 0;
127.0.0.1 0;

View file

@ -0,0 +1 @@
null

View file

@ -0,0 +1,31 @@
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Version 1.1
# ! new directives also to be added to include_filelist.txt ! #
server_names_hash_bucket_size 256;
server_names_hash_max_size 4096;
variables_hash_max_size 4096;
variables_hash_bucket_size 4096;
limit_req_zone $binary_remote_addr zone=flood:50m rate=90r/s;
limit_conn_zone $binary_remote_addr zone=addr:50m;
# ****************************************************************************
# NOTE: IF you are using a system like Nginx-Proxy from @JWilder
# ****************************************************************************
# Repo URL: https://github.com/jwilder/nginx-proxy
# You will need to comment out the first line here as follows.
# #server_names_hash_bucket_size 128;
# You will also need to modify the nginx.tmpl file to add the default include
# include /etc/nginx/conf.d/*
# ****************************************************************************

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,21 @@
server {
listen *:9000;
root /var/www/html;
server_name localhost;
charset UTF-8;
##
# Nginx Bad Bot Blocker Includes
# REPO: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##
include /etc/nginx/bots.d/ddos.conf;
include /etc/nginx/bots.d/blockbots.conf;
index index.html;
location / {
root /var/www/html/;
}
}

View file

@ -0,0 +1,93 @@
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
##
# Nginx Bad Bot Blocker Includes
# REPO: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##
include /etc/nginx/conf.d/botblocker-nginx-settings.conf;
include /etc/nginx/conf.d/globalblacklist.conf;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}

View file

@ -0,0 +1 @@
null

View file

@ -0,0 +1,75 @@
# EDIT THIS FILE AS YOU LIKE TO ADD OR REMOVE ANY BAD WORDS YOU WANT TO SCAN FOR ###
### VERSION INFORMATION #
###################################################
### Version: V4.2019.07
### Updated: 2019-06-24
###################################################
### VERSION INFORMATION ##
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# This is merely an example and gets auto included as since Version 2.2017.07 introduced on 2017-04-20
# This file must exist on your system or Nginx will fail a reload due to a missing file
# For all intensive purpose you can delete everything inside this file and leave it
# completely blank if you do not want your Nginx Blocker to include scanning for bad words within urls or referrer string
# Only add one entry per line
# *******************************
# !!! WARNING WARNING WARNING !!!
# *******************************
# ***************************************
# PLEASE BE VERY CAREFUL HOW YOU USE THIS
# ***************************************
# Here is an example of how one supposed bad word can cause your whole site to go down.
# An issue was logged where the users own domain name was specialisteparquet.com
# Because this list contained the word "cialis" it was detected within his domain name causing
# his entire site to go down and not server any assets.
# That one entry would even cause any site containing a word like "specialist" anywhere in any
# of their sites pages to cause them to be blocked and whitelisting your own domain name in the
# whitelist-domains.conf file will not even bypass this, SO BE CAREFUL PLEASE
# Think very carefully before you add any word here
# *****************************************************************************************
# PLEASE MAKE SURE that you use word regex boundaries to avoid false positive detection !!!
# *****************************************************************************************
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# As you can see in the examples below the word "adultgalls" is entered with a preceding \b and an ending \b
# this makes it now "\badultgalls\b". It is crucial to use the word boundaries regex formatting.
# ---------
# EXAMPLES:
# ---------
# "~*\badultgalls\b" 1;
# "~*\bamateurxpass\b" 1;
# "~*\bbigblackbooty\b" 1;
# "~*\bblacktits\b" 1;
# "~*\bcookie\-law\-enforcement\b" 1;
# "~*\bfree\-share\-buttons\b" 1;
# "~*\bfree\-social\-buttons\b" 1;
# "~*\bfuck\-paid\-share\-buttons\b" 1;
# "~*\bilovevitaly\b" 1;
# "~*\blaw\-enforcement\-bot\b" 1;
# "~*\blaw\-enforcement\-check\b" 1;
# "~*\bshare\-buttons\-for\-free\b" 1;
# "~*\bwebfuck\b" 1;
# "~*\bxxxrus\b" 1;
# "~*\bzeroredirect\b" 1;
"~*(?:\b)thisisabadword(?:\b|)" 1;
"~*(?:\b)thisisanotherbadword(?:\b|)" 1;

View file

@ -0,0 +1,45 @@
# EDIT THIS FILE AS YOU LIKE TO BLACKLIST YOUR OWN CUSTOM DOMAIN NAMES ###
### VERSION INFORMATION #
###################################################
### Version: V4.2019.05
### Updated: 2019-06-24
###################################################
### VERSION INFORMATION ##
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Add One Entry Per Line - List all your own extra domains you want to blacklist.
# This file must exist on your system or Nginx will fail a reload due to a missing file
# Automatic updates will never be able to remove this custom list of yours
# Add One Entry Per Line
# Make sure any domains have dots and special characters escaped as per the Regex examples below.
# For example myblacklisteddomainname.com should be entered as myfirstowndomainname\.com
# and my-second-blacklisted.com should be entered as my\-second\-owndomainname\.com
# *****************************************************************************************
# PLEASE MAKE SURE that you use word regex boundaries to avoid false positive detection !!!
# *****************************************************************************************
# As you can see in the examples below the domain "myblacklisteddomainname\.com" is entered with a preceding \b and an ending \b
# this makes it now "\bmyblacklisteddomainname\.com\b". It is crucial to use the word boundaries regex formatting.
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# ---------
# EXAMPLES:
# ---------
# "~*\bmyblacklisteddomainname\.com\b" 1;
# "~*\bmy\-second\-blacklisted\.com\b" 1;

View file

@ -0,0 +1,2 @@
34.66.25.221 1;
127.0.0.1 1;

View file

@ -0,0 +1,63 @@
# EDIT THIS FILE AS YOU LIKE TO BLACKLIST OR WHITELIST ANY BAD USER-AGENT STRINGS YOU WANT TO SCAN FOR
# ****************************************************************************************************
### VERSION INFORMATION #
###################################################
### Version: V3.2018.05
### Updated: 2018-08-21
###################################################
### VERSION INFORMATION ##
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Add One Entry Per Line - List all the extra bad User-Agents you want to permanently block or whitelist.
# This is for User-Agents that are not included in the main list of the bot blocker
# This file must exist on your system or Nginx will fail a reload due to a missing file
# This allows you finer control of keeping certain bots blocked and automatic updates will
# Never be able to remove this custom list of yours
# Please note this include file loads first before any of the already whitelisted User-Agents
# in the bad bot blocker. By loading first in line it over-rides anything below it so for instance
# if you want to block Baidu, Google or Bing for any reason you add them to this file which loads
# first and takes precedence over anything below it. This now allows even finer control over the
# bad bot blocker. Enjoy !!!
# Even though this file is called blacklist-user-agents, as mentioned it can also be used to whitelist user agents
# By adding them below and setting the 3; to 0; this will permanently whitelist the User-Agent.
# Make sure any words that contain special characters are escaped and include word boundaries as per the Regex examples below.
# Example the User-Agent name "someverybaduseragentname1" is entered as "\bsomeverybaduseragentname1\b"
# Example the User-Agent name "some-very-bad-useragentname2" is entered as "\bsome\-very\-bad\-useragentname1\b"
# the "\b" are word boundaries which prevents partial matching and false positives.
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# ---------------------
# WHITELISTING EXAMPLES
# ---------------------
# "~*\bsomeverygooduseragentname1\b" 0;
# "~*\bsomeverygooduseragentname2\b" 0;
# "~*\bsome\-very\-good\-useragentname2\b" 0;
# ---------------------
# BLACKLISTING EXAMPLES
# ---------------------
# "~*\bsomeverybaduseragentname1\b" 3;
# "~*\bsomeverybaduseragentname2\b" 3;
# "~*\bsome\-very\-bad\-useragentname2\b" 3;
# START MAKE BAD BOTS GOOD ### DO NOT EDIT THIS LINE AT ALL ###
"~*(?:\b)GoogleBot(?:\b|)" 2;
# END MAKE BAD BOTS GOOD ### DO NOT EDIT THIS LINE AT ALL ###

View file

@ -0,0 +1,85 @@
# Author/Copyright: Mitchell Krog <mitchellkrog@gmail.com> - https://github.com/mitchellkrogza/
# VERSION INFORMATION #
#----------------------
# Version: V4.2019.04
# Updated: 2019-06-28
#----------------------
# VERSION INFORMATION #
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Include this in a vhost file within a server {} block using and include statement like below
# Place it near the top of your server {} block before any location / statements and it will block everywhere on your site.
# server {
# #Config stuff here
# include /etc/nginx/bots.d/blockbots.conf
# include /etc/nginx/bots.d/ddos.conf
# #Other config stuff here
# }
#######################################################################
# -----------------------------------
# OVER-RIDE BLOCKER / SUPER WHITELIST
# -----------------------------------
# In this block you can allow any IP address specified here to over-ride any bad bot or IP blocking of the blocker.
# This is useful for testing or allowing only specific IP's (ie. Internal ranges) to never be blocked.
# More IP's can be added example > "(127.0.0.1)|(192.168.0.1)|(192.168.1.1)"
# If you even blacklisted 127.0.0.1 or your own IP by giving it a value of 1 in any of the includes, this will over-ride that block.
# UNCOMMENT THE NEXT 4 LINES TO ACTIVATE THE SUPER WHITELIST
#if ($remote_addr ~ "(127.0.0.1)|(192.168.0.1)" ) {
#set $bad_bot '0'; #Uncommenting this line will disable bad_bots functionality for specified IP(s)
#set $validate_client '0'; #Uncommenting this line will disable validate_client ip blocking functionality for specified IP(s)
#}
# --------------
# BLOCK BAD BOTS
# --------------
# Section bot_1 Unused
#limit_conn bot1_connlimit 100;
#limit_req zone=bot1_reqlimitip burst=50;
limit_conn bot2_connlimit 10;
limit_req zone=bot2_reqlimitip burst=10;
if ($bad_bot = '3') {
return 444; # << Response Code Issued May Be Modified to Whatever you Choose ie. 404 but 444 wastes less of Nginxs time
}
# ---------------------
# BLOCK BAD REFER WORDS
# ---------------------
if ($bad_words) {
return 444; # << Response Code Issued May Be Modified to Whatever you Choose ie. 404 but 444 wastes less of Nginxs time
}
# ------------------
# BLOCK BAD REFERERS
# ------------------
if ($bad_referer) {
return 444; # << Response Code Issued May Be Modified to Whatever you Choose ie. 404 but 444 wastes less of Nginxs time
}
# -----------------------------
# BLOCK IP ADDRESSES and RANGES
# -----------------------------
if ($validate_client) {
return 444; # << Response Code Issued May Be Modified to Whatever you Choose ie. 404 but 444 wastes less of Nginxs time
}

View file

@ -0,0 +1,62 @@
# EDIT THIS FILE AS YOU LIKE TO ADD ANY ADDITIONAL BAD REFERRER DOMAINS YOU WANT TO SCAN FOR ###
# THIS IS BOTH YOUR WHITELIST AND BLACKLIST FOR REFERRERS and DOMAINS
# VERSION INFORMATION #
#----------------------
# Version: V4.2019.09
# Updated: 2019-07-05
#----------------------
# VERSION INFORMATION #
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# This is merely an example and gets auto included as since Version 2.2017.07 introduced on 2017-04-20
# This file must exist on your system or Nginx will fail a reload due to a missing file
# Only add one entry per line
# Make sure any domains have dots and special characters escaped as per the Regex examples below.
# For example some-veryvery-randomwebsitename-thatdoesnotexist4.com should be entered as
# some\-veryvery\-randomwebsitename\-thatdoesnotexist4\.com
# *****************************************************************************************
# PLEASE MAKE SURE that you use word regex boundaries to avoid false positive detection !!!
# *****************************************************************************************
# As you can see in the examples below the domain "someveryveryrandomwebsitenamethatdoesnotexist1\.com"
# is entered with a preceding (?:\b) and an ending (?:\b)
# this makes it now "(?:\b)someveryveryrandomwebsitenamethatdoesnotexist1\.com(?:\b)".
# It is crucial to use the word boundaries regex formatting.
# ---------
# EXAMPLES:
# ---------
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# "~*(?:\b)someveryveryrandomwebsitenamethatdoesnotexist1\.com(?:\b)" 1;
# "~*(?:\b)someveryveryrandomwebsitenamethatdoesnotexist2\.com(?:\b)" 1;
# "~*(?:\b)someveryveryrandomwebsitenamethatdoesnotexist3\.com(?:\b)" 1;
# "~*(?:\b)some\-veryvery\-randomweb\-sitenamethatdoesnotexist4\.com(?:\b)" 1;
# ------------
# MY WHITELIST
# ------------
# "~*(?:\b)mywebsite\.com(?:\b)" 0;
# ------------
# MY BLACKLIST
# ------------
# "~*(?:\b)someotherwebsite\.com(?:\b)" 1;

View file

@ -0,0 +1,36 @@
#######################################################################
### VERSION INFORMATION #
###################################################
### Version: V4.2019.02
### Updated: 2019-06-24
###################################################
### VERSION INFORMATION ##
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Author: Mitchell Krog <mitchellkrog@gmail.com> - https://github.com/mitchellkrogza/
# Include this in a vhost file within a server {} block using and include statement like below
# server {
# #Config stuff here
# include /etc/nginx/bots.d/blockbots.conf
# include /etc/nginx/bots.d/ddos.conf
# #Other config stuff here
# }
#######################################################################
limit_conn addr 200;
limit_req zone=flood burst=200 nodelay;

View file

@ -0,0 +1,47 @@
# EDIT THIS FILE AS YOU LIKE TO WHITELIST YOUR OWN DOMAIN NAMES AND SPARE THEM FROM ANY REFERRER CHECKING ###
### VERSION INFORMATION #
###################################################
### Version: V4.2019.05
### Updated: 2019-06-24
###################################################
### VERSION INFORMATION ##
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Add One Entry Per Line - List all your own domains of the sites you host on the server
# This file must exist on your system or Nginx will fail a reload due to a missing file
# Automatic updates will never be able to remove this custom list of yours
# Add One Entry Per Line
# Make sure any domains have dots and special characters escaped as per the Regex examples below.
# For example myfirstowndomainname.com should be entered as myfirstowndomainname\.com
# and my-second-owndomainname.com should be entered as my\-second\-owndomainname\.com
# *****************************************************************************************
# PLEASE MAKE SURE that you use word regex boundaries to avoid false positive detection !!!
# *****************************************************************************************
# As you can see in the examples below the domain "myfirstowndomainname\.com" is entered with a preceding \b and an ending \b
# this makes it now "\bmyfirstowndomainname\.com\b". It is crucial to use the word boundaries regex formatting.
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# ---------
# EXAMPLES:
# ---------
# "~*\bmyfirstowndomainname\.com\b" 0;
# "~*\bmy\-second\-owndomainname\.com\b" 0;
"~*(?:\b)myowndomain\.com(?:\b|)" 0;
"~*(?:\b)myotherdomain\.com(?:\b|)" 0;

View file

@ -0,0 +1,2 @@
34.66.25.221 0;
127.0.0.1 0;

View file

@ -0,0 +1 @@
null

View file

@ -0,0 +1,31 @@
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Version 1.1
# ! new directives also to be added to include_filelist.txt ! #
server_names_hash_bucket_size 256;
server_names_hash_max_size 4096;
variables_hash_max_size 4096;
variables_hash_bucket_size 4096;
limit_req_zone $binary_remote_addr zone=flood:50m rate=90r/s;
limit_conn_zone $binary_remote_addr zone=addr:50m;
# ****************************************************************************
# NOTE: IF you are using a system like Nginx-Proxy from @JWilder
# ****************************************************************************
# Repo URL: https://github.com/jwilder/nginx-proxy
# You will need to comment out the first line here as follows.
# #server_names_hash_bucket_size 128;
# You will also need to modify the nginx.tmpl file to add the default include
# include /etc/nginx/conf.d/*
# ****************************************************************************

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,21 @@
server {
listen *:9000;
root /var/www/html;
server_name localhost;
charset UTF-8;
##
# Nginx Bad Bot Blocker Includes
# REPO: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##
include /etc/nginx/bots.d/ddos.conf;
include /etc/nginx/bots.d/blockbots.conf;
index index.html;
location / {
root /var/www/html/;
}
}

View file

@ -0,0 +1,93 @@
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
##
# Nginx Bad Bot Blocker Includes
# REPO: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##
include /etc/nginx/conf.d/botblocker-nginx-settings.conf;
include /etc/nginx/conf.d/globalblacklist.conf;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}

View file

@ -0,0 +1 @@
null

View file

@ -0,0 +1,75 @@
# EDIT THIS FILE AS YOU LIKE TO ADD OR REMOVE ANY BAD WORDS YOU WANT TO SCAN FOR ###
### VERSION INFORMATION #
###################################################
### Version: V4.2019.07
### Updated: 2019-06-24
###################################################
### VERSION INFORMATION ##
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# This is merely an example and gets auto included as since Version 2.2017.07 introduced on 2017-04-20
# This file must exist on your system or Nginx will fail a reload due to a missing file
# For all intensive purpose you can delete everything inside this file and leave it
# completely blank if you do not want your Nginx Blocker to include scanning for bad words within urls or referrer string
# Only add one entry per line
# *******************************
# !!! WARNING WARNING WARNING !!!
# *******************************
# ***************************************
# PLEASE BE VERY CAREFUL HOW YOU USE THIS
# ***************************************
# Here is an example of how one supposed bad word can cause your whole site to go down.
# An issue was logged where the users own domain name was specialisteparquet.com
# Because this list contained the word "cialis" it was detected within his domain name causing
# his entire site to go down and not server any assets.
# That one entry would even cause any site containing a word like "specialist" anywhere in any
# of their sites pages to cause them to be blocked and whitelisting your own domain name in the
# whitelist-domains.conf file will not even bypass this, SO BE CAREFUL PLEASE
# Think very carefully before you add any word here
# *****************************************************************************************
# PLEASE MAKE SURE that you use word regex boundaries to avoid false positive detection !!!
# *****************************************************************************************
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# As you can see in the examples below the word "adultgalls" is entered with a preceding \b and an ending \b
# this makes it now "\badultgalls\b". It is crucial to use the word boundaries regex formatting.
# ---------
# EXAMPLES:
# ---------
# "~*\badultgalls\b" 1;
# "~*\bamateurxpass\b" 1;
# "~*\bbigblackbooty\b" 1;
# "~*\bblacktits\b" 1;
# "~*\bcookie\-law\-enforcement\b" 1;
# "~*\bfree\-share\-buttons\b" 1;
# "~*\bfree\-social\-buttons\b" 1;
# "~*\bfuck\-paid\-share\-buttons\b" 1;
# "~*\bilovevitaly\b" 1;
# "~*\blaw\-enforcement\-bot\b" 1;
# "~*\blaw\-enforcement\-check\b" 1;
# "~*\bshare\-buttons\-for\-free\b" 1;
# "~*\bwebfuck\b" 1;
# "~*\bxxxrus\b" 1;
# "~*\bzeroredirect\b" 1;
"~*(?:\b)thisisabadword(?:\b|)" 1;
"~*(?:\b)thisisanotherbadword(?:\b|)" 1;

View file

@ -0,0 +1,45 @@
# EDIT THIS FILE AS YOU LIKE TO BLACKLIST YOUR OWN CUSTOM DOMAIN NAMES ###
### VERSION INFORMATION #
###################################################
### Version: V4.2019.05
### Updated: 2019-06-24
###################################################
### VERSION INFORMATION ##
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Add One Entry Per Line - List all your own extra domains you want to blacklist.
# This file must exist on your system or Nginx will fail a reload due to a missing file
# Automatic updates will never be able to remove this custom list of yours
# Add One Entry Per Line
# Make sure any domains have dots and special characters escaped as per the Regex examples below.
# For example myblacklisteddomainname.com should be entered as myfirstowndomainname\.com
# and my-second-blacklisted.com should be entered as my\-second\-owndomainname\.com
# *****************************************************************************************
# PLEASE MAKE SURE that you use word regex boundaries to avoid false positive detection !!!
# *****************************************************************************************
# As you can see in the examples below the domain "myblacklisteddomainname\.com" is entered with a preceding \b and an ending \b
# this makes it now "\bmyblacklisteddomainname\.com\b". It is crucial to use the word boundaries regex formatting.
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# ---------
# EXAMPLES:
# ---------
# "~*\bmyblacklisteddomainname\.com\b" 1;
# "~*\bmy\-second\-blacklisted\.com\b" 1;

View file

@ -0,0 +1,2 @@
34.66.25.221 1;
127.0.0.1 1;

View file

@ -0,0 +1,677 @@
# EDIT THIS FILE AS YOU LIKE TO BLACKLIST OR WHITELIST ANY BAD USER-AGENT STRINGS YOU WANT TO SCAN FOR
# ****************************************************************************************************
### VERSION INFORMATION #
###################################################
### Version: V3.2018.05
### Updated: 2018-08-21
###################################################
### VERSION INFORMATION ##
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Add One Entry Per Line - List all the extra bad User-Agents you want to permanently block or whitelist.
# This is for User-Agents that are not included in the main list of the bot blocker
# This file must exist on your system or Nginx will fail a reload due to a missing file
# This allows you finer control of keeping certain bots blocked and automatic updates will
# Never be able to remove this custom list of yours
# Please note this include file loads first before any of the already whitelisted User-Agents
# in the bad bot blocker. By loading first in line it over-rides anything below it so for instance
# if you want to block Baidu, Google or Bing for any reason you add them to this file which loads
# first and takes precedence over anything below it. This now allows even finer control over the
# bad bot blocker. Enjoy !!!
# Even though this file is called blacklist-user-agents, as mentioned it can also be used to whitelist user agents
# By adding them below and setting the 3; to 0; this will permanently whitelist the User-Agent.
# Make sure any words that contain special characters are escaped and include word boundaries as per the Regex examples below.
# Example the User-Agent name "someverybaduseragentname1" is entered as "\bsomeverybaduseragentname1\b"
# Example the User-Agent name "some-very-bad-useragentname2" is entered as "\bsome\-very\-bad\-useragentname1\b"
# the "\b" are word boundaries which prevents partial matching and false positives.
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# ---------------------
# WHITELISTING EXAMPLES
# ---------------------
# "~*\bsomeverygooduseragentname1\b" 0;
# "~*\bsomeverygooduseragentname2\b" 0;
# "~*\bsome\-very\-good\-useragentname2\b" 0;
# ---------------------
# BLACKLISTING EXAMPLES
# ---------------------
# "~*\bsomeverybaduseragentname1\b" 3;
# "~*\bsomeverybaduseragentname2\b" 3;
# "~*\bsome\-very\-bad\-useragentname2\b" 3;
# START MAKE BAD BOTS GOOD ### DO NOT EDIT THIS LINE AT ALL ###
"~*(?:\b)01h4x.com(?:\b|)" 0;
"~*(?:\b)360Spider(?:\b|)" 0;
"~*(?:\b)404checker(?:\b|)" 0;
"~*(?:\b)404enemy(?:\b|)" 0;
"~*(?:\b)80legs(?:\b|)" 0;
"~*(?:\b)Abonti(?:\b|)" 0;
"~*(?:\b)Aboundex(?:\b|)" 0;
"~*(?:\b)Aboundexbot(?:\b|)" 0;
"~*(?:\b)Acunetix(?:\b|)" 0;
"~*(?:\b)ADmantX(?:\b|)" 0;
"~*(?:\b)AfD-Verbotsverfahren(?:\b|)" 0;
"~*(?:\b)AhrefsBot(?:\b|)" 0;
"~*(?:\b)AIBOT(?:\b|)" 0;
"~*(?:\b)AiHitBot(?:\b|)" 0;
"~*(?:\b)Aipbot(?:\b|)" 0;
"~*(?:\b)Alexibot(?:\b|)" 0;
"~*(?:\b)Alligator(?:\b|)" 0;
"~*(?:\b)AllSubmitter(?:\b|)" 0;
"~*(?:\b)AlphaBot(?:\b|)" 0;
"~*(?:\b)Anarchie(?:\b|)" 0;
"~*(?:\b)Anarchy(?:\b|)" 0;
"~*(?:\b)Anarchy99(?:\b|)" 0;
"~*(?:\b)Ankit(?:\b|)" 0;
"~*(?:\b)Anthill(?:\b|)" 0;
"~*(?:\b)Apexoo(?:\b|)" 0;
"~*(?:\b)archive.org_bot(?:\b|)" 0;
"~*(?:\b)arquivo.pt(?:\b|)" 0;
"~*(?:\b)arquivo-web-crawler(?:\b|)" 0;
"~*(?:\b)Aspiegel(?:\b|)" 0;
"~*(?:\b)ASPSeek(?:\b|)" 0;
"~*(?:\b)Asterias(?:\b|)" 0;
"~*(?:\b)Attach(?:\b|)" 0;
"~*(?:\b)autoemailspider(?:\b|)" 0;
"~*(?:\b)AwarioRssBot(?:\b|)" 0;
"~*(?:\b)AwarioSmartBot(?:\b|)" 0;
"~*(?:\b)BackDoorBot(?:\b|)" 0;
"~*(?:\b)Backlink-Ceck(?:\b|)" 0;
"~*(?:\b)backlink-check(?:\b|)" 0;
"~*(?:\b)BacklinkCrawler(?:\b|)" 0;
"~*(?:\b)BackStreet(?:\b|)" 0;
"~*(?:\b)BackWeb(?:\b|)" 0;
"~*(?:\b)Badass(?:\b|)" 0;
"~*(?:\b)Bandit(?:\b|)" 0;
"~*(?:\b)Barkrowler(?:\b|)" 0;
"~*(?:\b)BatchFTP(?:\b|)" 0;
"~*(?:\b)Battleztar\ Bazinga(?:\b|)" 0;
"~*(?:\b)BBBike(?:\b|)" 0;
"~*(?:\b)BDCbot(?:\b|)" 0;
"~*(?:\b)BDFetch(?:\b|)" 0;
"~*(?:\b)BetaBot(?:\b|)" 0;
"~*(?:\b)Bigfoot(?:\b|)" 0;
"~*(?:\b)Bitacle(?:\b|)" 0;
"~*(?:\b)Blackboard(?:\b|)" 0;
"~*(?:\b)Black\ Hole(?:\b|)" 0;
"~*(?:\b)BlackWidow(?:\b|)" 0;
"~*(?:\b)BLEXBot(?:\b|)" 0;
"~*(?:\b)Blow(?:\b|)" 0;
"~*(?:\b)BlowFish(?:\b|)" 0;
"~*(?:\b)Boardreader(?:\b|)" 0;
"~*(?:\b)Bolt(?:\b|)" 0;
"~*(?:\b)BotALot(?:\b|)" 0;
"~*(?:\b)Brandprotect(?:\b|)" 0;
"~*(?:\b)Brandwatch(?:\b|)" 0;
"~*(?:\b)Buck(?:\b|)" 0;
"~*(?:\b)Buddy(?:\b|)" 0;
"~*(?:\b)BuiltBotTough(?:\b|)" 0;
"~*(?:\b)BuiltWith(?:\b|)" 0;
"~*(?:\b)Bullseye(?:\b|)" 0;
"~*(?:\b)BunnySlippers(?:\b|)" 0;
"~*(?:\b)BuzzSumo(?:\b|)" 0;
"~*(?:\b)Calculon(?:\b|)" 0;
"~*(?:\b)CATExplorador(?:\b|)" 0;
"~*(?:\b)CazoodleBot(?:\b|)" 0;
"~*(?:\b)CCBot(?:\b|)" 0;
"~*(?:\b)Cegbfeieh(?:\b|)" 0;
"~*(?:\b)CensysInspect(?:\b|)" 0;
"~*(?:\b)check1.exe(?:\b|)" 0;
"~*(?:\b)CheeseBot(?:\b|)" 0;
"~*(?:\b)CherryPicker(?:\b|)" 0;
"~*(?:\b)CheTeam(?:\b|)" 0;
"~*(?:\b)ChinaClaw(?:\b|)" 0;
"~*(?:\b)Chlooe(?:\b|)" 0;
"~*(?:\b)Claritybot(?:\b|)" 0;
"~*(?:\b)Cliqzbot(?:\b|)" 0;
"~*(?:\b)Cloud\ mapping(?:\b|)" 0;
"~*(?:\b)coccocbot-web(?:\b|)" 0;
"~*(?:\b)Cocolyzebot(?:\b|)" 0;
"~*(?:\b)CODE87(?:\b|)" 0;
"~*(?:\b)Cogentbot(?:\b|)" 0;
"~*(?:\b)cognitiveseo(?:\b|)" 0;
"~*(?:\b)Collector(?:\b|)" 0;
"~*(?:\b)com.plumanalytics(?:\b|)" 0;
"~*(?:\b)Copier(?:\b|)" 0;
"~*(?:\b)CopyRightCheck(?:\b|)" 0;
"~*(?:\b)Copyscape(?:\b|)" 0;
"~*(?:\b)Cosmos(?:\b|)" 0;
"~*(?:\b)Craftbot(?:\b|)" 0;
"~*(?:\b)crawler4j(?:\b|)" 0;
"~*(?:\b)crawler.feedback(?:\b|)" 0;
"~*(?:\b)crawl.sogou.com(?:\b|)" 0;
"~*(?:\b)CrazyWebCrawler(?:\b|)" 0;
"~*(?:\b)Crescent(?:\b|)" 0;
"~*(?:\b)CrunchBot(?:\b|)" 0;
"~*(?:\b)CSHttp(?:\b|)" 0;
"~*(?:\b)Curious(?:\b|)" 0;
"~*(?:\b)Custo(?:\b|)" 0;
"~*(?:\b)CyotekWebCopy(?:\b|)" 0;
"~*(?:\b)DatabaseDriverMysqli(?:\b|)" 0;
"~*(?:\b)DataCha0s(?:\b|)" 0;
"~*(?:\b)DBLBot(?:\b|)" 0;
"~*(?:\b)demandbase-bot(?:\b|)" 0;
"~*(?:\b)Demon(?:\b|)" 0;
"~*(?:\b)Deusu(?:\b|)" 0;
"~*(?:\b)Devil(?:\b|)" 0;
"~*(?:\b)Digincore(?:\b|)" 0;
"~*(?:\b)DigitalPebble(?:\b|)" 0;
"~*(?:\b)DIIbot(?:\b|)" 0;
"~*(?:\b)Dirbuster(?:\b|)" 0;
"~*(?:\b)Disco(?:\b|)" 0;
"~*(?:\b)Discobot(?:\b|)" 0;
"~*(?:\b)Discoverybot(?:\b|)" 0;
"~*(?:\b)Dispatch(?:\b|)" 0;
"~*(?:\b)DittoSpyder(?:\b|)" 0;
"~*(?:\b)DnyzBot(?:\b|)" 0;
"~*(?:\b)DomainAppender(?:\b|)" 0;
"~*(?:\b)DomainCrawler(?:\b|)" 0;
"~*(?:\b)DomainSigmaCrawler(?:\b|)" 0;
"~*(?:\b)Domains\ Project(?:\b|)" 0;
"~*(?:\b)domainsproject.org(?:\b|)" 0;
"~*(?:\b)DomainStatsBot(?:\b|)" 0;
"~*(?:\b)DomCopBot(?:\b|)" 0;
"~*(?:\b)Dotbot(?:\b|)" 0;
"~*(?:\b)Download\ Wonder(?:\b|)" 0;
"~*(?:\b)Dragonfly(?:\b|)" 0;
"~*(?:\b)Drip(?:\b|)" 0;
"~*(?:\b)DSearch(?:\b|)" 0;
"~*(?:\b)DTS\ Agent(?:\b|)" 0;
"~*(?:\b)EasyDL(?:\b|)" 0;
"~*(?:\b)Ebingbong(?:\b|)" 0;
"~*(?:\b)eCatch(?:\b|)" 0;
"~*(?:\b)ECCP/1.0(?:\b|)" 0;
"~*(?:\b)Ecxi(?:\b|)" 0;
"~*(?:\b)EirGrabber(?:\b|)" 0;
"~*(?:\b)EMail\ Siphon(?:\b|)" 0;
"~*(?:\b)EMail\ Wolf(?:\b|)" 0;
"~*(?:\b)EroCrawler(?:\b|)" 0;
"~*(?:\b)evc-batch(?:\b|)" 0;
"~*(?:\b)Evil(?:\b|)" 0;
"~*(?:\b)Exabot(?:\b|)" 0;
"~*(?:\b)Express\ WebPictures(?:\b|)" 0;
"~*(?:\b)ExtLinksBot(?:\b|)" 0;
"~*(?:\b)Extractor(?:\b|)" 0;
"~*(?:\b)ExtractorPro(?:\b|)" 0;
"~*(?:\b)Extreme\ Picture\ Finder(?:\b|)" 0;
"~*(?:\b)EyeNetIE(?:\b|)" 0;
"~*(?:\b)Ezooms(?:\b|)" 0;
"~*(?:\b)facebookscraper(?:\b|)" 0;
"~*(?:\b)FDM(?:\b|)" 0;
"~*(?:\b)FemtosearchBot(?:\b|)" 0;
"~*(?:\b)FHscan(?:\b|)" 0;
"~*(?:\b)Fimap(?:\b|)" 0;
"~*(?:\b)Firefox/7.0(?:\b|)" 0;
"~*(?:\b)FlashGet(?:\b|)" 0;
"~*(?:\b)Flunky(?:\b|)" 0;
"~*(?:\b)Foobot(?:\b|)" 0;
"~*(?:\b)Freeuploader(?:\b|)" 0;
"~*(?:\b)FrontPage(?:\b|)" 0;
"~*(?:\b)Fuzz(?:\b|)" 0;
"~*(?:\b)FyberSpider(?:\b|)" 0;
"~*(?:\b)Fyrebot(?:\b|)" 0;
"~*(?:\b)GalaxyBot(?:\b|)" 0;
"~*(?:\b)Genieo(?:\b|)" 0;
"~*(?:\b)GermCrawler(?:\b|)" 0;
"~*(?:\b)Getintent(?:\b|)" 0;
"~*(?:\b)GetRight(?:\b|)" 0;
"~*(?:\b)GetWeb(?:\b|)" 0;
"~*(?:\b)Gigablast(?:\b|)" 0;
"~*(?:\b)Gigabot(?:\b|)" 0;
"~*(?:\b)G-i-g-a-b-o-t(?:\b|)" 0;
"~*(?:\b)Go-Ahead-Got-It(?:\b|)" 0;
"~*(?:\b)gopher(?:\b|)" 0;
"~*(?:\b)Gotit(?:\b|)" 0;
"~*(?:\b)GoZilla(?:\b|)" 0;
"~*(?:\b)Go!Zilla(?:\b|)" 0;
"~*(?:\b)Grabber(?:\b|)" 0;
"~*(?:\b)GrabNet(?:\b|)" 0;
"~*(?:\b)Grafula(?:\b|)" 0;
"~*(?:\b)GrapeFX(?:\b|)" 0;
"~*(?:\b)GrapeshotCrawler(?:\b|)" 0;
"~*(?:\b)GridBot(?:\b|)" 0;
"~*(?:\b)GT::WWW(?:\b|)" 0;
"~*(?:\b)Haansoft(?:\b|)" 0;
"~*(?:\b)HaosouSpider(?:\b|)" 0;
"~*(?:\b)Harvest(?:\b|)" 0;
"~*(?:\b)Havij(?:\b|)" 0;
"~*(?:\b)HEADMasterSEO(?:\b|)" 0;
"~*(?:\b)heritrix(?:\b|)" 0;
"~*(?:\b)Heritrix(?:\b|)" 0;
"~*(?:\b)Hloader(?:\b|)" 0;
"~*(?:\b)HMView(?:\b|)" 0;
"~*(?:\b)HTMLparser(?:\b|)" 0;
"~*(?:\b)HTTP::Lite(?:\b|)" 0;
"~*(?:\b)HTTrack(?:\b|)" 0;
"~*(?:\b)Humanlinks(?:\b|)" 0;
"~*(?:\b)HybridBot(?:\b|)" 0;
"~*(?:\b)Iblog(?:\b|)" 0;
"~*(?:\b)IDBot(?:\b|)" 0;
"~*(?:\b)IDBTE4M(?:\b|)" 0;
"~*(?:\b)Id-search(?:\b|)" 0;
"~*(?:\b)IlseBot(?:\b|)" 0;
"~*(?:\b)Image\ Fetch(?:\b|)" 0;
"~*(?:\b)Image\ Sucker(?:\b|)" 0;
"~*(?:\b)IndeedBot(?:\b|)" 0;
"~*(?:\b)Indy\ Library(?:\b|)" 0;
"~*(?:\b)InfoNaviRobot(?:\b|)" 0;
"~*(?:\b)InfoTekies(?:\b|)" 0;
"~*(?:\b)instabid(?:\b|)" 0;
"~*(?:\b)Intelliseek(?:\b|)" 0;
"~*(?:\b)InterGET(?:\b|)" 0;
"~*(?:\b)Internet\ Ninja(?:\b|)" 0;
"~*(?:\b)InternetSeer(?:\b|)" 0;
"~*(?:\b)internetVista\ monitor(?:\b|)" 0;
"~*(?:\b)ips-agent(?:\b|)" 0;
"~*(?:\b)Iria(?:\b|)" 0;
"~*(?:\b)IRLbot(?:\b|)" 0;
"~*(?:\b)isitwp.com(?:\b|)" 0;
"~*(?:\b)Iskanie(?:\b|)" 0;
"~*(?:\b)IstellaBot(?:\b|)" 0;
"~*(?:\b)JamesBOT(?:\b|)" 0;
"~*(?:\b)Jbrofuzz(?:\b|)" 0;
"~*(?:\b)JennyBot(?:\b|)" 0;
"~*(?:\b)JetCar(?:\b|)" 0;
"~*(?:\b)Jetty(?:\b|)" 0;
"~*(?:\b)JikeSpider(?:\b|)" 0;
"~*(?:\b)JOC\ Web\ Spider(?:\b|)" 0;
"~*(?:\b)Joomla(?:\b|)" 0;
"~*(?:\b)Jorgee(?:\b|)" 0;
"~*(?:\b)JustView(?:\b|)" 0;
"~*(?:\b)Jyxobot(?:\b|)" 0;
"~*(?:\b)Kenjin\ Spider(?:\b|)" 0;
"~*(?:\b)Keyword\ Density(?:\b|)" 0;
"~*(?:\b)Kinza(?:\b|)" 0;
"~*(?:\b)Kozmosbot(?:\b|)" 0;
"~*(?:\b)Lanshanbot(?:\b|)" 0;
"~*(?:\b)Larbin(?:\b|)" 0;
"~*(?:\b)LeechFTP(?:\b|)" 0;
"~*(?:\b)LeechGet(?:\b|)" 0;
"~*(?:\b)LexiBot(?:\b|)" 0;
"~*(?:\b)Lftp(?:\b|)" 0;
"~*(?:\b)LibWeb(?:\b|)" 0;
"~*(?:\b)Libwhisker(?:\b|)" 0;
"~*(?:\b)LieBaoFast(?:\b|)" 0;
"~*(?:\b)Lightspeedsystems(?:\b|)" 0;
"~*(?:\b)Likse(?:\b|)" 0;
"~*(?:\b)Linkbot(?:\b|)" 0;
"~*(?:\b)Linkdexbot(?:\b|)" 0;
"~*(?:\b)LinkextractorPro(?:\b|)" 0;
"~*(?:\b)LinkpadBot(?:\b|)" 0;
"~*(?:\b)LinkScan(?:\b|)" 0;
"~*(?:\b)LinksManager(?:\b|)" 0;
"~*(?:\b)LinkWalker(?:\b|)" 0;
"~*(?:\b)LinqiaMetadataDownloaderBot(?:\b|)" 0;
"~*(?:\b)LinqiaRSSBot(?:\b|)" 0;
"~*(?:\b)LinqiaScrapeBot(?:\b|)" 0;
"~*(?:\b)Lipperhey(?:\b|)" 0;
"~*(?:\b)Lipperhey\ Spider(?:\b|)" 0;
"~*(?:\b)Litemage_walker(?:\b|)" 0;
"~*(?:\b)Lmspider(?:\b|)" 0;
"~*(?:\b)LNSpiderguy(?:\b|)" 0;
"~*(?:\b)Ltx71(?:\b|)" 0;
"~*(?:\b)lwp-request(?:\b|)" 0;
"~*(?:\b)LWP::Simple(?:\b|)" 0;
"~*(?:\b)lwp-trivial(?:\b|)" 0;
"~*(?:\b)Magnet(?:\b|)" 0;
"~*(?:\b)Mag-Net(?:\b|)" 0;
"~*(?:\b)magpie-crawler(?:\b|)" 0;
"~*(?:\b)Mail.RU_Bot(?:\b|)" 0;
"~*(?:\b)Majestic12(?:\b|)" 0;
"~*(?:\b)Majestic-SEO(?:\b|)" 0;
"~*(?:\b)Majestic\ SEO(?:\b|)" 0;
"~*(?:\b)MarkMonitor(?:\b|)" 0;
"~*(?:\b)MarkWatch(?:\b|)" 0;
"~*(?:\b)Masscan(?:\b|)" 0;
"~*(?:\b)Mass\ Downloader(?:\b|)" 0;
"~*(?:\b)Mata\ Hari(?:\b|)" 0;
"~*(?:\b)MauiBot(?:\b|)" 0;
"~*(?:\b)Mb2345Browser(?:\b|)" 0;
"~*(?:\b)meanpathbot(?:\b|)" 0;
"~*(?:\b)Meanpathbot(?:\b|)" 0;
"~*(?:\b)MeanPath\ Bot(?:\b|)" 0;
"~*(?:\b)Mediatoolkitbot(?:\b|)" 0;
"~*(?:\b)mediawords(?:\b|)" 0;
"~*(?:\b)MegaIndex.ru(?:\b|)" 0;
"~*(?:\b)Metauri(?:\b|)" 0;
"~*(?:\b)MFC_Tear_Sample(?:\b|)" 0;
"~*(?:\b)MicroMessenger(?:\b|)" 0;
"~*(?:\b)Microsoft\ Data\ Access(?:\b|)" 0;
"~*(?:\b)Microsoft\ URL\ Control(?:\b|)" 0;
"~*(?:\b)MIDown\ tool(?:\b|)" 0;
"~*(?:\b)MIIxpc(?:\b|)" 0;
"~*(?:\b)Mister\ PiX(?:\b|)" 0;
"~*(?:\b)MJ12bot(?:\b|)" 0;
"~*(?:\b)Moblie Safari(?:\b|)" 0;
"~*(?:\b)Mojeek(?:\b|)" 0;
"~*(?:\b)Mojolicious(?:\b|)" 0;
"~*(?:\b)Morfeus\ Fucking\ Scanner(?:\b|)" 0;
"~*(?:\b)Mozlila(?:\b|)" 0;
"~*(?:\b)MQQBrowser(?:\b|)" 0;
"~*(?:\b)Mr.4x3(?:\b|)" 0;
"~*(?:\b)MSFrontPage(?:\b|)" 0;
"~*(?:\b)MSIECrawler(?:\b|)" 0;
"~*(?:\b)Msrabot(?:\b|)" 0;
"~*(?:\b)MTRobot(?:\b|)" 0;
"~*(?:\b)muhstik-scan(?:\b|)" 0;
"~*(?:\b)Musobot(?:\b|)" 0;
"~*(?:\b)Name\ Intelligence(?:\b|)" 0;
"~*(?:\b)Nameprotect(?:\b|)" 0;
"~*(?:\b)Navroad(?:\b|)" 0;
"~*(?:\b)NearSite(?:\b|)" 0;
"~*(?:\b)Needle(?:\b|)" 0;
"~*(?:\b)Nessus(?:\b|)" 0;
"~*(?:\b)NetAnts(?:\b|)" 0;
"~*(?:\b)Netcraft(?:\b|)" 0;
"~*(?:\b)netEstate\ NE\ Crawler(?:\b|)" 0;
"~*(?:\b)NetLyzer(?:\b|)" 0;
"~*(?:\b)NetMechanic(?:\b|)" 0;
"~*(?:\b)NetSpider(?:\b|)" 0;
"~*(?:\b)Nettrack(?:\b|)" 0;
"~*(?:\b)Net\ Vampire(?:\b|)" 0;
"~*(?:\b)Netvibes(?:\b|)" 0;
"~*(?:\b)NetZIP(?:\b|)" 0;
"~*(?:\b)NextGenSearchBot(?:\b|)" 0;
"~*(?:\b)Nibbler(?:\b|)" 0;
"~*(?:\b)NICErsPRO(?:\b|)" 0;
"~*(?:\b)Niki-bot(?:\b|)" 0;
"~*(?:\b)Nikto(?:\b|)" 0;
"~*(?:\b)NimbleCrawler(?:\b|)" 0;
"~*(?:\b)Nimbostratus(?:\b|)" 0;
"~*(?:\b)Ninja(?:\b|)" 0;
"~*(?:\b)Nmap(?:\b|)" 0;
"~*(?:\b)NPbot(?:\b|)" 0;
"~*(?:\b)Nuclei(?:\b|)" 0;
"~*(?:\b)Nutch(?:\b|)" 0;
"~*(?:\b)oBot(?:\b|)" 0;
"~*(?:\b)Octopus(?:\b|)" 0;
"~*(?:\b)Offline\ Explorer(?:\b|)" 0;
"~*(?:\b)Offline\ Navigator(?:\b|)" 0;
"~*(?:\b)OnCrawl(?:\b|)" 0;
"~*(?:\b)Openfind(?:\b|)" 0;
"~*(?:\b)OpenLinkProfiler(?:\b|)" 0;
"~*(?:\b)Openvas(?:\b|)" 0;
"~*(?:\b)OpenVAS(?:\b|)" 0;
"~*(?:\b)OPPO\ A33(?:\b|)" 0;
"~*(?:\b)OrangeBot(?:\b|)" 0;
"~*(?:\b)OrangeSpider(?:\b|)" 0;
"~*(?:\b)OutclicksBot(?:\b|)" 0;
"~*(?:\b)OutfoxBot(?:\b|)" 0;
"~*(?:\b)PageAnalyzer(?:\b|)" 0;
"~*(?:\b)Page\ Analyzer(?:\b|)" 0;
"~*(?:\b)PageGrabber(?:\b|)" 0;
"~*(?:\b)page\ scorer(?:\b|)" 0;
"~*(?:\b)PageScorer(?:\b|)" 0;
"~*(?:\b)PageThing.com(?:\b|)" 0;
"~*(?:\b)Pandalytics(?:\b|)" 0;
"~*(?:\b)Panscient(?:\b|)" 0;
"~*(?:\b)Papa\ Foto(?:\b|)" 0;
"~*(?:\b)Pavuk(?:\b|)" 0;
"~*(?:\b)pcBrowser(?:\b|)" 0;
"~*(?:\b)PECL::HTTP(?:\b|)" 0;
"~*(?:\b)PeoplePal(?:\b|)" 0;
"~*(?:\b)Petalbot(?:\b|)" 0;
"~*(?:\b)PHPCrawl(?:\b|)" 0;
"~*(?:\b)Picscout(?:\b|)" 0;
"~*(?:\b)Picsearch(?:\b|)" 0;
"~*(?:\b)PictureFinder(?:\b|)" 0;
"~*(?:\b)Piepmatz(?:\b|)" 0;
"~*(?:\b)Pimonster(?:\b|)" 0;
"~*(?:\b)Pi-Monster(?:\b|)" 0;
"~*(?:\b)Pixray(?:\b|)" 0;
"~*(?:\b)PleaseCrawl(?:\b|)" 0;
"~*(?:\b)plumanalytics(?:\b|)" 0;
"~*(?:\b)Pockey(?:\b|)" 0;
"~*(?:\b)POE-Component-Client-HTTP(?:\b|)" 0;
"~*(?:\b)polaris\ version(?:\b|)" 0;
"~*(?:\b)probe-image-size(?:\b|)" 0;
"~*(?:\b)Probethenet(?:\b|)" 0;
"~*(?:\b)ProPowerBot(?:\b|)" 0;
"~*(?:\b)ProWebWalker(?:\b|)" 0;
"~*(?:\b)Psbot(?:\b|)" 0;
"~*(?:\b)Pu_iN(?:\b|)" 0;
"~*(?:\b)Pump(?:\b|)" 0;
"~*(?:\b)PxBroker(?:\b|)" 0;
"~*(?:\b)PyCurl(?:\b|)" 0;
"~*(?:\b)QueryN\ Metasearch(?:\b|)" 0;
"~*(?:\b)Quick-Crawler(?:\b|)" 0;
"~*(?:\b)RankActive(?:\b|)" 0;
"~*(?:\b)RankActiveLinkBot(?:\b|)" 0;
"~*(?:\b)RankFlex(?:\b|)" 0;
"~*(?:\b)RankingBot(?:\b|)" 0;
"~*(?:\b)RankingBot2(?:\b|)" 0;
"~*(?:\b)Rankivabot(?:\b|)" 0;
"~*(?:\b)RankurBot(?:\b|)" 0;
"~*(?:\b)RealDownload(?:\b|)" 0;
"~*(?:\b)Reaper(?:\b|)" 0;
"~*(?:\b)RebelMouse(?:\b|)" 0;
"~*(?:\b)Recorder(?:\b|)" 0;
"~*(?:\b)RedesScrapy(?:\b|)" 0;
"~*(?:\b)ReGet(?:\b|)" 0;
"~*(?:\b)RepoMonkey(?:\b|)" 0;
"~*(?:\b)Re-re(?:\b|)" 0;
"~*(?:\b)Ripper(?:\b|)" 0;
"~*(?:\b)ripz(?:\b|)" 0;
"~*(?:\b)RocketCrawler(?:\b|)" 0;
"~*(?:\b)Rogerbot(?:\b|)" 0;
"~*(?:\b)RSSingBot(?:\b|)" 0;
"~*(?:\b)s1z.ru(?:\b|)" 0;
"~*(?:\b)SalesIntelligent(?:\b|)" 0;
"~*(?:\b)satoristudio.net(?:\b|)" 0;
"~*(?:\b)SBIder(?:\b|)" 0;
"~*(?:\b)scalaj-http(?:\b|)" 0;
"~*(?:\b)ScanAlert(?:\b|)" 0;
"~*(?:\b)Scanbot(?:\b|)" 0;
"~*(?:\b)scan.lol(?:\b|)" 0;
"~*(?:\b)ScoutJet(?:\b|)" 0;
"~*(?:\b)Scrapy(?:\b|)" 0;
"~*(?:\b)Screaming(?:\b|)" 0;
"~*(?:\b)ScreenerBot(?:\b|)" 0;
"~*(?:\b)ScrepyBot(?:\b|)" 0;
"~*(?:\b)Searchestate(?:\b|)" 0;
"~*(?:\b)SearchmetricsBot(?:\b|)" 0;
"~*(?:\b)Semrush(?:\b|)" 0;
"~*(?:\b)SemrushBot(?:\b|)" 0;
"~*(?:\b)SentiBot(?:\b|)" 0;
"~*(?:\b)seobility(?:\b|)" 0;
"~*(?:\b)SeobilityBot(?:\b|)" 0;
"~*(?:\b)SEOkicks(?:\b|)" 0;
"~*(?:\b)SEOkicks-Robot(?:\b|)" 0;
"~*(?:\b)SEOlyticsCrawler(?:\b|)" 0;
"~*(?:\b)Seomoz(?:\b|)" 0;
"~*(?:\b)SEOprofiler(?:\b|)" 0;
"~*(?:\b)seoscanners(?:\b|)" 0;
"~*(?:\b)SeoSiteCheckup(?:\b|)" 0;
"~*(?:\b)seostar(?:\b|)" 0;
"~*(?:\b)SEOstats(?:\b|)" 0;
"~*(?:\b)serpstatbot(?:\b|)" 0;
"~*(?:\b)sexsearcher(?:\b|)" 0;
"~*(?:\b)Shodan(?:\b|)" 0;
"~*(?:\b)Siphon(?:\b|)" 0;
"~*(?:\b)SISTRIX(?:\b|)" 0;
"~*(?:\b)Sitebeam(?:\b|)" 0;
"~*(?:\b)SiteCheckerBotCrawler(?:\b|)" 0;
"~*(?:\b)sitechecker.pro(?:\b|)" 0;
"~*(?:\b)SiteExplorer(?:\b|)" 0;
"~*(?:\b)Siteimprove(?:\b|)" 0;
"~*(?:\b)SiteLockSpider(?:\b|)" 0;
"~*(?:\b)siteripz(?:\b|)" 0;
"~*(?:\b)SiteSnagger(?:\b|)" 0;
"~*(?:\b)SiteSucker(?:\b|)" 0;
"~*(?:\b)Site\ Sucker(?:\b|)" 0;
"~*(?:\b)Sitevigil(?:\b|)" 0;
"~*(?:\b)SlySearch(?:\b|)" 0;
"~*(?:\b)SmartDownload(?:\b|)" 0;
"~*(?:\b)SMTBot(?:\b|)" 0;
"~*(?:\b)Snake(?:\b|)" 0;
"~*(?:\b)Snapbot(?:\b|)" 0;
"~*(?:\b)Snoopy(?:\b|)" 0;
"~*(?:\b)SocialRankIOBot(?:\b|)" 0;
"~*(?:\b)Sociscraper(?:\b|)" 0;
"~*(?:\b)sogouspider(?:\b|)" 0;
"~*(?:\b)Sogou\ web\ spider(?:\b|)" 0;
"~*(?:\b)Sosospider(?:\b|)" 0;
"~*(?:\b)Sottopop(?:\b|)" 0;
"~*(?:\b)SpaceBison(?:\b|)" 0;
"~*(?:\b)Spammen(?:\b|)" 0;
"~*(?:\b)SpankBot(?:\b|)" 0;
"~*(?:\b)Spanner(?:\b|)" 0;
"~*(?:\b)sp_auditbot(?:\b|)" 0;
"~*(?:\b)Spbot(?:\b|)" 0;
"~*(?:\b)Spinn3r(?:\b|)" 0;
"~*(?:\b)SputnikBot(?:\b|)" 0;
"~*(?:\b)spyfu(?:\b|)" 0;
"~*(?:\b)Sqlmap(?:\b|)" 0;
"~*(?:\b)Sqlworm(?:\b|)" 0;
"~*(?:\b)Sqworm(?:\b|)" 0;
"~*(?:\b)Steeler(?:\b|)" 0;
"~*(?:\b)Stripper(?:\b|)" 0;
"~*(?:\b)Sucker(?:\b|)" 0;
"~*(?:\b)Sucuri(?:\b|)" 0;
"~*(?:\b)SuperBot(?:\b|)" 0;
"~*(?:\b)SuperHTTP(?:\b|)" 0;
"~*(?:\b)Surfbot(?:\b|)" 0;
"~*(?:\b)SurveyBot(?:\b|)" 0;
"~*(?:\b)Suzuran(?:\b|)" 0;
"~*(?:\b)Swiftbot(?:\b|)" 0;
"~*(?:\b)sysscan(?:\b|)" 0;
"~*(?:\b)Szukacz(?:\b|)" 0;
"~*(?:\b)T0PHackTeam(?:\b|)" 0;
"~*(?:\b)T8Abot(?:\b|)" 0;
"~*(?:\b)tAkeOut(?:\b|)" 0;
"~*(?:\b)Teleport(?:\b|)" 0;
"~*(?:\b)TeleportPro(?:\b|)" 0;
"~*(?:\b)Telesoft(?:\b|)" 0;
"~*(?:\b)Telesphoreo(?:\b|)" 0;
"~*(?:\b)Telesphorep(?:\b|)" 0;
"~*(?:\b)The\ Intraformant(?:\b|)" 0;
"~*(?:\b)TheNomad(?:\b|)" 0;
"~*(?:\b)Thumbor(?:\b|)" 0;
"~*(?:\b)TightTwatBot(?:\b|)" 0;
"~*(?:\b)Titan(?:\b|)" 0;
"~*(?:\b)Toata(?:\b|)" 0;
"~*(?:\b)Toweyabot(?:\b|)" 0;
"~*(?:\b)Tracemyfile(?:\b|)" 0;
"~*(?:\b)Trendiction(?:\b|)" 0;
"~*(?:\b)Trendictionbot(?:\b|)" 0;
"~*(?:\b)trendiction.com(?:\b|)" 0;
"~*(?:\b)trendiction.de(?:\b|)" 0;
"~*(?:\b)True_Robot(?:\b|)" 0;
"~*(?:\b)Turingos(?:\b|)" 0;
"~*(?:\b)Turnitin(?:\b|)" 0;
"~*(?:\b)TurnitinBot(?:\b|)" 0;
"~*(?:\b)TwengaBot(?:\b|)" 0;
"~*(?:\b)Twice(?:\b|)" 0;
"~*(?:\b)Typhoeus(?:\b|)" 0;
"~*(?:\b)UnisterBot(?:\b|)" 0;
"~*(?:\b)Upflow(?:\b|)" 0;
"~*(?:\b)URLy.Warning(?:\b|)" 0;
"~*(?:\b)URLy\ Warning(?:\b|)" 0;
"~*(?:\b)Vacuum(?:\b|)" 0;
"~*(?:\b)Vagabondo(?:\b|)" 0;
"~*(?:\b)V-BOT(?:\b|)" 0;
"~*(?:\b)VB\ Project(?:\b|)" 0;
"~*(?:\b)VCI(?:\b|)" 0;
"~*(?:\b)VelenPublicWebCrawler(?:\b|)" 0;
"~*(?:\b)VeriCiteCrawler(?:\b|)" 0;
"~*(?:\b)VidibleScraper(?:\b|)" 0;
"~*(?:\b)Virusdie(?:\b|)" 0;
"~*(?:\b)VoidEYE(?:\b|)" 0;
"~*(?:\b)Voil(?:\b|)" 0;
"~*(?:\b)Voltron(?:\b|)" 0;
"~*(?:\b)voyagerx.com(?:\b|)" 0;
"~*(?:\b)Wallpapers/3.0(?:\b|)" 0;
"~*(?:\b)WallpapersHD(?:\b|)" 0;
"~*(?:\b)WASALive-Bot(?:\b|)" 0;
"~*(?:\b)WBSearchBot(?:\b|)" 0;
"~*(?:\b)Webalta(?:\b|)" 0;
"~*(?:\b)WebAuto(?:\b|)" 0;
"~*(?:\b)Web\ Auto(?:\b|)" 0;
"~*(?:\b)WebBandit(?:\b|)" 0;
"~*(?:\b)WebCollage(?:\b|)" 0;
"~*(?:\b)Web\ Collage(?:\b|)" 0;
"~*(?:\b)WebCopier(?:\b|)" 0;
"~*(?:\b)WEBDAV(?:\b|)" 0;
"~*(?:\b)WebEnhancer(?:\b|)" 0;
"~*(?:\b)Web\ Enhancer(?:\b|)" 0;
"~*(?:\b)WebFetch(?:\b|)" 0;
"~*(?:\b)Web\ Fetch(?:\b|)" 0;
"~*(?:\b)WebFuck(?:\b|)" 0;
"~*(?:\b)Web\ Fuck(?:\b|)" 0;
"~*(?:\b)WebGo\ IS(?:\b|)" 0;
"~*(?:\b)WebImageCollector(?:\b|)" 0;
"~*(?:\b)WebLeacher(?:\b|)" 0;
"~*(?:\b)WebmasterWorldForumBot(?:\b|)" 0;
"~*(?:\b)webmeup-crawler(?:\b|)" 0;
"~*(?:\b)WebPix(?:\b|)" 0;
"~*(?:\b)Web\ Pix(?:\b|)" 0;
"~*(?:\b)WebReaper(?:\b|)" 0;
"~*(?:\b)WebSauger(?:\b|)" 0;
"~*(?:\b)Web\ Sauger(?:\b|)" 0;
"~*(?:\b)Webshag(?:\b|)" 0;
"~*(?:\b)WebsiteExtractor(?:\b|)" 0;
"~*(?:\b)WebsiteQuester(?:\b|)" 0;
"~*(?:\b)Website\ Quester(?:\b|)" 0;
"~*(?:\b)Webster(?:\b|)" 0;
"~*(?:\b)WebStripper(?:\b|)" 0;
"~*(?:\b)WebSucker(?:\b|)" 0;
"~*(?:\b)Web\ Sucker(?:\b|)" 0;
"~*(?:\b)WebWhacker(?:\b|)" 0;
"~*(?:\b)WebZIP(?:\b|)" 0;
"~*(?:\b)WeSEE(?:\b|)" 0;
"~*(?:\b)Whack(?:\b|)" 0;
"~*(?:\b)Whacker(?:\b|)" 0;
"~*(?:\b)Whatweb(?:\b|)" 0;
"~*(?:\b)Who.is\ Bot(?:\b|)" 0;
"~*(?:\b)Widow(?:\b|)" 0;
"~*(?:\b)WinHTTrack(?:\b|)" 0;
"~*(?:\b)WiseGuys\ Robot(?:\b|)" 0;
"~*(?:\b)WISENutbot(?:\b|)" 0;
"~*(?:\b)Wonderbot(?:\b|)" 0;
"~*(?:\b)Woobot(?:\b|)" 0;
"~*(?:\b)Wotbox(?:\b|)" 0;
"~*(?:\b)Wprecon(?:\b|)" 0;
"~*(?:\b)WPScan(?:\b|)" 0;
"~*(?:\b)WWW-Collector-E(?:\b|)" 0;
"~*(?:\b)WWW-Mechanize(?:\b|)" 0;
"~*(?:\b)WWW::Mechanize(?:\b|)" 0;
"~*(?:\b)WWWOFFLE(?:\b|)" 0;
"~*(?:\b)x09Mozilla(?:\b|)" 0;
"~*(?:\b)x22Mozilla(?:\b|)" 0;
"~*(?:\b)Xaldon_WebSpider(?:\b|)" 0;
"~*(?:\b)Xaldon\ WebSpider(?:\b|)" 0;
"~*(?:\b)Xenu(?:\b|)" 0;
"~*(?:\b)xpymep1.exe(?:\b|)" 0;
"~*(?:\b)YoudaoBot(?:\b|)" 0;
"~*(?:\b)Zade(?:\b|)" 0;
"~*(?:\b)Zauba(?:\b|)" 0;
"~*(?:\b)zauba.io(?:\b|)" 0;
"~*(?:\b)Zermelo(?:\b|)" 0;
"~*(?:\b)Zeus(?:\b|)" 0;
"~*(?:\b)zgrab(?:\b|)" 0;
"~*(?:\b)Zitebot(?:\b|)" 0;
"~*(?:\b)ZmEu(?:\b|)" 0;
"~*(?:\b)ZoomBot(?:\b|)" 0;
"~*(?:\b)ZoominfoBot(?:\b|)" 0;
"~*(?:\b)ZumBot(?:\b|)" 0;
"~*(?:\b)ZyBorg(?:\b|)" 0;
# END MAKE BAD BOTS GOOD ### DO NOT EDIT THIS LINE AT ALL ###

View file

@ -0,0 +1,85 @@
# Author/Copyright: Mitchell Krog <mitchellkrog@gmail.com> - https://github.com/mitchellkrogza/
# VERSION INFORMATION #
#----------------------
# Version: V4.2019.04
# Updated: 2019-06-28
#----------------------
# VERSION INFORMATION #
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Include this in a vhost file within a server {} block using and include statement like below
# Place it near the top of your server {} block before any location / statements and it will block everywhere on your site.
# server {
# #Config stuff here
# include /etc/nginx/bots.d/blockbots.conf
# include /etc/nginx/bots.d/ddos.conf
# #Other config stuff here
# }
#######################################################################
# -----------------------------------
# OVER-RIDE BLOCKER / SUPER WHITELIST
# -----------------------------------
# In this block you can allow any IP address specified here to over-ride any bad bot or IP blocking of the blocker.
# This is useful for testing or allowing only specific IP's (ie. Internal ranges) to never be blocked.
# More IP's can be added example > "(127.0.0.1)|(192.168.0.1)|(192.168.1.1)"
# If you even blacklisted 127.0.0.1 or your own IP by giving it a value of 1 in any of the includes, this will over-ride that block.
# UNCOMMENT THE NEXT 4 LINES TO ACTIVATE THE SUPER WHITELIST
#if ($remote_addr ~ "(127.0.0.1)|(192.168.0.1)" ) {
#set $bad_bot '0'; #Uncommenting this line will disable bad_bots functionality for specified IP(s)
#set $validate_client '0'; #Uncommenting this line will disable validate_client ip blocking functionality for specified IP(s)
#}
# --------------
# BLOCK BAD BOTS
# --------------
# Section bot_1 Unused
#limit_conn bot1_connlimit 100;
#limit_req zone=bot1_reqlimitip burst=50;
limit_conn bot2_connlimit 10;
limit_req zone=bot2_reqlimitip burst=10;
if ($bad_bot = '3') {
return 444; # << Response Code Issued May Be Modified to Whatever you Choose ie. 404 but 444 wastes less of Nginxs time
}
# ---------------------
# BLOCK BAD REFER WORDS
# ---------------------
if ($bad_words) {
return 444; # << Response Code Issued May Be Modified to Whatever you Choose ie. 404 but 444 wastes less of Nginxs time
}
# ------------------
# BLOCK BAD REFERERS
# ------------------
if ($bad_referer) {
return 444; # << Response Code Issued May Be Modified to Whatever you Choose ie. 404 but 444 wastes less of Nginxs time
}
# -----------------------------
# BLOCK IP ADDRESSES and RANGES
# -----------------------------
if ($validate_client) {
return 444; # << Response Code Issued May Be Modified to Whatever you Choose ie. 404 but 444 wastes less of Nginxs time
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,36 @@
#######################################################################
### VERSION INFORMATION #
###################################################
### Version: V4.2019.02
### Updated: 2019-06-24
###################################################
### VERSION INFORMATION ##
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Author: Mitchell Krog <mitchellkrog@gmail.com> - https://github.com/mitchellkrogza/
# Include this in a vhost file within a server {} block using and include statement like below
# server {
# #Config stuff here
# include /etc/nginx/bots.d/blockbots.conf
# include /etc/nginx/bots.d/ddos.conf
# #Other config stuff here
# }
#######################################################################
limit_conn addr 200;
limit_req zone=flood burst=200 nodelay;

View file

@ -0,0 +1,47 @@
# EDIT THIS FILE AS YOU LIKE TO WHITELIST YOUR OWN DOMAIN NAMES AND SPARE THEM FROM ANY REFERRER CHECKING ###
### VERSION INFORMATION #
###################################################
### Version: V4.2019.05
### Updated: 2019-06-24
###################################################
### VERSION INFORMATION ##
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Add One Entry Per Line - List all your own domains of the sites you host on the server
# This file must exist on your system or Nginx will fail a reload due to a missing file
# Automatic updates will never be able to remove this custom list of yours
# Add One Entry Per Line
# Make sure any domains have dots and special characters escaped as per the Regex examples below.
# For example myfirstowndomainname.com should be entered as myfirstowndomainname\.com
# and my-second-owndomainname.com should be entered as my\-second\-owndomainname\.com
# *****************************************************************************************
# PLEASE MAKE SURE that you use word regex boundaries to avoid false positive detection !!!
# *****************************************************************************************
# As you can see in the examples below the domain "myfirstowndomainname\.com" is entered with a preceding \b and an ending \b
# this makes it now "\bmyfirstowndomainname\.com\b". It is crucial to use the word boundaries regex formatting.
# BY DEFAULT ALL THE EXAMPLES BELOW ARE COMMENTED OUT AND HENCE NOT ENABLED
# ---------
# EXAMPLES:
# ---------
# "~*\bmyfirstowndomainname\.com\b" 0;
# "~*\bmy\-second\-owndomainname\.com\b" 0;
"~*(?:\b)myowndomain\.com(?:\b|)" 0;
"~*(?:\b)myotherdomain\.com(?:\b|)" 0;

View file

@ -0,0 +1,2 @@
34.66.25.221 0;
127.0.0.1 0;

View file

@ -0,0 +1 @@
null

View file

@ -0,0 +1,31 @@
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# Version 1.1
# ! new directives also to be added to include_filelist.txt ! #
server_names_hash_bucket_size 256;
server_names_hash_max_size 4096;
variables_hash_max_size 4096;
variables_hash_bucket_size 4096;
limit_req_zone $binary_remote_addr zone=flood:50m rate=90r/s;
limit_conn_zone $binary_remote_addr zone=addr:50m;
# ****************************************************************************
# NOTE: IF you are using a system like Nginx-Proxy from @JWilder
# ****************************************************************************
# Repo URL: https://github.com/jwilder/nginx-proxy
# You will need to comment out the first line here as follows.
# #server_names_hash_bucket_size 128;
# You will also need to modify the nginx.tmpl file to add the default include
# include /etc/nginx/conf.d/*
# ****************************************************************************

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,21 @@
server {
listen *:9000;
root /var/www/html;
server_name localhost;
charset UTF-8;
##
# Nginx Bad Bot Blocker Includes
# REPO: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##
include /etc/nginx/bots.d/ddos.conf;
include /etc/nginx/bots.d/blockbots.conf;
index index.html;
location / {
root /var/www/html/;
}
}

View file

@ -0,0 +1,93 @@
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
##
# Nginx Bad Bot Blocker Includes
# REPO: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##
include /etc/nginx/conf.d/botblocker-nginx-settings.conf;
include /etc/nginx/conf.d/globalblacklist.conf;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}

View file

@ -0,0 +1,9 @@
server {
listen *:9000;
root /var/www/html;
server_name localhost;
charset UTF-8;
index index.html;
}

12
dev-tools/default.vhost Normal file
View file

@ -0,0 +1,12 @@
server {
listen 80:8080;
root /var/www/html;
server_name localhost;
charset UTF-8;
index index.html;
location / {
root /var/www/html/;
}
}

115
dev-tools/deploy-package.sh Executable file
View file

@ -0,0 +1,115 @@
#!/bin/bash
# TravisCI Package Deploy Script for the Nginx Ultimate Bad Bot Blocker
# Created by: Mitchell Krog (mitchellkrog@gmail.com)
# Copyright: Mitchell Krog - https://github.com/mitchellkrogza
# Repo Url: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------
# ------------------------
# Set Terminal Font Colors
# ------------------------
bold=$(tput bold)
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
blue=$(tput setaf 4)
magenta=$(tput setaf 5)
cyan=$(tput setaf 6)
white=$(tput setaf 7)
defaultcolor=$(tput setaf default)
# ---------
# Variables
# ---------
YEAR=$(date +"%Y")
MONTH=$(date +"%m")
# ---------
# Functions
# ---------
deployPackage () {
printf "\n"
echo "${bold}${green}DEPLOYING V4.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER}"
printf "\n"
cd ${TRAVIS_BUILD_DIR}
sudo git remote -v
export GIT_TAG=V4.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER}
git tag ${GIT_TAG} -a -m "V4.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER}"
sudo git push origin master && git push origin master --tags
echo "${bold}${green}-------------------------------"
echo "${bold}${green}Deploying V4.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER}"
echo "${bold}${green}-------------------------------"
printf "\n\n"
}
deployPackage
# ----------------------
# Exit With Error Number
# ----------------------
exit ${?}
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------

268
dev-tools/distribution-tests.sh Executable file
View file

@ -0,0 +1,268 @@
#!/bin/bash
# Travis CI Generating and Building for the Nginx Ultimate Bad Bot Blocker (using non standard folder locations)
# Created by: Mitchell Krog (mitchellkrog@gmail.com)
# Copyright: Mitchell Krog - https://github.com/mitchellkrogza
# Repo Url: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
##############################################################################
# _ __ _ #
# / |/ /__ _(_)__ __ __ #
# / / _ `/ / _ \\ \ / #
# /_/|_/\_, /_/_//_/_\_\ #
# __/___/ __ ___ __ ___ __ __ #
# / _ )___ ____/ / / _ )___ / /_ / _ )/ /__ ____/ /_____ ____ #
# / _ / _ `/ _ / / _ / _ \/ __/ / _ / / _ \/ __/ '_/ -_) __/ #
# /____/\_,_/\_,_/ /____/\___/\__/ /____/_/\___/\__/_/\_\\__/_/ #
# #
##############################################################################
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------
# ------------------------
# Set Terminal Font Colors
# ------------------------
bold=$(tput bold)
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
blue=$(tput setaf 4)
magenta=$(tput setaf 5)
cyan=$(tput setaf 6)
white=$(tput setaf 7)
defaultcolor=$(tput setaf default)
# --------
# Log File
# --------
installub1804=${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/ubuntu1804-install.log
setupub1804=${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/ubuntu1804-setup.log
installub1604=${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/ubuntu1604-install.log
setupub1604=${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/ubuntu1604-setup.log
installarch=${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/arch-install.log
setuparch=${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/arch-setup.log
installcentos=${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/centos-install.log
setupcentos=${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/centos-setup.log
installfedora=${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/fedora-install.log
setupfedora=${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/fedora-setup.log
installopensuse=${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/opensuse-install.log
setupopensuse=${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/opensuse-setup.log
# ---------
# FUNCTIONS
# ---------
reloadNginX () {
printf "\n"
echo "${bold}${green}---------------"
echo "${bold}${green}Reloading Nginx"
echo "${bold}${green}---------------"
sudo nginx -t && sudo nginx -s reload
}
waitforReload () {
echo "${bold}${yellow}-----------------------------------------------------------------------"
echo "${bold}${yellow}Sleeping for 10 seconds to allow Nginx to Properly Reload inside Travis"
echo "${bold}${yellow}-----------------------------------------------------------------------"
printf "\n"
sleep 10s
}
installngxblocker_ubuntu_1804 () {
echo "${bold}${magenta}------------------------------------------------------------------"
echo "${bold}${magenta}Execute install-ngxblocker - Ubuntu 18.04.2 LTS (Missing includes)"
echo "${bold}${magenta}------------------------------------------------------------------"
printf "\n"
cd /usr/sbin
# Reset Test
sudo rsync -avzh ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/unmodified/ubuntu-18.04/ ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/ubuntu-18.04/
sudo bash ./install-ngxblocker -x -c ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/ubuntu-18.04/etc/nginx/conf.d -b ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/ubuntu-18.04/etc/nginx/bots.d
}
setupngxblocker_ubuntu_1804 () {
printf "\n"
echo "${bold}${magenta}----------------------------------------------------------------"
echo "${bold}${magenta}Execute setup-ngxblocker - Ubuntu 18.04.2 LTS (Missing includes)"
echo "${bold}${magenta}----------------------------------------------------------------"
printf "\n"
cd /usr/sbin
sudo bash ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/setup-ngxblocker -x -c ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/ubuntu-18.04/etc/nginx/conf.d -b ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/ubuntu-18.04/etc/nginx/bots.d -m ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/ubuntu-18.04/etc/nginx/nginx.conf
}
installngxblocker_ubuntu_1604 () {
echo "${bold}${magenta}------------------------------------------------------------------"
echo "${bold}${magenta}Execute install-ngxblocker - Ubuntu 16.04.6 LTS (Missing includes)"
echo "${bold}${magenta}------------------------------------------------------------------"
printf "\n"
cd /usr/sbin
# Reset Test
sudo rsync -avzh ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/unmodified/ubuntu-16.04/ ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/ubuntu-16.04/
sudo bash ./install-ngxblocker -x -c ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/ubuntu-16.04/etc/nginx/conf.d -b ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/ubuntu-16.04/etc/nginx/bots.d
}
setupngxblocker_ubuntu_1604 () {
printf "\n"
echo "${bold}${magenta}----------------------------------------------------------------"
echo "${bold}${magenta}Execute setup-ngxblocker - Ubuntu 16.04.6 LTS (Missing includes)"
echo "${bold}${magenta}----------------------------------------------------------------"
printf "\n"
cd /usr/sbin
sudo bash ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/setup-ngxblocker -x -c ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/ubuntu-16.04/etc/nginx/conf.d -b ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/ubuntu-16.04/etc/nginx/bots.d -m ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/ubuntu-16.04/etc/nginx/nginx.conf
}
installngxblocker_arch () {
echo "${bold}${magenta}----------------------------------------------------------"
echo "${bold}${magenta}Execute install-ngxblocker - Arch Linux (Missing includes)"
echo "${bold}${magenta}----------------------------------------------------------"
printf "\n"
cd /usr/sbin
# Reset Test
sudo rsync -avzh ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/unmodified/arch/ ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/arch/
sudo bash ./install-ngxblocker -x -c ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/arch/etc/nginx/conf.d -b ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/arch/etc/nginx/bots.d
}
setupngxblocker_arch () {
printf "\n"
echo "${bold}${magenta}--------------------------------------------------------"
echo "${bold}${magenta}Execute setup-ngxblocker - Arch Linux (Missing includes)"
echo "${bold}${magenta}--------------------------------------------------------"
printf "\n"
cd /usr/sbin
#sudo bash ./setup-ngxblocker -x -c ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/arch/etc/nginx/conf.d -b ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/arch/etc/nginx/bots.d -m ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/arch/etc/nginx/nginx.conf
sudo bash ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/setup-ngxblocker -x -c ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/arch/etc/nginx/conf.d -b ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/arch/etc/nginx/bots.d -m ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/arch/etc/nginx/nginx.conf
}
installngxblocker_centos () {
echo "${bold}${magenta}--------------------------------------------------------"
echo "${bold}${magenta}Execute install-ngxblocker - CentOS 7 (Missing includes)"
echo "${bold}${magenta}--------------------------------------------------------"
printf "\n"
cd /usr/sbin
# Reset Test
sudo rsync -avzh ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/unmodified/centos7/ ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/centos7/
sudo bash ./install-ngxblocker -x -c ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/centos7/etc/nginx/conf.d -b ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/centos7/etc/nginx/bots.d
}
setupngxblocker_centos () {
printf "\n"
echo "${bold}${magenta}------------------------------------------------------"
echo "${bold}${magenta}Execute setup-ngxblocker - CentOS 7 (Missing includes)"
echo "${bold}${magenta}------------------------------------------------------"
printf "\n"
cd /usr/sbin
sudo bash ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/setup-ngxblocker -x -c ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/centos7/etc/nginx/conf.d -b ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/centos7/etc/nginx/bots.d -m ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/centos7/etc/nginx/nginx.conf
}
installngxblocker_fedora () {
echo "${bold}${magenta}------------------------------------------------------"
echo "${bold}${magenta}Execute install-ngxblocker - Fedora (Missing includes)"
echo "${bold}${magenta}------------------------------------------------------"
printf "\n"
cd /usr/sbin
# Reset Test
sudo rsync -avzh ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/unmodified/fedora/ ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/fedora/
sudo bash ./install-ngxblocker -x -c ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/fedora/etc/nginx/conf.d -b ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/fedora/etc/nginx/bots.d
}
setupngxblocker_fedora () {
printf "\n"
echo "${bold}${magenta}----------------------------------------------------"
echo "${bold}${magenta}Execute setup-ngxblocker - Fedora (Missing includes)"
echo "${bold}${magenta}----------------------------------------------------"
printf "\n"
cd /usr/sbin
sudo bash ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/setup-ngxblocker -x -c ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/fedora/etc/nginx/conf.d -b ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/fedora/etc/nginx/bots.d -m ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/fedora/etc/nginx/nginx.conf
}
installngxblocker_opensuse () {
echo "${bold}${magenta}-------------------------------------------------------------"
echo "${bold}${magenta}Execute install-ngxblocker - OpenSuse LEAP (Missing includes)"
echo "${bold}${magenta}-------------------------------------------------------------"
printf "\n"
cd /usr/sbin
# Reset Test
sudo rsync -avzh ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/unmodified/opensuse-leap/ ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/opensuse-leap/
sudo bash ./install-ngxblocker -x -c ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/opensuse-leap/etc/nginx/conf.d -b ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/opensuse-leap/etc/nginx/bots.d
}
setupngxblocker_opensuse () {
printf "\n"
echo "${bold}${magenta}-----------------------------------------------------------"
echo "${bold}${magenta}Execute setup-ngxblocker - OpenSuse LEAP (Missing includes)"
echo "${bold}${magenta}-----------------------------------------------------------"
printf "\n"
cd /usr/sbin
sudo bash ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/setup-ngxblocker -x -c ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/opensuse-lea[/etc/nginx/conf.d -b ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/opensuse-leap/etc/nginx/bots.d -m ${TRAVIS_BUILD_DIR}/.dev-tools/distribution_tests_missing_includes/opensuse-leap/etc/nginx/nginx.conf
}
# -----------------
# Trigger Functions
# -----------------
installngxblocker_ubuntu_1804 > ${installub1804}
setupngxblocker_ubuntu_1804 > ${setupub1804}
installngxblocker_ubuntu_1604 > ${installub1604}
setupngxblocker_ubuntu_1604 > ${setupub1604}
installngxblocker_arch > ${installarch}
setupngxblocker_arch > ${setuparch}
installngxblocker_centos > ${installcentos}
setupngxblocker_centos > ${setupcentos}
installngxblocker_fedora > ${installfedora}
setupngxblocker_fedora > ${setupfedora}
installngxblocker_opensuse > ${installopensuse}
setupngxblocker_opensuse > ${setupopensuse}
# ----------------------
# Exit With Error Number
# ----------------------
exit ${?}
# ------------------------------------------------------------------------------
# MIT License
# ------------------------------------------------------------------------------
# Copyright (c) 2017 Mitchell Krog - mitchellkrog@gmail.com
# https://github.com/mitchellkrogza
# ------------------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# ------------------------------------------------------------------------------
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# ------------------------------------------------------------------------------
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------

View file

@ -0,0 +1,26 @@
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;

View file

@ -0,0 +1,25 @@
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;

View file

@ -0,0 +1,109 @@
# This map is not a full koi8-r <> utf8 map: it does not contain
# box-drawing and some other characters. Besides this map contains
# several koi8-u and Byelorussian letters which are not in koi8-r.
# If you need a full and standard map, use contrib/unicode2nginx/koi-utf
# map instead.
charset_map koi8-r utf-8 {
80 E282AC ; # euro
95 E280A2 ; # bullet
9A C2A0 ; # &nbsp;
9E C2B7 ; # &middot;
A3 D191 ; # small yo
A4 D194 ; # small Ukrainian ye
A6 D196 ; # small Ukrainian i
A7 D197 ; # small Ukrainian yi
AD D291 ; # small Ukrainian soft g
AE D19E ; # small Byelorussian short u
B0 C2B0 ; # &deg;
B3 D081 ; # capital YO
B4 D084 ; # capital Ukrainian YE
B6 D086 ; # capital Ukrainian I
B7 D087 ; # capital Ukrainian YI
B9 E28496 ; # numero sign
BD D290 ; # capital Ukrainian soft G
BE D18E ; # capital Byelorussian short U
BF C2A9 ; # (C)
C0 D18E ; # small yu
C1 D0B0 ; # small a
C2 D0B1 ; # small b
C3 D186 ; # small ts
C4 D0B4 ; # small d
C5 D0B5 ; # small ye
C6 D184 ; # small f
C7 D0B3 ; # small g
C8 D185 ; # small kh
C9 D0B8 ; # small i
CA D0B9 ; # small j
CB D0BA ; # small k
CC D0BB ; # small l
CD D0BC ; # small m
CE D0BD ; # small n
CF D0BE ; # small o
D0 D0BF ; # small p
D1 D18F ; # small ya
D2 D180 ; # small r
D3 D181 ; # small s
D4 D182 ; # small t
D5 D183 ; # small u
D6 D0B6 ; # small zh
D7 D0B2 ; # small v
D8 D18C ; # small soft sign
D9 D18B ; # small y
DA D0B7 ; # small z
DB D188 ; # small sh
DC D18D ; # small e
DD D189 ; # small shch
DE D187 ; # small ch
DF D18A ; # small hard sign
E0 D0AE ; # capital YU
E1 D090 ; # capital A
E2 D091 ; # capital B
E3 D0A6 ; # capital TS
E4 D094 ; # capital D
E5 D095 ; # capital YE
E6 D0A4 ; # capital F
E7 D093 ; # capital G
E8 D0A5 ; # capital KH
E9 D098 ; # capital I
EA D099 ; # capital J
EB D09A ; # capital K
EC D09B ; # capital L
ED D09C ; # capital M
EE D09D ; # capital N
EF D09E ; # capital O
F0 D09F ; # capital P
F1 D0AF ; # capital YA
F2 D0A0 ; # capital R
F3 D0A1 ; # capital S
F4 D0A2 ; # capital T
F5 D0A3 ; # capital U
F6 D096 ; # capital ZH
F7 D092 ; # capital V
F8 D0AC ; # capital soft sign
F9 D0AB ; # capital Y
FA D097 ; # capital Z
FB D0A8 ; # capital SH
FC D0AD ; # capital E
FD D0A9 ; # capital SHCH
FE D0A7 ; # capital CH
FF D0AA ; # capital hard sign
}

View file

@ -0,0 +1,103 @@
charset_map koi8-r windows-1251 {
80 88 ; # euro
95 95 ; # bullet
9A A0 ; # &nbsp;
9E B7 ; # &middot;
A3 B8 ; # small yo
A4 BA ; # small Ukrainian ye
A6 B3 ; # small Ukrainian i
A7 BF ; # small Ukrainian yi
AD B4 ; # small Ukrainian soft g
AE A2 ; # small Byelorussian short u
B0 B0 ; # &deg;
B3 A8 ; # capital YO
B4 AA ; # capital Ukrainian YE
B6 B2 ; # capital Ukrainian I
B7 AF ; # capital Ukrainian YI
B9 B9 ; # numero sign
BD A5 ; # capital Ukrainian soft G
BE A1 ; # capital Byelorussian short U
BF A9 ; # (C)
C0 FE ; # small yu
C1 E0 ; # small a
C2 E1 ; # small b
C3 F6 ; # small ts
C4 E4 ; # small d
C5 E5 ; # small ye
C6 F4 ; # small f
C7 E3 ; # small g
C8 F5 ; # small kh
C9 E8 ; # small i
CA E9 ; # small j
CB EA ; # small k
CC EB ; # small l
CD EC ; # small m
CE ED ; # small n
CF EE ; # small o
D0 EF ; # small p
D1 FF ; # small ya
D2 F0 ; # small r
D3 F1 ; # small s
D4 F2 ; # small t
D5 F3 ; # small u
D6 E6 ; # small zh
D7 E2 ; # small v
D8 FC ; # small soft sign
D9 FB ; # small y
DA E7 ; # small z
DB F8 ; # small sh
DC FD ; # small e
DD F9 ; # small shch
DE F7 ; # small ch
DF FA ; # small hard sign
E0 DE ; # capital YU
E1 C0 ; # capital A
E2 C1 ; # capital B
E3 D6 ; # capital TS
E4 C4 ; # capital D
E5 C5 ; # capital YE
E6 D4 ; # capital F
E7 C3 ; # capital G
E8 D5 ; # capital KH
E9 C8 ; # capital I
EA C9 ; # capital J
EB CA ; # capital K
EC CB ; # capital L
ED CC ; # capital M
EE CD ; # capital N
EF CE ; # capital O
F0 CF ; # capital P
F1 DF ; # capital YA
F2 D0 ; # capital R
F3 D1 ; # capital S
F4 D2 ; # capital T
F5 D3 ; # capital U
F6 C6 ; # capital ZH
F7 C2 ; # capital V
F8 DC ; # capital soft sign
F9 DB ; # capital Y
FA C7 ; # capital Z
FB D8 ; # capital SH
FC DD ; # capital E
FD D9 ; # capital SHCH
FE D7 ; # capital CH
FF DA ; # capital hard sign
}

View file

@ -0,0 +1,912 @@
types {
application/A2L a2l;
application/AML aml;
application/andrew-inset ez;
application/ATF atf;
application/ATFX atfx;
application/ATXML atxml;
application/atom+xml atom;
application/atomcat+xml atomcat;
application/atomdeleted+xml atomdeleted;
application/atomsvc+xml atomsvc;
application/auth-policy+xml apxml;
application/bacnet-xdd+zip xdd;
application/calendar+xml xcs;
application/cbor cbor;
application/cccex c3ex;
application/ccmp+xml ccmp;
application/ccxml+xml ccxml;
application/CDFX+XML cdfx;
application/cdmi-capability cdmia;
application/cdmi-container cdmic;
application/cdmi-domain cdmid;
application/cdmi-object cdmio;
application/cdmi-queue cdmiq;
application/CEA cea;
application/cellml+xml cellml cml;
application/clue_info+xml clue;
application/cms cmsc;
application/cpl+xml cpl;
application/csrattrs csrattrs;
application/dash+xml mpd;
application/dashdelta mpdd;
application/davmount+xml davmount;
application/DCD dcd;
application/dicom dcm;
application/DII dii;
application/DIT dit;
application/dskpp+xml xmls;
application/dssc+der dssc;
application/dssc+xml xdssc;
application/dvcs dvc;
application/ecmascript es;
application/efi efi;
application/emma+xml emma;
application/emotionml+xml emotionml;
application/epub+zip epub;
application/exi exi;
application/fastinfoset finf;
application/fdt+xml fdt;
application/font-tdpfr pfr;
application/geo+json geojson;
application/gml+xml gml;
application/gzip gz tgz;
application/hyperstudio stk;
application/inkml+xml ink inkml;
application/ipfix ipfix;
application/its+xml its;
application/javascript js;
application/jrd+json jrd;
application/json json;
application/json-patch+json json-patch;
application/ld+json jsonld;
application/lgr+xml lgr;
application/link-format wlnk;
application/lost+xml lostxml;
application/lostsync+xml lostsyncxml;
application/LXF lxf;
application/mac-binhex40 hqx;
application/mads+xml mads;
application/marc mrc;
application/marcxml+xml mrcx;
application/mathematica nb ma mb;
application/mathml+xml mml;
application/mbox mbox;
application/metalink4+xml meta4;
application/mets+xml mets;
application/MF4 mf4;
application/mmt-usd+xml musd;
application/mods+xml mods;
application/mp21 m21 mp21;
application/msword doc;
application/mxf mxf;
application/n-quads nq;
application/n-triples nt;
application/ocsp-request orq;
application/ocsp-response ors;
application/octet-stream bin lha lzh exe class so dll img iso;
application/oda oda;
application/ODX odx;
application/oebps-package+xml opf;
application/ogg ogx;
application/oxps oxps;
application/p2p-overlay+xml relo;
application/pdf pdf;
application/PDX pdx;
application/pgp-encrypted pgp;
application/pgp-signature sig;
application/pkcs10 p10;
application/pkcs12 p12 pfx;
application/pkcs7-mime p7m p7c;
application/pkcs7-signature p7s;
application/pkcs8 p8;
application/pkix-cert cer;
application/pkix-crl crl;
application/pkix-pkipath pkipath;
application/pkixcmp pki;
application/pls+xml pls;
application/postscript ps eps ai;
application/provenance+xml provx;
application/prs.cww cw cww;
application/prs.hpub+zip hpub;
application/prs.nprend rnd rct;
application/prs.rdf-xml-crypt rdf-crypt;
application/prs.xsf+xml xsf;
application/pskc+xml pskcxml;
application/rdf+xml rdf;
application/route-apd+xml rapd;
application/route-s-tsid+xml sls;
application/route-usd+xml rusd;
application/reginfo+xml rif;
application/relax-ng-compact-syntax rnc;
application/resource-lists-diff+xml rld;
application/resource-lists+xml rl;
application/rfc+xml rfcxml;
application/rls-services+xml rs;
application/rpki-ghostbusters gbr;
application/rpki-manifest mft;
application/rpki-roa roa;
application/rtf rtf;
application/scim+json scim;
application/scvp-cv-request scq;
application/scvp-cv-response scs;
application/scvp-vp-request spq;
application/scvp-vp-response spp;
application/sdp sdp;
application/sgml-open-catalog soc;
application/shf+xml shf;
application/sieve siv sieve;
application/simple-filter+xml cl;
application/smil+xml smil smi sml;
application/sparql-query rq;
application/sparql-results+xml srx;
application/sql sql;
application/srgs gram;
application/srgs+xml grxml;
application/sru+xml sru;
application/ssml+xml ssml;
application/tamp-apex-update tau;
application/tamp-apex-update-confirm auc;
application/tamp-community-update tcu;
application/tamp-community-update-confirm cuc;
application/tamp-error ter;
application/tamp-sequence-adjust tsa;
application/tamp-sequence-adjust-confirm sac;
application/tamp-update tur;
application/tamp-update-confirm tuc;
application/tei+xml tei teiCorpus odd;
application/thraud+xml tfi;
application/timestamp-query tsq;
application/timestamp-reply tsr;
application/timestamped-data tsd;
application/trig trig;
application/ttml+xml ttml;
application/urc-grpsheet+xml gsheet;
application/urc-ressheet+xml rsheet;
application/urc-targetdesc+xml td;
application/urc-uisocketdesc+xml uis;
application/vnd.1000minds.decision-model+xml 1km;
application/vnd.3gpp.pic-bw-large plb;
application/vnd.3gpp.pic-bw-small psb;
application/vnd.3gpp.pic-bw-var pvb;
application/vnd.3gpp2.sms sms;
application/vnd.3gpp2.tcap tcap;
application/vnd.3lightssoftware.imagescal imgcal;
application/vnd.3M.Post-it-Notes pwn;
application/vnd.accpac.simply.aso aso;
application/vnd.accpac.simply.imp imp;
application/vnd.acucobol acu;
application/vnd.acucorp atc acutc;
application/vnd.adobe.flash.movie swf;
application/vnd.adobe.formscentral.fcdt fcdt;
application/vnd.adobe.fxp fxp fxpl;
application/vnd.adobe.xdp+xml xdp;
application/vnd.adobe.xfdf xfdf;
application/vnd.ahead.space ahead;
application/vnd.airzip.filesecure.azf azf;
application/vnd.airzip.filesecure.azs azs;
application/vnd.amazon.mobi8-ebook azw3;
application/vnd.americandynamics.acc acc;
application/vnd.amiga.ami ami;
application/vnd.anki apkg;
application/vnd.anser-web-certificate-issue-initiation cii;
application/vnd.anser-web-funds-transfer-initiation fti;
application/vnd.apple.installer+xml dist distz pkg mpkg;
application/vnd.apple.mpegurl m3u8;
application/vnd.aristanetworks.swi swi;
application/vnd.astraea-software.iota iota;
application/vnd.audiograph aep;
application/vnd.autopackage package;
application/vnd.balsamiq.bmml+xml bmml;
application/vnd.balsamiq.bmpr bmpr;
application/vnd.blueice.multipass mpm;
application/vnd.bluetooth.ep.oob ep;
application/vnd.bluetooth.le.oob le;
application/vnd.bmi bmi;
application/vnd.businessobjects rep;
application/vnd.cendio.thinlinc.clientconf tlclient;
application/vnd.chemdraw+xml cdxml;
application/vnd.chess-pgn pgn;
application/vnd.chipnuts.karaoke-mmd mmd;
application/vnd.cinderella cdy;
application/vnd.citationstyles.style+xml csl;
application/vnd.claymore cla;
application/vnd.cloanto.rp9 rp9;
application/vnd.clonk.c4group c4g c4d c4f c4p c4u;
application/vnd.cluetrust.cartomobile-config c11amc;
application/vnd.cluetrust.cartomobile-config-pkg c11amz;
application/vnd.coffeescript coffee;
application/vnd.comicbook+zip cbz;
application/vnd.commerce-battelle ica icf icd ic0 ic1 ic2 ic3 ic4 ic5 ic6 ic7 ic8;
application/vnd.commonspace csp cst;
application/vnd.contact.cmsg cdbcmsg;
application/vnd.coreos.ignition+json ign ignition;
application/vnd.cosmocaller cmc;
application/vnd.crick.clicker clkx;
application/vnd.crick.clicker.keyboard clkk;
application/vnd.crick.clicker.palette clkp;
application/vnd.crick.clicker.template clkt;
application/vnd.crick.clicker.wordbank clkw;
application/vnd.criticaltools.wbs+xml wbs;
application/vnd.ctc-posml pml;
application/vnd.cups-ppd ppd;
application/vnd.curl curl;
application/vnd.dart dart;
application/vnd.data-vision.rdz rdz;
application/vnd.debian.binary-package deb udeb;
application/vnd.dece.data uvf uvvf uvd uvvd;
application/vnd.dece.ttml+xml uvt uvvt;
application/vnd.dece.unspecified uvx uvvx;
application/vnd.dece.zip uvz uvvz;
application/vnd.denovo.fcselayout-link fe_launch;
application/vnd.desmume.movie dsm;
application/vnd.dna dna;
application/vnd.document+json docjson;
application/vnd.doremir.scorecloud-binary-document scld;
application/vnd.dpgraph dpg mwc dpgraph;
application/vnd.dreamfactory dfac;
application/vnd.dtg.local.flash fla;
application/vnd.dvb.ait ait;
application/vnd.dvb.service svc;
application/vnd.dynageo geo;
application/vnd.dzr dzr;
application/vnd.ecowin.chart mag;
application/vnd.enliven nml;
application/vnd.epson.esf esf;
application/vnd.epson.msf msf;
application/vnd.epson.quickanime qam;
application/vnd.epson.salt slt;
application/vnd.epson.ssf ssf;
application/vnd.ericsson.quickcall qcall qca;
application/vnd.espass-espass+zip espass;
application/vnd.eszigno3+xml es3 et3;
application/vnd.etsi.asic-e+zip asice sce;
application/vnd.etsi.asic-s+zip asics;
application/vnd.etsi.timestamp-token tst;
application/vnd.evolv.ecig.profile ecigprofile;
application/vnd.evolv.ecig.settings ecig;
application/vnd.evolv.ecig.theme ecigtheme;
application/vnd.ezpix-album ez2;
application/vnd.ezpix-package ez3;
application/vnd.fastcopy-disk-image dim;
application/vnd.fdf fdf;
application/vnd.fdsn.mseed msd mseed;
application/vnd.fdsn.seed seed dataless;
application/vnd.filmit.zfc zfc;
application/vnd.FloGraphIt gph;
application/vnd.fluxtime.clip ftc;
application/vnd.font-fontforge-sfd sfd;
application/vnd.framemaker fm;
application/vnd.frogans.fnc fnc;
application/vnd.frogans.ltf ltf;
application/vnd.fsc.weblaunch fsc;
application/vnd.fujitsu.oasys oas;
application/vnd.fujitsu.oasys2 oa2;
application/vnd.fujitsu.oasys3 oa3;
application/vnd.fujitsu.oasysgp fg5;
application/vnd.fujitsu.oasysprs bh2;
application/vnd.fujixerox.ddd ddd;
application/vnd.fujixerox.docuworks xdw;
application/vnd.fujixerox.docuworks.binder xbd;
application/vnd.fujixerox.docuworks.container xct;
application/vnd.fuzzysheet fzs;
application/vnd.genomatix.tuxedo txd;
application/vnd.geocube+xml g3 g³;
application/vnd.geogebra.file ggb;
application/vnd.geogebra.tool ggt;
application/vnd.geometry-explorer gex gre;
application/vnd.geonext gxt;
application/vnd.geoplan g2w;
application/vnd.geospace g3w;
application/vnd.gmx gmx;
application/vnd.google-earth.kml+xml kml;
application/vnd.google-earth.kmz kmz;
application/vnd.grafeq gqf gqs;
application/vnd.groove-account gac;
application/vnd.groove-help ghf;
application/vnd.groove-identity-message gim;
application/vnd.groove-injector grv;
application/vnd.groove-tool-message gtm;
application/vnd.groove-tool-template tpl;
application/vnd.groove-vcard vcg;
application/vnd.hal+xml hal;
application/vnd.HandHeld-Entertainment+xml zmm;
application/vnd.hbci hbci hbc kom upa pkd bpd;
application/vnd.hdt hdt;
application/vnd.hhe.lesson-player les;
application/vnd.hp-HPGL hpgl;
application/vnd.hp-hpid hpi hpid;
application/vnd.hp-hps hps;
application/vnd.hp-jlyt jlt;
application/vnd.hp-PCL pcl;
application/vnd.hydrostatix.sof-data sfd-hdstx;
application/vnd.hzn-3d-crossword x3d;
application/vnd.ibm.electronic-media emm;
application/vnd.ibm.MiniPay mpy;
application/vnd.ibm.modcap list3820 listafp afp pseg3820;
application/vnd.ibm.rights-management irm;
application/vnd.ibm.secure-container sc;
application/vnd.iccprofile icc icm;
application/vnd.ieee.1905 1905.1;
application/vnd.igloader igl;
application/vnd.imagemeter.folder+zip imf;
application/vnd.imagemeter.image+zip imi;
application/vnd.immervision-ivp ivp;
application/vnd.immervision-ivu ivu;
application/vnd.ims.imsccv1p1 imscc;
application/vnd.insors.igm igm;
application/vnd.intercon.formnet xpw xpx;
application/vnd.intergeo i2g;
application/vnd.intu.qbo qbo;
application/vnd.intu.qfx qfx;
application/vnd.ipunplugged.rcprofile rcprofile;
application/vnd.irepository.package+xml irp;
application/vnd.is-xpr xpr;
application/vnd.isac.fcs fcs;
application/vnd.jam jam;
application/vnd.jcp.javame.midlet-rms rms;
application/vnd.jisp jisp;
application/vnd.joost.joda-archive joda;
application/vnd.kahootz ktz ktr;
application/vnd.kde.karbon karbon;
application/vnd.kde.kchart chrt;
application/vnd.kde.kformula kfo;
application/vnd.kde.kivio flw;
application/vnd.kde.kontour kon;
application/vnd.kde.kpresenter kpr kpt;
application/vnd.kde.kspread ksp;
application/vnd.kde.kword kwd kwt;
application/vnd.kenameaapp htke;
application/vnd.kidspiration kia;
application/vnd.Kinar kne knp sdf;
application/vnd.koan skp skd skm skt;
application/vnd.kodak-descriptor sse;
application/vnd.las.las+json lasjson;
application/vnd.las.las+xml lasxml;
application/vnd.llamagraphics.life-balance.desktop lbd;
application/vnd.llamagraphics.life-balance.exchange+xml lbe;
application/vnd.lotus-1-2-3 123 wk4 wk3 wk1;
application/vnd.lotus-approach apr vew;
application/vnd.lotus-freelance prz pre;
application/vnd.lotus-notes nsf ntf ndl ns4 ns3 ns2 nsh nsg;
application/vnd.lotus-organizer or3 or2 org;
application/vnd.lotus-screencam scm;
application/vnd.lotus-wordpro lwp sam;
application/vnd.macports.portpkg portpkg;
application/vnd.mapbox-vector-tile mvt;
application/vnd.marlin.drm.mdcf mdc;
application/vnd.maxmind.maxmind-db mmdb;
application/vnd.mcd mcd;
application/vnd.medcalcdata mc1;
application/vnd.mediastation.cdkey cdkey;
application/vnd.MFER mwf;
application/vnd.mfmp mfm;
application/vnd.micrografx.flo flo;
application/vnd.micrografx.igx igx;
application/vnd.mif mif;
application/vnd.Mobius.DAF daf;
application/vnd.Mobius.DIS dis;
application/vnd.Mobius.MBK mbk;
application/vnd.Mobius.MQY mqy;
application/vnd.Mobius.MSL msl;
application/vnd.Mobius.PLC plc;
application/vnd.Mobius.TXF txf;
application/vnd.mophun.application mpn;
application/vnd.mophun.certificate mpc;
application/vnd.mozilla.xul+xml xul;
application/vnd.ms-3mfdocument 3mf;
application/vnd.ms-artgalry cil;
application/vnd.ms-asf asf;
application/vnd.ms-cab-compressed cab;
application/vnd.ms-excel xls xlm xla xlc xlt xlw;
application/vnd.ms-excel.template.macroEnabled.12 xltm;
application/vnd.ms-excel.addin.macroEnabled.12 xlam;
application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb;
application/vnd.ms-excel.sheet.macroEnabled.12 xlsm;
application/vnd.ms-fontobject eot;
application/vnd.ms-htmlhelp chm;
application/vnd.ms-ims ims;
application/vnd.ms-lrm lrm;
application/vnd.ms-officetheme thmx;
application/vnd.ms-powerpoint ppt pps pot;
application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam;
application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm;
application/vnd.ms-powerpoint.slide.macroEnabled.12 sldm;
application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm;
application/vnd.ms-powerpoint.template.macroEnabled.12 potm;
application/vnd.ms-project mpp mpt;
application/vnd.ms-tnef tnef tnf;
application/vnd.ms-word.document.macroEnabled.12 docm;
application/vnd.ms-word.template.macroEnabled.12 dotm;
application/vnd.ms-works wcm wdb wks wps;
application/vnd.ms-wpl wpl;
application/vnd.ms-xpsdocument xps;
application/vnd.msa-disk-image msa;
application/vnd.mseq mseq;
application/vnd.multiad.creator crtr;
application/vnd.multiad.creator.cif cif;
application/vnd.musician mus;
application/vnd.muvee.style msty;
application/vnd.mynfc taglet;
application/vnd.nervana entity request bkm kcm;
application/vnd.nitf nitf;
application/vnd.neurolanguage.nlu nlu;
application/vnd.nintendo.nitro.rom nds;
application/vnd.nintendo.snes.rom sfc smc;
application/vnd.noblenet-directory nnd;
application/vnd.noblenet-sealer nns;
application/vnd.noblenet-web nnw;
application/vnd.nokia.n-gage.ac+xml ac;
application/vnd.nokia.n-gage.data ngdat;
application/vnd.nokia.n-gage.symbian.install n-gage;
application/vnd.nokia.radio-preset rpst;
application/vnd.nokia.radio-presets rpss;
application/vnd.novadigm.EDM edm;
application/vnd.novadigm.EDX edx;
application/vnd.novadigm.EXT ext;
application/vnd.oasis.opendocument.chart odc;
application/vnd.oasis.opendocument.chart-template otc;
application/vnd.oasis.opendocument.database odb;
application/vnd.oasis.opendocument.formula odf;
application/vnd.oasis.opendocument.graphics odg;
application/vnd.oasis.opendocument.graphics-template otg;
application/vnd.oasis.opendocument.image odi;
application/vnd.oasis.opendocument.image-template oti;
application/vnd.oasis.opendocument.presentation odp;
application/vnd.oasis.opendocument.presentation-template otp;
application/vnd.oasis.opendocument.spreadsheet ods;
application/vnd.oasis.opendocument.spreadsheet-template ots;
application/vnd.oasis.opendocument.text odt;
application/vnd.oasis.opendocument.text-master odm;
application/vnd.oasis.opendocument.text-template ott;
application/vnd.oasis.opendocument.text-web oth;
application/vnd.olpc-sugar xo;
application/vnd.oma.dd2+xml dd2;
application/vnd.onepager tam;
application/vnd.onepagertamp tamp;
application/vnd.onepagertamx tamx;
application/vnd.onepagertat tat;
application/vnd.onepagertatp tatp;
application/vnd.onepagertatx tatx;
application/vnd.openblox.game+xml obgx;
application/vnd.openblox.game-binary obg;
application/vnd.openeye.oeb oeb;
application/vnd.openofficeorg.extension oxt;
application/vnd.openstreetmap.data+xml osm;
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;
application/vnd.openxmlformats-officedocument.presentationml.slide sldx;
application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx;
application/vnd.openxmlformats-officedocument.presentationml.template potx;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx;
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx;
application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx;
application/vnd.osa.netdeploy ndc;
application/vnd.osgeo.mapguide.package mgp;
application/vnd.osgi.dp dp;
application/vnd.osgi.subsystem esa;
application/vnd.oxli.countgraph oxlicg;
application/vnd.palm prc pdb pqa oprc;
application/vnd.panoply plp;
application/vnd.pawaafile paw;
application/vnd.pg.format str;
application/vnd.pg.osasli ei6;
application/vnd.piaccess.application-license pil;
application/vnd.picsel efif;
application/vnd.pmi.widget wg;
application/vnd.pocketlearn plf;
application/vnd.powerbuilder6 pbd;
application/vnd.preminet preminet;
application/vnd.previewsystems.box box vbox;
application/vnd.proteus.magazine mgz;
application/vnd.publishare-delta-tree qps;
application/vnd.pvi.ptid1 ptid;
application/vnd.qualcomm.brew-app-res bar;
application/vnd.Quark.QuarkXPress qxd qxt qwd qwt qxl qxb;
application/vnd.quobject-quoxdocument quox quiz;
application/vnd.rainstor.data tree;
application/vnd.rar rar;
application/vnd.realvnc.bed bed;
application/vnd.recordare.musicxml mxl;
application/vnd.rig.cryptonote cryptonote;
application/vnd.route66.link66+xml link66;
application/vnd.sailingtracker.track st;
application/vnd.scribus scd sla slaz;
application/vnd.sealed.3df s3df;
application/vnd.sealed.csf scsf;
application/vnd.sealed.doc sdoc sdo s1w;
application/vnd.sealed.eml seml sem;
application/vnd.sealed.mht smht smh;
application/vnd.sealed.ppt sppt s1p;
application/vnd.sealed.tiff stif;
application/vnd.sealed.xls sxls sxl s1e;
application/vnd.sealedmedia.softseal.html stml s1h;
application/vnd.sealedmedia.softseal.pdf spdf spd s1a;
application/vnd.seemail see;
application/vnd.sema sema;
application/vnd.semd semd;
application/vnd.semf semf;
application/vnd.shana.informed.formdata ifm;
application/vnd.shana.informed.formtemplate itp;
application/vnd.shana.informed.interchange iif;
application/vnd.shana.informed.package ipk;
application/vnd.sigrok.session sr;
application/vnd.SimTech-MindMapper twd twds;
application/vnd.smaf mmf;
application/vnd.smart.notebook notebook;
application/vnd.smart.teacher teacher;
application/vnd.software602.filler.form+xml fo;
application/vnd.software602.filler.form-xml-zip zfo;
application/vnd.solent.sdkm+xml sdkm sdkd;
application/vnd.spotfire.dxp dxp;
application/vnd.spotfire.sfs sfs;
application/vnd.stepmania.package smzip;
application/vnd.stepmania.stepchart sm;
application/vnd.sun.wadl+xml wadl;
application/vnd.sus-calendar sus susp;
application/vnd.syncml+xml xsm;
application/vnd.syncml.dm+wbxml bdm;
application/vnd.syncml.dm+xml xdm;
application/vnd.syncml.dmddf+xml ddf;
application/vnd.tao.intent-module-archive tao;
application/vnd.tcpdump.pcap pcap cap dmp;
application/vnd.theqvd qvd;
application/vnd.tml vfr viaframe;
application/vnd.tmobile-livetv tmo;
application/vnd.trid.tpt tpt;
application/vnd.triscape.mxs mxs;
application/vnd.trueapp tra;
application/vnd.ufdl ufdl ufd frm;
application/vnd.uiq.theme utz;
application/vnd.umajin umj;
application/vnd.unity unityweb;
application/vnd.uoml+xml uoml uo;
application/vnd.uri-map urim urimap;
application/vnd.valve.source.material vmt;
application/vnd.vcx vcx;
application/vnd.vd-study mxi study-inter model-inter;
application/vnd.vectorworks vwx;
application/vnd.vidsoft.vidconference vsc;
application/vnd.visio vsd vst vsw vss;
application/vnd.visionary vis;
application/vnd.vsf vsf;
application/vnd.wap.sic sic;
application/vnd.wap.slc slc;
application/vnd.wap.wbxml wbxml;
application/vnd.wap.wmlc wmlc;
application/vnd.wap.wmlscriptc wmlsc;
application/vnd.webturbo wtb;
application/vnd.wfa.p2p p2p;
application/vnd.wfa.wsc wsc;
application/vnd.wmc wmc;
application/vnd.wolfram.mathematica.package m;
application/vnd.wolfram.player nbp;
application/vnd.wordperfect wpd;
application/vnd.wqd wqd;
application/vnd.wt.stf stf;
application/vnd.wv.csp+wbxml wv;
application/vnd.xara xar;
application/vnd.xfdl xfdl xfd;
application/vnd.xmpie.cpkg cpkg;
application/vnd.xmpie.dpkg dpkg;
application/vnd.xmpie.ppkg ppkg;
application/vnd.xmpie.xlim xlim;
application/vnd.yamaha.hv-dic hvd;
application/vnd.yamaha.hv-script hvs;
application/vnd.yamaha.hv-voice hvp;
application/vnd.yamaha.openscoreformat osf;
application/vnd.yamaha.smaf-audio saf;
application/vnd.yamaha.smaf-phrase spf;
application/vnd.yaoweme yme;
application/vnd.yellowriver-custom-menu cmp;
application/vnd.zul zir zirz;
application/vnd.zzazz.deck+xml zaz;
application/voicexml+xml vxml;
application/watcherinfo+xml wif;
application/widget wgt;
application/wsdl+xml wsdl;
application/wspolicy+xml wspolicy;
application/xcap-att+xml xav;
application/xcap-caps+xml xca;
application/xcap-diff+xml xdf;
application/xcap-el+xml xel;
application/xcap-error+xml xer;
application/xcap-ns+xml xns;
application/xhtml+xml xhtml xhtm xht;
application/xml-dtd dtd;
application/xop+xml xop;
application/xslt+xml xsl xslt;
application/xv+xml mxml xhvml xvml xvm;
application/yang yang;
application/yin+xml yin;
application/zip zip;
audio/32kadpcm 726;
audio/ac3 ac3;
audio/AMR amr;
audio/AMR-WB awb;
audio/asc acn;
audio/ATRAC-ADVANCED-LOSSLESS aal;
audio/ATRAC-X atx;
audio/ATRAC3 at3 aa3 omg;
audio/basic au snd;
audio/dls dls;
audio/EVRC evc;
audio/EVRCB evb;
audio/EVRCNW enw;
audio/EVRCWB evw;
audio/iLBC lbc;
audio/L16 l16;
audio/mobile-xmf mxmf;
audio/mp4 m4a;
audio/mpeg mp3 mpga mp1 mp2;
audio/ogg oga ogg opus spx;
audio/prs.sid sid psid;
audio/qcelp qcp;
audio/SMV smv;
audio/vnd.audikoz koz;
audio/vnd.dece.audio uva uvva;
audio/vnd.digital-winds eol;
audio/vnd.dolby.mlp mlp;
audio/vnd.dts dts;
audio/vnd.dts.hd dtshd;
audio/vnd.everad.plj plj;
audio/vnd.lucent.voice lvp;
audio/vnd.ms-playready.media.pya pya;
audio/vnd.nortel.vbk vbk;
audio/vnd.nuera.ecelp4800 ecelp4800;
audio/vnd.nuera.ecelp7470 ecelp7470;
audio/vnd.nuera.ecelp9600 ecelp9600;
audio/vnd.presonus.multitrack multitrack;
audio/vnd.rip rip;
audio/vnd.sealedmedia.softseal.mpeg smp3 smp s1m;
font/collection ttc;
font/otf otf;
font/ttf ttf;
font/woff woff;
font/woff2 woff2;
image/bmp bmp dib;
image/cgm cgm;
image/dicom-rle drle;
image/emf emf;
image/fits fits fit fts;
image/gif gif;
image/ief ief;
image/jls jls;
image/jp2 jp2 jpg2;
image/jpeg jpg jpeg jpe jfif;
image/jpm jpm jpgm;
image/jpx jpx jpf;
image/ktx ktx;
image/png png;
image/prs.btif btif btf;
image/prs.pti pti;
image/svg+xml svg svgz;
image/t38 t38;
image/tiff tiff tif;
image/tiff-fx tfx;
image/vnd.adobe.photoshop psd;
image/vnd.airzip.accelerator.azv azv;
image/vnd.dece.graphic uvi uvvi uvg uvvg;
image/vnd.djvu djvu djv;
image/vnd.dwg dwg;
image/vnd.dxf dxf;
image/vnd.fastbidsheet fbs;
image/vnd.fpx fpx;
image/vnd.fst fst;
image/vnd.fujixerox.edmics-mmr mmr;
image/vnd.fujixerox.edmics-rlc rlc;
image/vnd.globalgraphics.pgb pgb;
image/vnd.microsoft.icon ico;
image/vnd.mozilla.apng apng;
image/vnd.ms-modi mdi;
image/vnd.radiance hdr rgbe xyze;
image/vnd.sealed.png spng spn s1n;
image/vnd.sealedmedia.softseal.gif sgif sgi s1g;
image/vnd.sealedmedia.softseal.jpg sjpg sjp s1j;
image/vnd.tencent.tap tap;
image/vnd.valve.source.texture vtf;
image/vnd.wap.wbmp wbmp;
image/vnd.xiff xif;
image/vnd.zbrush.pcx pcx;
image/wmf wmf;
message/global u8msg;
message/global-delivery-status u8dsn;
message/global-disposition-notification u8mdn;
message/global-headers u8hdr;
message/rfc822 eml mail art;
model/gltf+json gltf;
model/iges igs iges;
model/mesh msh mesh silo;
model/vnd.collada+xml dae;
model/vnd.dwf dwf;
model/vnd.gdl gdl gsm win dor lmp rsm msm ism;
model/vnd.gtw gtw;
model/vnd.moml+xml moml;
model/vnd.mts mts;
model/vnd.opengex ogex;
model/vnd.parasolid.transmit.binary x_b xmt_bin;
model/vnd.parasolid.transmit.text x_t xmt_txt;
model/vnd.valve.source.compiled-map bsp;
model/vnd.vtu vtu;
model/vrml wrl vrml;
model/x3d+xml x3db;
model/x3d-vrml x3dv x3dvz;
multipart/vnd.bint.med-plus bmed;
multipart/voice-message vpm;
text/cache-manifest appcache manifest;
text/calendar ics ifb;
text/css css;
text/csv csv;
text/csv-schema csvs;
text/dns soa zone;
text/html html htm;
text/jcr-cnd cnd;
text/markdown markdown md;
text/mizar miz;
text/n3 n3;
text/plain txt asc text pm el c h cc hh cxx hxx f90 conf log;
text/provenance-notation provn;
text/prs.fallenstein.rst rst;
text/prs.lines.tag tag dsc;
text/richtext rtx;
text/sgml sgml sgm;
text/tab-separated-values tsv;
text/troff t tr roff;
text/turtle ttl;
text/uri-list uris uri;
text/vcard vcf vcard;
text/vnd.a a;
text/vnd.abc abc;
text/vnd.ascii-art ascii;
text/vnd.debian.copyright copyright;
text/vnd.DMClientScript dms;
text/vnd.dvb.subtitle sub;
text/vnd.esmertec.theme-descriptor jtd;
text/vnd.fly fly;
text/vnd.fmi.flexstor flx;
text/vnd.graphviz gv dot;
text/vnd.in3d.3dml 3dml 3dm;
text/vnd.in3d.spot spot spo;
text/vnd.ms-mediapackage mpf;
text/vnd.net2phone.commcenter.command ccc;
text/vnd.si.uricatalogue uric;
text/vnd.sun.j2me.app-descriptor jad;
text/vnd.trolltech.linguist ts;
text/vnd.wap.si si;
text/vnd.wap.sl sl;
text/vnd.wap.wml wml;
text/vnd.wap.wmlscript wmls;
text/xml xml xsd rng;
text/xml-external-parsed-entity ent;
video/3gpp 3gp 3gpp;
video/3gpp2 3g2 3gpp2;
video/iso.segment m4s;
video/mj2 mj2 mjp2;
video/mp4 mp4 mpg4 m4v;
video/mpeg mpeg mpg mpe m1v m2v;
video/ogg ogv;
video/quicktime mov qt;
video/vnd.dece.hd uvh uvvh;
video/vnd.dece.mobile uvm uvvm;
video/vnd.dece.mp4 uvu uvvu;
video/vnd.dece.pd uvp uvvp;
video/vnd.dece.sd uvs uvvs;
video/vnd.dece.video uvv uvvv;
video/vnd.dvb.file dvb;
video/vnd.fvt fvt;
video/vnd.mpegurl mxu m4u;
video/vnd.ms-playready.media.pyv pyv;
video/vnd.nokia.interleaved-multimedia nim;
video/vnd.radgamettools.bink bik bk2;
video/vnd.radgamettools.smacker smk;
video/vnd.sealed.mpeg1 smpg s11;
video/vnd.sealed.mpeg4 s14;
video/vnd.sealed.swf sswf ssw;
video/vnd.sealedmedia.softseal.mov smov smo s1q;
video/vnd.vivo viv;
application/mac-compactpro cpt;
application/metalink+xml metalink;
application/owl+xml owx;
application/rss+xml rss;
application/vnd.android.package-archive apk;
application/vnd.oma.dd+xml dd;
application/vnd.oma.drm.content dcf;
application/vnd.oma.drm.dcf o4a o4v;
application/vnd.oma.drm.message dm;
application/vnd.oma.drm.rights+wbxml drc;
application/vnd.oma.drm.rights+xml dr;
application/vnd.sun.xml.calc sxc;
application/vnd.sun.xml.calc.template stc;
application/vnd.sun.xml.draw sxd;
application/vnd.sun.xml.draw.template std;
application/vnd.sun.xml.impress sxi;
application/vnd.sun.xml.impress.template sti;
application/vnd.sun.xml.math sxm;
application/vnd.sun.xml.writer sxw;
application/vnd.sun.xml.writer.global sxg;
application/vnd.sun.xml.writer.template stw;
application/vnd.symbian.install sis;
application/vnd.wap.mms-message mms;
application/x-annodex anx;
application/x-bcpio bcpio;
application/x-bittorrent torrent;
application/x-bzip2 bz2;
application/x-cdlink vcd;
application/x-chrome-extension crx;
application/x-cpio cpio;
application/x-csh csh;
application/x-director dcr dir dxr;
application/x-dvi dvi;
application/x-futuresplash spl;
application/x-gtar gtar;
application/x-hdf hdf;
application/x-java-archive jar;
application/x-java-jnlp-file jnlp;
application/x-java-pack200 pack;
application/x-killustrator kil;
application/x-latex latex;
application/x-netcdf nc cdf;
application/x-perl pl;
application/x-rpm rpm;
application/x-sh sh;
application/x-shar shar;
application/x-stuffit sit;
application/x-sv4cpio sv4cpio;
application/x-sv4crc sv4crc;
application/x-tar tar;
application/x-tcl tcl;
application/x-tex tex;
application/x-texinfo texinfo texi;
application/x-troff-man man 1 2 3 4 5 6 7 8;
application/x-troff-me me;
application/x-troff-ms ms;
application/x-ustar ustar;
application/x-wais-source src;
application/x-xpinstall xpi;
application/x-xspf+xml xspf;
application/x-xz xz;
audio/midi mid midi kar;
audio/x-aiff aif aiff aifc;
audio/x-annodex axa;
audio/x-flac flac;
audio/x-matroska mka;
audio/x-mod mod ult uni m15 mtm 669 med;
audio/x-mpegurl m3u;
audio/x-ms-wax wax;
audio/x-ms-wma wma;
audio/x-pn-realaudio ram rm;
audio/x-realaudio ra;
audio/x-s3m s3m;
audio/x-stm stm;
audio/x-wav wav;
chemical/x-xyz xyz;
image/webp webp;
image/x-cmu-raster ras;
image/x-portable-anymap pnm;
image/x-portable-bitmap pbm;
image/x-portable-graymap pgm;
image/x-portable-pixmap ppm;
image/x-rgb rgb;
image/x-targa tga;
image/x-xbitmap xbm;
image/x-xpixmap xpm;
image/x-xwindowdump xwd;
text/html-sandboxed sandboxed;
text/x-pod pod;
text/x-setext etx;
video/webm webm;
video/x-annodex axv;
video/x-flv flv;
video/x-javafx fxm;
video/x-matroska mkv;
video/x-matroska-3d mk3d;
video/x-ms-asf asx;
video/x-ms-wm wm;
video/x-ms-wmv wmv;
video/x-ms-wmx wmx;
video/x-ms-wvx wvx;
video/x-msvideo avi;
video/x-sgi-movie movie;
x-conference/x-cooltalk ice;
x-epoc/x-sisx-app sisx;
}

View file

@ -0,0 +1,117 @@
#user html;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}

View file

@ -0,0 +1,17 @@
scgi_param REQUEST_METHOD $request_method;
scgi_param REQUEST_URI $request_uri;
scgi_param QUERY_STRING $query_string;
scgi_param CONTENT_TYPE $content_type;
scgi_param DOCUMENT_URI $document_uri;
scgi_param DOCUMENT_ROOT $document_root;
scgi_param SCGI 1;
scgi_param SERVER_PROTOCOL $server_protocol;
scgi_param REQUEST_SCHEME $scheme;
scgi_param HTTPS $https if_not_empty;
scgi_param REMOTE_ADDR $remote_addr;
scgi_param REMOTE_PORT $remote_port;
scgi_param SERVER_PORT $server_port;
scgi_param SERVER_NAME $server_name;

View file

@ -0,0 +1,17 @@
uwsgi_param QUERY_STRING $query_string;
uwsgi_param REQUEST_METHOD $request_method;
uwsgi_param CONTENT_TYPE $content_type;
uwsgi_param CONTENT_LENGTH $content_length;
uwsgi_param REQUEST_URI $request_uri;
uwsgi_param PATH_INFO $document_uri;
uwsgi_param DOCUMENT_ROOT $document_root;
uwsgi_param SERVER_PROTOCOL $server_protocol;
uwsgi_param REQUEST_SCHEME $scheme;
uwsgi_param HTTPS $https if_not_empty;
uwsgi_param REMOTE_ADDR $remote_addr;
uwsgi_param REMOTE_PORT $remote_port;
uwsgi_param SERVER_PORT $server_port;
uwsgi_param SERVER_NAME $server_name;

View file

@ -0,0 +1,126 @@
# This map is not a full windows-1251 <> utf8 map: it does not
# contain Serbian and Macedonian letters. If you need a full map,
# use contrib/unicode2nginx/win-utf map instead.
charset_map windows-1251 utf-8 {
82 E2809A ; # single low-9 quotation mark
84 E2809E ; # double low-9 quotation mark
85 E280A6 ; # ellipsis
86 E280A0 ; # dagger
87 E280A1 ; # double dagger
88 E282AC ; # euro
89 E280B0 ; # per mille
91 E28098 ; # left single quotation mark
92 E28099 ; # right single quotation mark
93 E2809C ; # left double quotation mark
94 E2809D ; # right double quotation mark
95 E280A2 ; # bullet
96 E28093 ; # en dash
97 E28094 ; # em dash
99 E284A2 ; # trade mark sign
A0 C2A0 ; # &nbsp;
A1 D18E ; # capital Byelorussian short U
A2 D19E ; # small Byelorussian short u
A4 C2A4 ; # currency sign
A5 D290 ; # capital Ukrainian soft G
A6 C2A6 ; # borken bar
A7 C2A7 ; # section sign
A8 D081 ; # capital YO
A9 C2A9 ; # (C)
AA D084 ; # capital Ukrainian YE
AB C2AB ; # left-pointing double angle quotation mark
AC C2AC ; # not sign
AD C2AD ; # soft hypen
AE C2AE ; # (R)
AF D087 ; # capital Ukrainian YI
B0 C2B0 ; # &deg;
B1 C2B1 ; # plus-minus sign
B2 D086 ; # capital Ukrainian I
B3 D196 ; # small Ukrainian i
B4 D291 ; # small Ukrainian soft g
B5 C2B5 ; # micro sign
B6 C2B6 ; # pilcrow sign
B7 C2B7 ; # &middot;
B8 D191 ; # small yo
B9 E28496 ; # numero sign
BA D194 ; # small Ukrainian ye
BB C2BB ; # right-pointing double angle quotation mark
BF D197 ; # small Ukrainian yi
C0 D090 ; # capital A
C1 D091 ; # capital B
C2 D092 ; # capital V
C3 D093 ; # capital G
C4 D094 ; # capital D
C5 D095 ; # capital YE
C6 D096 ; # capital ZH
C7 D097 ; # capital Z
C8 D098 ; # capital I
C9 D099 ; # capital J
CA D09A ; # capital K
CB D09B ; # capital L
CC D09C ; # capital M
CD D09D ; # capital N
CE D09E ; # capital O
CF D09F ; # capital P
D0 D0A0 ; # capital R
D1 D0A1 ; # capital S
D2 D0A2 ; # capital T
D3 D0A3 ; # capital U
D4 D0A4 ; # capital F
D5 D0A5 ; # capital KH
D6 D0A6 ; # capital TS
D7 D0A7 ; # capital CH
D8 D0A8 ; # capital SH
D9 D0A9 ; # capital SHCH
DA D0AA ; # capital hard sign
DB D0AB ; # capital Y
DC D0AC ; # capital soft sign
DD D0AD ; # capital E
DE D0AE ; # capital YU
DF D0AF ; # capital YA
E0 D0B0 ; # small a
E1 D0B1 ; # small b
E2 D0B2 ; # small v
E3 D0B3 ; # small g
E4 D0B4 ; # small d
E5 D0B5 ; # small ye
E6 D0B6 ; # small zh
E7 D0B7 ; # small z
E8 D0B8 ; # small i
E9 D0B9 ; # small j
EA D0BA ; # small k
EB D0BB ; # small l
EC D0BC ; # small m
ED D0BD ; # small n
EE D0BE ; # small o
EF D0BF ; # small p
F0 D180 ; # small r
F1 D181 ; # small s
F2 D182 ; # small t
F3 D183 ; # small u
F4 D184 ; # small f
F5 D185 ; # small kh
F6 D186 ; # small ts
F7 D187 ; # small ch
F8 D188 ; # small sh
F9 D189 ; # small shch
FA D18A ; # small hard sign
FB D18B ; # small y
FC D18C ; # small soft sign
FD D18D ; # small e
FE D18E ; # small yu
FF D18F ; # small ya
}

View file

@ -0,0 +1,26 @@
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;

View file

@ -0,0 +1,26 @@
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;

View file

@ -0,0 +1,25 @@
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;

Some files were not shown because too many files have changed in this diff Show more