Page 1 of 1

adblock-hosts script

Posted: Sat Mar 12, 2016 4:07 pm
by aaah
I will just link to it
http://vsido.org/index.php?topic=757.0
I was using a more complicated setup but have switched to this, I like it simple.
It just updates your hosts file for you to block nasties and adverts.

Re: adblock-hosts script

Posted: Sat Mar 12, 2016 4:14 pm
by slartie
Or just .. you know .. use uBlock instead.

Re: adblock-hosts script

Posted: Sat Mar 12, 2016 4:25 pm
by pidsley
aaah wrote: I was using a more complicated setup but have switched to this, I like it simple.
What were you using before? ublock works for me.

Re: adblock-hosts script

Posted: Sat Mar 12, 2016 4:31 pm
by machinebacon

Code: Select all

#!/bin/dash
wget -c -O /tmp/hosts.txt http://www.mvps.org/winhelp2002/hosts.txt
sed -i -e 's:127.0.0.1:0.0.0.0:g' -e "s:^.*localhost.$:127.0.0.1 localhost `hostname`:" /tmp/hosts.txt
cat /tmp/hosts.txt | tr -d "\r" > /etc/hosts
rm /tmp/hosts.txt
But seriously, the more you add to /etc/hosts the slower the DNS resolution is. I'd simply use ublock. For TUI browser ads play no role anyway.

Re: adblock-hosts script

Posted: Sat Mar 12, 2016 6:10 pm
by bones
Giant host file here, but seriously, ublock origin works great.

Re: adblock-hosts script

Posted: Sat Mar 12, 2016 7:05 pm
by ivanovnegro
I know we repeat ourselves but really?
It seems AdBlock is going astray. Here is a simpler and system wide alternative to AdBlock.
From that dark website you linked.

uBlock is all you need.

Edit: No wonder. The post is from 2014.

Re: adblock-hosts script

Posted: Sat Mar 12, 2016 7:14 pm
by aaah
I've heard abt ublock but for some reason decided not to try it, cant remember why. Is it only for certain browsers, will look it up again, in the meantime I guess this post comes under the category, "Epic fail" :)
ok had a quick search abt it, it's a browser addon, I don't realy want another addon although it might not use much memory I don't know. Happy with my hosts file for now, haven't noticed a slowdown.

Re: adblock-hosts script

Posted: Sat Mar 12, 2016 7:15 pm
by ivanovnegro
You can grab uBlock for all the popular browsers. You see, every griller uses it. I think that means something. :)

Re: adblock-hosts script

Posted: Sat Mar 12, 2016 7:56 pm
by slartie
Last I checked, uBlock has a smaller memory footprint than AdBlock and all its variants ever had.

Re: adblock-hosts script

Posted: Sat Mar 12, 2016 9:55 pm
by wuxmedia
I'm very happy with ublock. I have been since it wa pointed out on here, not that I'm short of RAM or anything. It is embarrassingly good, sometimes at work on a site migration - "where are my ads..."
- huh, what ads... ohh?

Re: adblock-hosts script

Posted: Sun Mar 13, 2016 10:08 am
by GekkoP
Yeah, uBlock just works great.

Re: adblock-hosts script

Posted: Sun Mar 13, 2016 11:06 pm
by slartie

Re: adblock-hosts script

Posted: Mon Mar 14, 2016 11:55 am
by rhowaldt
getting repetitive here, but yeah, ublock does it for me too.

Re: adblock-hosts script

Posted: Mon Mar 14, 2016 2:27 pm
by anticapitalista
I prefer ad blocking via hosts file. Like OP no slowdown.

Re: adblock-hosts script

Posted: Mon Mar 14, 2016 6:12 pm
by Theo
AFAIK the hosts file takes a bit time because it's unindexed text. So if I have the choice I install uBlock otherwise I use the hosts file.

Re: adblock-hosts script

Posted: Tue Mar 15, 2016 4:15 pm
by ivanovnegro
Nice to see some outliers.

Re: adblock-hosts script

Posted: Tue Mar 15, 2016 4:21 pm
by GekkoP
If not uBlock, I go with this: http://surf.suckless.org/files/adblock-hosts

Re: adblock-hosts script

Posted: Tue Mar 15, 2016 9:25 pm
by Theo
^ Thanks, a nice catch for 'stubborn' browsers I guess :)