From 08472ad8e318ed356e3176dcc4a64c5edfe8899e Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Tue, 11 Sep 2018 15:18:18 +0100 Subject: [PATCH] Example of server side script to generate banned IPs --- banned.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 banned.sh diff --git a/banned.sh b/banned.sh new file mode 100755 index 0000000..7d74840 --- /dev/null +++ b/banned.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# Google IPs +echo '!gas15169' | nc whois.radb.net 43 | tail -n +2 | head -n -1 >> /var/www/www.friedersdorff.com/public_html/.banned.tmp + +# Facebook IPs +echo '!gas32934' | nc whois.radb.net 43 | tail -n +2 | head -n -1 >> /var/www/www.friedersdorff.com/public_html/.banned.tmp + +# Twitter IPs +echo '!gas13414' | nc whois.radb.net 43 | tail -n +2 | head -n -1 >> /var/www/www.friedersdorff.com/public_html/.banned.tmp + +mv /var/www/www.friedersdorff.com/public_html/.banned.tmp /var/www/www.friedersdorff.com/public_html/.banned -- 2.46.2