Advert-Blocker 0.5

Browsers, email, chat, etc.
Message
Author
User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#31 Post by sc0ttman »

chrismt wrote:
sc0ttman wrote:
Also, is 0.5 working for everyone?

I'm not entirely sure I fixed it right, although as I said earlier, it seems to always work in 4.2 :roll:
My problem with Puppy AdStopper in Puppy 5.1 seems to have fixed :D

I updated all the list and I counted the number of blocked lines and it is around 29452

I guess, this is what you will get if you update all the lists

Thanks!
Yep, thats very close indeed to what I got last time I updated...
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

fyujj
Posts: 102
Joined: Sat 04 Apr 2009, 17:40

#32 Post by fyujj »

Hope not to be hacking this forum thread, but I'm interested in technosaurus' version because it can be run even from the cli. The latest version still didn't work, it creates a /tmp/adlist{1,2,3,4} but it's empty and so its links too.

Code: Select all

root@debian:/tmp# ls -l
total 1460
-rw-r--r-- 1 root root 618540 Ago 18 14:45 adlist1
-rw-r--r-- 1 root root      0 Set  3 18:35 adlist{1,2,3,4}
-rw-r--r-- 1 root root 733138 Ago 31 06:56 adlist2
-rw-r--r-- 1 root root  54885 Fev 12  2008 adlist3
-rw-r--r-- 1 root root  72249 Ago 19 22:01 adlist4

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#33 Post by technosaurus »

fyujj wrote:

Code: Select all

root@[b]debian[/b]:/tmp# ls -l
-rw-r--r-- 1 root root      0 Set  3 18:35 adlist{1,2,3,4}
that is odd - could it be that your /bin/sh is pointing to dash?
I thought it was standard behavior to expand adlist{1,2,3,4} to adlist1 adlist2....
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

fyujj
Posts: 102
Joined: Sat 04 Apr 2009, 17:40

#34 Post by fyujj »

technosaurus wrote:that is odd - could it be that your /bin/sh is pointing to dash?
Yes, I'm in Debian.
I have bash installed too and it's the default interactive shell as set in /etc/adduser.conf (I saw that in Debian's wiki and confirmed here).
Also, just for information, /bin/sh.distrib links to bash:

Code: Select all

lrwxrwxrwx 1 root root      4 Ago 13 21:48 sh -> dash
lrwxrwxrwx 1 root root      4 Jul 28 23:03 sh.distrib -> bash
I'm just saying, as dash is the default shell in Debian but maybe I could call the app in a different way (like /bin/bash script) and then it would work.

-edit: I tried both scripts (the first one and the second one that has the extra option to disable adblock) with /bin/bash. They both created empty files in /etc/hosts (the first directly and the second by linking to an empty /etc/hosts.adblock). The difference to when using dash is that the script this time deleted the downloaded files in /tmp while with dash they were kept there.

fyujj
Posts: 102
Joined: Sat 04 Apr 2009, 17:40

#35 Post by fyujj »

I left the script like this:

Code: Select all

#!/bin/bash
DIALOG=dialog || DIALOG=dialog
[ ! -f /etc/hosts.usr ] && touch /etc/hosts && cp -f /etc/hosts /etc/hosts.usr #echo 127.0.0.1 localhost puppypc >/etc/hosts #r1 maybe user added others
for x in `$DIALOG --stdout --checklist "Choose your ad blocking service(s)" 0 0 5 1 "mvps.org" ON 2 "systcl.org" ON 3 "technobeta.com" ON 4 "yoyo.org" ON 5 "turn off adblocking" off |tr "/" " " |tr '\"' ' '`; do
   case $x in
   1)wget -c -4 -t 0 -O /tmp/adlist1 'http://www.mvps.org/winhelp2002/hosts.txt';;
   2)wget -c -4 -t 0 -O /tmp/adlist2 'http://sysctl.org/cameleon/hosts';;
   3)wget -c -4 -t 0 -O /tmp/adlist3 'http://www.technobeta.com/download/urlfilter.ini';;
   4)wget -c -4 -t 0 -O /tmp/adlist4 'http://pgl.yoyo.org/as/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext';;
   5)ln -sf /etc/hosts.usr /etc/hosts && exit;;
   *)echo $x;;
   esac
