meta: Initial commit

This commit is contained in:
Enno Tensing 2024-12-26 11:58:21 +01:00
commit 7012ff6e92
Signed by: tenno
GPG key ID: 95265603BD36E66C
2 changed files with 41 additions and 0 deletions

6
sources Normal file
View file

@ -0,0 +1,6 @@
https://v.firebog.net/hosts/static/w3kbl.txt
https://v.firebog.net/hosts/Easyprivacy.txt
https://osint.digitalside.it/Threat-Intel/lists/latestdomains.txt
https://v.firebog.net/hosts/Prigent-Ads.txt
https://raw.githubusercontent.com/d3ward/toolz/refs/heads/master/src/d3host.txt
https://raw.githubusercontent.com/RPiList/specials/refs/heads/master/Blocklisten/easylist

35
update-list.sh Executable file
View file

@ -0,0 +1,35 @@
#!/bin/sh
CONFDIR="/etc/unbound"
CONFFILE="always-deny.conf"
CONF="${CONFDIR}/${CONFFILE}"
SOURCES="${CONFDIR}/sources"
BUILDDIR="/tmp/$(openssl rand -hex 42)"
update_sources()
{
mkdir -p "${BUILDDIR}" && cd "${BUILDDIR}" || exit 1
cat "${SOURCES}" | while read -r src
do
curl -#LO "$src"
done
find . -type f | while read -r file
do
cat "$file" | tee -a domains
done
}
format_sources()
{
cat domains | tr -d '|' | tr -d '^' | grep -v '#' | sed -e 's|0.0.0.0 ||g' | sort -u | uniq > new_domains
cat new_domains | while read -r domain
do
if ! [ -z "$domain" ]
then
printf 'local-zone: "%b" always_deny\n' "$domain"
fi
done | tee "${CONF}"
}
update_sources
format_sources