Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions postwhite
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,22 @@ if [ x"$include_yahoo" = x"yes" ] ; then
fi

if [ x"$enable_blacklist" = x"yes" ] ; then
printf "\nQuerying blacklist hosts...\n"

for h in ${blacklist_hosts}; do
query_black_host "${h}"
done
printf "\nQuerying blacklist hosts...\n"

for h in ${blacklist_hosts}; do
query_black_host "${h}"
done

# Read domains from file if defined
if [ -n "$blacklist_hosts_file" ] && [ -f "$blacklist_hosts_file" ]; then
while IFS= read -r h; do
# Ignore coments
[ -z "$h" ] && continue
echo "$h" | grep -q '^#' && continue

query_black_host "$h"
done < "$blacklist_hosts_file"
fi
fi

# If enabled, simplify (remove) any individual IPs already included in CIDR ranges (disabled by default)
Expand Down