Files
misc/scripts/fetch-blocklist
2026-04-04 15:53:04 -07:00

21 lines
1000 B
Bash
Executable File

#!/bin/sh
LISTS="https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts
https://v.firebog.net/hosts/static/w3kbl.txt
https://adaway.org/hosts.txt
https://v.firebog.net/hosts/AdguardDNS.txt
https://v.firebog.net/hosts/Admiral.txt
https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt
https://v.firebog.net/hosts/Easylist.txt
https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts
https://raw.githubusercontent.com/bigdargon/hostsVN/master/hosts"
echo "server:" > /etc/unbound/unbound.conf.d/blocklist.conf
for URL in $LISTS; do
#echo $URL >> /etc/unbound/unbound.conf.d/blocklist.conf
curl -s "$URL" | grep -e '^0\.0\.0\.0' -e '^127\.0\.0\.1' | awk '{print "local-zone: \""$2"\" refuse"}' | \
tee >> /etc/unbound/unbound.conf.d/blocklist.conf
done