From 3d8e2052c33ab1a77be5d674e448110e8647d6e0 Mon Sep 17 00:00:00 2001
From: Pawel Krawczyk
Date: Fri, 9 Jan 2015 12:16:57 +0000
Subject: [PATCH] add badips.com
---
blacklist.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/blacklist.sh b/blacklist.sh
index 8af3182..5f9cbf7 100755
--- a/blacklist.sh
+++ b/blacklist.sh
@@ -8,6 +8,8 @@
urls="http://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt"
# Blocklist.de collects reports from fail2ban probes, listing password brute-forces, scanners and other offenders
urls="$urls https://www.blocklist.de/downloads/export-ips_all.txt"
+# badips.com, from score 2 up
+urls="$urls http://www.badips.com/get/list/ssh/2"
blocklist_chain_name=blocklists
@@ -69,7 +71,7 @@ for url in $urls; do
new_set_file=$(mktemp)
# download the blocklist
- set_name=$(basename $url)
+ set_name=$(echo "$url" | awk -F/ '{print $3;}') # set name is derived from source URL hostname
curl -s ${COMPRESS_OPT} -k "$url" >"${unsorted_blocklist}"
sort -u <"${unsorted_blocklist}" | egrep "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" >"${sorted_blocklist}"