zapret/ipset/get_user.sh

14 lines
375 B
Bash
Raw Normal View History

2016-02-15 16:34:45 +03:00
#!/bin/sh
# resolve user host list
SCRIPT=$(readlink -f $0)
EXEDIR=$(dirname $SCRIPT)
. "$EXEDIR/def.sh"
2016-03-04 12:03:34 +03:00
$EXEDIR/get_user_ipban.sh
2016-02-15 16:34:45 +03:00
[ -f $ZUSERLIST ] && {
dig A +short +time=8 +tries=2 -f $ZUSERLIST | grep -E '^[^;].*[^.]$' | 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 | uniq >$ZIPLIST_USER
}