Introduce new List of Known Bad IP Address

This commit is contained in:
Mitchell Krog 2018-06-28 15:58:30 +02:00
parent 2a3bc40f73
commit 4f3e457428
No known key found for this signature in database
GPG key ID: EA1DD210CACCC45E
5 changed files with 104 additions and 10 deletions

51
.dev-tools/pull-data.sh Normal file
View 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 ${?}