Please Update
Please update the files to new one
Hi @mehedeetalha!
I'm not sure what you mean. Whenever you execute adblock, it will check for updates in the blocklist and update it if necessary. If you start seeing ads again, just run sudo adblock; if after that you still see ads, identify the domain that serves them and send a request to Dan Pollock at [email protected] 🙂
Please let me know if that answers your need.
Can we add multiple ads list host like GoodByeAds, AdAway, etc ?
I did this I do not know if it is the correct approach cuz I don't know how to do loop in bash
block() {
local tmpfile="$DOWNLOADED.part"
#Mash
local tmpfile1="$DOWNLOADED.part"
local tmpfile2="$DOWNLOADED.part"
local tmpfile3="$DOWNLOADED.part"
local tmpfile4="$DOWNLOADED.part"
local tmpfile5="$DOWNLOADED.part"
local tmpfile6="$DOWNLOADED.part"
local tmpfile7="$DOWNLOADED.part"
local tmpfile8="$DOWNLOADED.part"
#./Mash
sudo curl $SOURCE --show-error -\# --output "$tmpfile" && # -# is "show progress as a bar instead of full metrics"
sudo rm -f "$DOWNLOADED" && # -f allows to be silent if the file does not exist
sudo mv "$tmpfile" "$DOWNLOADED" &&
sudo cat "$ORIGINAL" | sudo tee "$TARGET" > /dev/null &&
sudo cat "$DOWNLOADED" | sudo tee -a "$TARGET" > /dev/null && # append to file rather than overwrite it
sleep 3
#Mash
sudo curl 'https://raw.githubusercontent.com/Zalexanninev15/NoADS_RU/main/ads_list_extended.txt' --show-error -\# --output "$tmpfile1" && # -# is "show progress as a bar instead of full metrics"
#sudo rm -f "$DOWNLOADED" && # -f allows to be silent if the file does not exist
sudo mv "$tmpfile1" "$DOWNLOADED" &&
#sudo cat "$ORIGINAL" | sudo tee "$TARGET" > /dev/null &&
sudo cat "$DOWNLOADED" | sudo tee -a "$TARGET" > /dev/null && # append to file rather than overwrite it
#./Mash
sleep 3
#Mash
sudo curl 'https://raw.githubusercontent.com/jerryn70/GoodbyeAds/master/Hosts/GoodbyeAds.txt' --show-error -\# --output "$tmpfile2" && # -# is "show progress as a bar instead of full metrics"
#sudo rm -f "$DOWNLOADED" && # -f allows to be silent if the file does not exist
sudo mv "$tmpfile2" "$DOWNLOADED" &&
#sudo cat "$ORIGINAL" | sudo tee "$TARGET" > /dev/null &&
sudo cat "$DOWNLOADED" | sudo tee -a "$TARGET" > /dev/null && # append to file rather than overwrite it
#./Mash
sleep 3
#Mash
sudo curl 'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts' --show-error -\# --output "$tmpfile3" && # -# is "show progress as a bar instead of full metrics"
#sudo rm -f "$DOWNLOADED" && # -f allows to be silent if the file does not exist
sudo mv "$tmpfile3" "$DOWNLOADED" &&
#sudo cat "$ORIGINAL" | sudo tee "$TARGET" > /dev/null &&
sudo cat "$DOWNLOADED" | sudo tee -a "$TARGET" > /dev/null && # append to file rather than overwrite it
#./Mash
sleep 3
#Mash
sudo curl 'https://pgl.yoyo.org/adservers/serverlist.php?showintro=0;hostformat=hosts' --show-error -\# --output "$tmpfile4" && # -# is "show progress as a bar instead of full metrics"
#sudo rm -f "$DOWNLOADED" && # -f allows to be silent if the file does not exist
sudo mv "$tmpfile4" "$DOWNLOADED" &&
#sudo cat "$ORIGINAL" | sudo tee "$TARGET" > /dev/null &&
sudo cat "$DOWNLOADED" | sudo tee -a "$TARGET" > /dev/null && # append to file rather than overwrite it
#./Mash
sleep 3
#Mash
sudo curl 'https://adaway.org/hosts.txt' --show-error -\# --output "$tmpfile5" && # -# is "show progress as a bar instead of full metrics"
#sudo rm -f "$DOWNLOADED" && # -f allows to be silent if the file does not exist
sudo mv "$tmpfile5" "$DOWNLOADED" &&
#sudo cat "$ORIGINAL" | sudo tee "$TARGET" > /dev/null &&
sudo cat "$DOWNLOADED" | sudo tee -a "$TARGET" > /dev/null && # append to file rather than overwrite it
#./Mash
echo 'Hosts file updated'
}
This issue should have been closed.
The comment above is a separate topic that should be open in its own, separate issue. Quick reply to @kuwaitbinary: no, at this stage this script does not support multiple sources. In my experience, the accuracy in blocking of the current file is completely satisfactory. I am thus not certain what would be the gain in adding more lists. If you find that the results are unsatisfactory, please open another issue providing a few examples of domains that are not blocked with the current source and that would be blocked properly by including other sources 🙂