Anyone who uses the hosts file from hp-hosts (
http://hosts-file.net/) to block bad/ad sites may have noticed that they no longer release a single consolidated file.
I have created a simple script to download the individual lists and create a single file suitable for using/adding to your Slackware hosts file. The script can also be used to generate a "generic" hosts file with only the domains to use on any distro.
By default it will download and use all the lists available and generate a hosts file using 127.0.0.1. There are a couple of options that can be changed, make sure to read about them in the script itself.
If you use a default hosts file as provided by the Slackware installation, you can build the hosts file with the script using the default settings and just replace the current one in /etc (as root of course). The script itself can be ran as a regular user, but replacing the hosts file will require superuser privileges.
As of today (2019-02-26) the generated list has 559,674 hosts listed, and is ~17MB using the default settings.
Feedback, tweaks, fixes, suggestions are always welcome.
You can get the script here:
https://gitlab.com/snippets/1830272
Enjoy!