From b8ad4079124092f1ee2da6759543f10d67191601 Mon Sep 17 00:00:00 2001 From: bolvan Date: Mon, 7 Nov 2016 23:22:29 +0300 Subject: [PATCH] get_antizapret use now http://antizapret.prostovpn.org/iplist.txt --- ipset/get_antizapret.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ipset/get_antizapret.sh b/ipset/get_antizapret.sh index f3b5f80..f92487d 100755 --- a/ipset/get_antizapret.sh +++ b/ipset/get_antizapret.sh @@ -6,19 +6,23 @@ EXEDIR=$(dirname $SCRIPT) . "$EXEDIR/def.sh" -ZURL=https://github.com/zapret-info/z-i/raw/master/dump.csv +#ZURL=https://github.com/zapret-info/z-i/raw/master/dump.csv +ZURL=http://antizapret.prostovpn.org/iplist.txt ZIPLISTTMP=/tmp/zapret-ip.txt getuser -curl --fail --max-time 300 --max-filesize 33554432 -k -L "$ZURL" | \ - sed -nre "s/([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/\1\n/gp" | \ - sed -nre "s/^[^0-9]*([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*$/\1/p" | \ - grep -vE '^192.168.[0-9]*.[0-9]*$' | grep -vE '^127.[0-9]*.[0-9]*.[0-9]*$' | grep -vE '^10.[0-9]*.[0-9]*.[0-9]*$' \ +#curl --fail --max-time 300 --max-filesize 33554432 -k -L "$ZURL" \ +# | sed -nre "s/([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/\1\n/gp" \ +# | sed -nre "s/^[^0-9]*([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*$/\1/p" \ +# | grep -vE '^192.168.[0-9]*.[0-9]*$' | grep -vE '^127.[0-9]*.[0-9]*.[0-9]*$' | grep -vE '^10.[0-9]*.[0-9]*.[0-9]*$' \ +# | sort -u \ +curl --fail --max-time 300 --max-filesize 33554432 -k -L "$ZURL" \ + | grep -vE '^192.168.[0-9]*.[0-9]*$' | grep -vE '^127.[0-9]*.[0-9]*.[0-9]*$' | grep -vE '^10.[0-9]*.[0-9]*.[0-9]*$' \ >$ZIPLISTTMP && { dlsize=$(wc -c "$ZIPLISTTMP" | cut -f 1 -d ' ') - if test $dlsize -lt 20480; then + if test $dlsize -lt 204800; then echo list file is too small. can be bad. exit 2 fi