Skip to content

Commit

Permalink
Accounted for newer nslookup output
Browse files Browse the repository at this point in the history
  • Loading branch information
shounak-de committed Mar 27, 2017
1 parent 5fb1bd8 commit 4b2d620
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iblocklist-loader.sh
Expand Up @@ -191,7 +191,7 @@ if [ -s "$WHITELIST_DOMAINS_FILE" ]; then
[ $? -eq 0 ] && entryCount=0
while read line; do
if [ -n "${line%%#*}" ]; then
for ip in $(nslookup ${line%%#*} | sed -n '/^$/,$ s/^A.*: //p'); do
for ip in $(nslookup ${line%%#*} | sed -n '/^$/,$ s/^A.*: //p' | cut -d' ' -f1 | grep -v ":"); do
ipset $ADD WhiteList $ip
[ $? -eq 0 ] && entryCount=$((entryCount+1))
done
Expand Down

0 comments on commit 4b2d620

Please sign in to comment.