done
touch /tmp/adlist{1,2,3,4}
cat /etc/hosts.usr /tmp/adlist{1,2,3,4} |sed 's/^[ \t]*//' |sed 's/\t/ /g' |sed 's/  / /g' |grep ^[1-9] |dos2unix -u |sort |uniq > /etc/hosts.adblock
ln -sf /etc/hosts.adblock /etc/hosts
and it doesn't create anymore /tmp/adlist{1,2,3,4}. The four files are in /tmp

Code: Select all

root@debian:/tmp# ls -l
total 1460
-rw-r--r-- 1 root root 618540 Set  4 12:34 adlist1
-rw-r--r-- 1 root root 733138 Set  4 12:34 adlist2
-rw-r--r-- 1 root root  54885 Set  4 12:34 adlist3
-rw-r--r-- 1 root root  72249 Set  4 12:34 adlist4
but /etc/hosts.adblock and /etc/hosts are blank.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#36 Post by technosaurus »

here is an entry that redirects bing.com to google

74.125.157.147 bing.com
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

fyujj
Posts: 102
Joined: Sat 04 Apr 2009, 17:40

#37 Post by fyujj »

Here's another hosts list
http://someonewhocares.org/hosts/

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#38 Post by sc0ttman »

fyujj wrote:Here's another hosts list
http://someonewhocares.org/hosts/
Thanks for the list, I've been using it for a while to see whether or not to include it in a newer version of pup-advert-blocker...

But if anyone cares, the list above seems to break too many things, and causes a few websites to hang.. Most notably (for me) 4od and other video sites..

And considering it's not a list of 20,000 or so, that's quite a lot of things in there that I don't want blocked.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

yordanj94
Posts: 78
Joined: Thu 16 Sep 2010, 15:40
Location: Bulgaria

#39 Post by yordanj94 »

Hi.
Can i use that program instead of Adblock Plus
or AP has some more function and it's good to have them both ?
Thanks in advance.

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#40 Post by sc0ttman »

yordanj94 wrote:Hi.
Can i use that program instead of Adblock Plus
or AP has some more function and it's good to have them both ?
Thanks in advance.
You could use them both.

Pup-Advert-Blocker edits the '/etc/hosts' file so that the listed ad servers cannot even connect properly..
They're redirected away, so it makes browsing a bit faster.

AdBlock-Plus checks the stuff after its downloaded - it doesn't save any bandwidth.
But AdBlock-Plus allows you to click on any advert you see and block it, so that's nice.

This tool does not conflict with AdBlock-Plus in any way (as far as I know)
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

yordanj94
Posts: 78
Joined: Thu 16 Sep 2010, 15:40
Location: Bulgaria

#41 Post by yordanj94 »

Thanks a lot

User avatar
chrismt
Posts: 255
Joined: Wed 21 Apr 2010, 04:37

#42 Post by chrismt »

@ scottman

Is it possible to add a restore to default button?

Or is it safe to open the host file and delete everything in it?

yordanj94
Posts: 78
Joined: Thu 16 Sep 2010, 15:40
Location: Bulgaria

host-file

#43 Post by yordanj94 »

Hi.
I do it that way.
Before to run Advert-blocker copy somewhere default host file.
It's in etc/ and then if you want to have it back just replace the old one with the new one.
The other way is to open your host file and delete everything that was added by AB.

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#44 Post by sc0ttman »

chrismt wrote:@ scottman

Is it possible to add a restore to default button?

Or is it safe to open the host file and delete everything in it?
It is safe to delete everything between the Advert-Blocker 'markers'.. NOT highlighting any of the lists and clicking 'Start', will do this for you - leaving you with whatever you had before running the tool.

There is no real need to backup before you run the tool - this tool will only add stuff to the end of your hosts file, and always between easy to see 'markers' so you know what was added. And as mentioned above, will delete what it has added, if you select none of the checkboxes.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

mellowchuck
Posts: 7
Joined: Wed 22 Jun 2011, 19:02

#45 Post by mellowchuck »

Hey Everyone,

I have a few suggestions for this application -

1) Change the dns redirection from 127.0.0.1 to 0.0.0.0 in case someone is running some server programs/services and/or running puppy as a server.

2) Add these amazing lists to the ones already there-

HP Hosts: http://support.it-mate.co.uk/downloads/HOSTS.txt

someonewhocares.org: http://someonewhocares.org/hosts/

Hosts File Project: http://hostsfile.mine.nu/Hosts

