mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-10 15:34:24 +00:00
Introduce new List of Known Bad IP Address
This commit is contained in:
parent
2a3bc40f73
commit
4f3e457428
5 changed files with 104 additions and 10 deletions
51
.dev-tools/pull-data.sh
Normal file
51
.dev-tools/pull-data.sh
Normal file
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
# Generator Script for NGinx Ultimate Bad Bot Blocker
|
||||
# REPO: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
|
||||
# Copyright Mitchell Krog - mitchellkrog@gmail.com
|
||||
|
||||
# *******************************
|
||||
# Input and Output File Variables
|
||||
# *******************************
|
||||
|
||||
outputfile=${TRAVIS_BUILD_DIR}/_generator_lists/bad-ip-addresses.list
|
||||
|
||||
# **************
|
||||
# Temp Variables
|
||||
# **************
|
||||
|
||||
tmp=${TRAVIS_BUILD_DIR}/_generator_lists/tmp.list
|
||||
|
||||
# **********************************************
|
||||
# Fetch our feed(s) and append to our input file
|
||||
# **********************************************
|
||||
|
||||
fetch () {
|
||||
sudo wget https://raw.githubusercontent.com/mitchellkrogza/Suspicious.Snooping.Sniffing.Hacking.IP.Addresses/master/ips.list -O ${outputfile}
|
||||
}
|
||||
|
||||
# *************************************************
|
||||
# Prepare our input lists and remove any duplicates
|
||||
# *************************************************
|
||||
|
||||
initiate () {
|
||||
|
||||
# Prepare Feed 1
|
||||
sort -u ${outputfile} -o ${outputfile}
|
||||
grep '[^[:blank:]]' < ${outputfile} > ${tmp}
|
||||
sudo mv ${tmp} ${outputfile}
|
||||
sudo dos2unix ${outputfile}
|
||||
|
||||
}
|
||||
|
||||
# *****************
|
||||
# Trigger Functions
|
||||
# *****************
|
||||
|
||||
fetch
|
||||
initiate
|
||||
|
||||
# **********************
|
||||
# Exit With Error Number
|
||||
# **********************
|
||||
|
||||
exit ${?}
|
Loading…
Add table
Add a link
Reference in a new issue