debiman wrote:bedtime wrote:
I installed this program, and it renamed my home directory to 'hostsblock'. Anyhow, long story short, I ended up losing a bunch of files whilst uninstalling and getting things back to normal—config files and scripts that took hours and hours to make.
Please be careful if you chose to install this app.
you are right, and i am very, very sorry.
It's not at all your fault; you cannot be responsible for a program that somebody else maintains. We all know that there is a small risk when playing around with Github stuff. I took the chance, and I take responsibility.
Not sure of the version, but I know that I used the generic OS .zip file and installed it using the install.sh:
https://github.com/gaenserich/hostsbloc ... master.zip
Thank you so much for re-opening the bug. That was awesome of you! *gives a star*
I wonder why they opted to have this program make its own user? Security? Seems unnecessary to me.
Here is my—very crude—hosts setup that I use for now if anybody is interested:
Code: Select all
#!/bin/sh
if ! [ $(id -u) = 0 ]; then
echo "This script must be run as root. Exiting."
exit 1
fi
hostfile="/etc/hosts"
cd /home/user/scripts
echo "Updating hosts..."
echo "127.0.0.1 localhost\n127.0.1.1 debian.mydomain debian\n" > $hostfile
# Pick one filter below: Unified hosts = (adware + malware), Unified hosts + fakenews + gambling + social, Unified hosts + fakenews + gambling + porn + social
hostblockurl="https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"
#hostblockurl="https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts"
#hostblockurl="https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts"
# Append to hosts
wget -O - $hostblockurl >> $hostfile
file="hosts.txt"
# Check if primary (longterm) hosts file exists.
if [ -f "$file" ]; then
echo "$file found. Skipping download."
else
echo "$file not found. Retrieving file..."
wget https://hosts-file.net/download/hosts.zip; unzip hosts.zip
fi
# Append to hosts
cat hosts.txt >> $hostfile
# Fetch and append secondary updated hosts (goes along with the above primary host file)
hostblockurl="https://hosts-file.net/hphosts-partial.txt"
wget -O - $hostblockurl >> $hostfile
blocked=$(wc -l /etc/hosts | awk '{print $1;}')
echo "Hosts blocked: "$blocked
As can be seen, it combines the Steve's Github hosts with the huge hosts-file.net hosts. Yes, it's redundant and inefficient (750,000+ hosts blocked, but who knows if half of them even still exist or how many overlap). It will suffice until I have the time to make it more proper.