Am 12/28/17 um 23:58 schrieb Rupert Gallagher:
> The last update is 5 years old, and its blacklists are obsolete.
>
> https://github.com/conformal/adsuck/tree/master/files
>
> Sent from ProtonMail Mobile
>
Hi Rupert,
you are quite right - the default blacklist from mvps is outdated. This
is why I weekly do the following (serves my requirements and speed is no
priority):
#!/bin/sh
#
# /home/<user>/Downloads/mvps must exist!
#
# clean up first:
rm -f /home/<user>/Downloads/mvps/*
#
cd /home/<user>/Downloads/mvps
wget -4 -nc --no-proxy --no-cache --no-cookies
http://winhelp2002.mvps.org/hosts.zip
unzip hosts.zip
#
dos2unix HOSTS
#
# no comments
egrep -v '^#' HOSTS > Hosts
#
# no empty lines
sed -n -i '/0\.0\.0\.0 /,$p' Hosts
#
# check if anything does _not_ go to 0.0.0.0
if [[ $(awk '{print $1}' Hosts | uniq) != '0.0.0.0' ]]; then
printf "mvps-hosts-File manipulated! Bye, bye! \n";
exit 1
fi
#
# Show the date of update in /etc/hosts
echo "## Updated: `date +%Y-%m-%d`" > hosts_date
#
# Replace all 0.0.0.0 with 127.0.0.1 (aka 'localhost')
sed 's/0.0.0.0/127.0.0.1/' Hosts > hosts.tmp
#
# build new hosts-file
cat hosts_date /home/<user>/hosts_private hosts.tmp > hosts
#
# Keep last hosts-file
doas cp /etc/hosts /etc/hosts.last
#
# Replace old with new hosts-file
doas cp hosts /etc/hosts
#
# Back to home
cd /home/<user>
# reconnect with new hosts-file
print "reconnect NOW "
doas sh /etc/netstart
As I will give Jordan's solution a go I will check other blacklists as well.
Best,
STEFAN
No comments:
Post a Comment