hostsfile.org: http://www.hostsfile.org/Downloads/BadHosts.unx.zip

Peter Lowe's Adblock List: http://pgl.yoyo.org/as/serverlist.php?h ... =plaintext




Other than this, THANKS A LOT!!! I've been looking for a program similar to Hostsman for windows and this is the closest thing out there!!! Thank you!!!
Thanks,
Chuck

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#46 Post by sc0ttman »

I've updated this tool a bit since it was included in Woof, nothing major but its faster.. I have also recentlty i18n'd (internationalised) it, so the GUI can be available in a number of languages.

Translations of the following english .mo file are welcome (I think its better to start getting real translations, rather than keep posting crap trans-Google-lations, as they are [apparently] more or less incomprehensible!)

Code: Select all

# english

Loc_no_ads_selected="No ad lists selected. Ad blocking will be disabled."
Loc_success="Success - your settings have been changed.\n\nYour hosts file has been updated."

Loc_start_btn="Start"
Loc_start_btn_tt="Click to download and then block a list of advertising servers"
Loc_edit_btn="Edit"
Loc_edit_btn_tt="Manually edit your hosts file in a text editor, adding or removing any entries you like"
Loc_quit_btn="Quit"
Loc_quit_btn_tt="Exit or Cancel"
Loc_help_btn="Help"
Loc_help_btn_tt="Learn more about blocking and disabling online adverts"

Loc_help1="The $title tool adds stuff to your '/etc/hosts' file, so that many advertising servers and websites will not be able to connect to this PC."
Loc_help2="Leave your cursor over a service to see a short description. You can choose one service or combine multiple services for more advert protection."
Loc_help3="Blocking ad servers protects your privacy, saves you bandwidth, greatly improves web-browsing speeds and makes the internet much less annoying in general."
Loc_howto="Leave your cursor over a service to see a short description. You can choose one service or combine multiple services for more advert protection."

Loc_summary="Block online ads in all browsers with this simple tool"
Loc_choose_service="Choose your preferred ad blocking services"
Loc_mvps_desc="Blocks a very large number of malware sites and unsafe adult networks"
Loc_systcl_desc="A large, fairly comprehensive list of many known ad servers"
Loc_technobeta_desc="A smaller list of popup adverts, ad servers and ad networks"
Loc_yoyo_desc="A small and effective list of very popular ad servers"
Loc_start="Click '${Loc_start_btn}' to block the selected ad servers"
Loc_edit="Click '${Loc_edit_btn}' to edit the hosts file"
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
stiginge
Posts: 420
Joined: Thu 22 Mar 2007, 10:10
Location: Kerry, Ireland

#47 Post by stiginge »

One quick question, does the program automatically run when computer in rebooted? Or does it have to be run every time on bootup? I'm using 529 and there a shortcut from the jwm launch tray.
Buy silver, crash JPMorgan

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#48 Post by Iguleder »

You need to run it just once. The best way to see whether it worked is the length of /etc/hosts - should be thousands of lines :)
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

Sadi
Posts: 1
Joined: Mon 09 Apr 2012, 12:09

Advert-Blocker 0.5

#49 Post by Sadi »

Great work!!!

This is the closest thing I've found in the Linux world to this Windows Hosts Manager: www.abelhadigital.com/hostsman

Missing features are:
(1) Automatic updates (e.g. option to put a commandline version in /etc/cron.weekly or /etc/cron.monthly after configuration from the GUI control centre)
(2) Custom inclusion and exclusion lists (may be called hosts-user-allow and hosts-user-deny instead of black or white lists for political correctness ;-)
(3) Possibility to add more online sources

I think it shouldn't be too difficult to add these.

And then I would wish I could also have a distro-independent version (replacing gtkdialog3 with zenity perhaps)

Kind regards,

Sadi

User avatar
vicmz
Posts: 1262
Joined: Sun 15 Jan 2012, 22:47

#50 Post by vicmz »

I was wondering... Are there any lists that can be added to PupAdvertBlocker so that it also blocks adult sites? Most adult content blockers work with keywords, that's horrible because for example you can open your email box or your favourite social network and get it suddenly closed by an adult content warning, this makes surfing the web very awkward.
[url=http://murga-linux.com/puppy/viewtopic.php?t=76948]Puppy Linux en español[/url]

Post Reply