Advert-Blocker 0.5

Browsers, email, chat, etc.
Message
Author
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]

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

#51 Post by technosaurus »

The only one I would recommend due to licensing issues with the rest is:
http://dsi.ut-capitole.fr/blacklists/download/
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].

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#52 Post by OscarTalks »

@ scOttman
Are you still supporting this?

Anyway, with some help from Terryphi I was looking at this recently. Looks like the Technobeta service is dead so I removed it. Also the format of the Mvps list is now modified so some changes are needed to the code otherwise it has no effect (the whole list downloads but ends up getting totally deleted).

With the modifications I have made so far the Mvps list works, or you can combine it with the other two for a longer hosts lists (with duplicates removed) for maximum blocking.

I will upload what I have as "version 0.5b" here:-
http://smokey01.com/OscarTalks/pup-adve ... r-0.5b.pet
but I know very little about coding so someone may wish to make corrections or improvements.

Seems like Woof and Woof-CE still have an old version 0.3 which really could do with being looked at.
Attachments
adblocker1.jpg
Slightly modified GUI
(75.27 KiB) Downloaded 1376 times
adblocker2.jpg
Hosts file with all 3 lists selected - note the number of lines
(61.65 KiB) Downloaded 1397 times
Oscar in England
Image

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#53 Post by zigbert »

Barry has included the pup-advert-blocker into Woof - now in Woof-CE.
Would be great if we could join our effort there
https://github.com/puppylinux-woof-CE/w ... rt-blocker
Attachments
Screenshot_2014-02-22_165127.png
(32.53 KiB) Downloaded 1470 times

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#54 Post by OscarTalks »

I have uploaded a couple of new versions of the advert blocker to
http://smokey01.com/OscarTalks
as well as here.

All of the above fixes plus I have corrected the long-standing typo
It only affected the labels, not the functions, but...

systcl should be sysctl

There is a version 0.3b-woofce which is for Slacko 5.7 or later using Zigbert's nice new GUI

For Puppies earlier than that, use the version 0.5b
Attachments
pup-advert-blocker-0.5b.pet
For Puppies earlier than Slacko 5.7
(4.48 KiB) Downloaded 638 times
pup-advert-blocker-0.3b-woofce.pet
For Slacko 5.7 or later Woof-CE Pups
(3.07 KiB) Downloaded 573 times
Oscar in England
Image

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#55 Post by 01micko »

Oscar, this is in the woof structure so I have updated it. Thanks. ziggy will be happy that is gtkdialog libraries are gaining acceptance.
Puppy Linux Blog - contact me for access

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

#56 Post by technosaurus »

fyi - if you want to run an app (wget for instance) with on a blocked site you can do this:

Code: Select all

         sed -i "s/hosts:\t\tfiles /hosts:\t\t/g" /etc/nsswitch.conf 
         wget -t 0 -q --no-dns-cache $HOST$FULL 
         sed -i "s/hosts:\t\t/hosts:\t\tfiles /g" /etc/nsswitch.conf
or you can modify resolve.conf or temporarily swap the /etc/hosts file with a blank one
(I used this technique in my shell based proxy server so that all my different browsers could use the same local cache...) ... but you could also extend it to block sites for your kids and use one of these techniques with a password to temporarily override it (I'd recommend the swapping technique for this so ads could still be blocked)
I recommend this set:
ftp://ftp.ut-capitole.fr/pub/reseau/cac ... sts.tar.gz
from: http://dsi.ut-capitole.fr/blacklists/index_en.php
it is split into the following
Category
adult
agressif
audio-video
blog
cleaning
dangerous_material
drogue
financial
forums
gambling
hacking
liste_bu
mobile-phone
phishing
publicite
radio
redirector
strict_redirector
strong_redirector
tricheur
warez
webmail
games
educational_games
mixed_adult
filehosting
reaffected
sexual_education
shopping
dating
marketingware
astrology
sect
celebrity
manga
child
malware
press
chat
remote-control
social_networks
jobsearch
sports
bank
arjel
cooking
lingerie
translation
bitcoin
dialer
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].

stray_dog
Posts: 65
Joined: Wed 19 Mar 2014, 00:14

#57 Post by stray_dog »

Wow, guys - thank you for continuing this conversation. It really confused me a while ago when I tried to check-mark all four options and the advert blocker would hang & not complete as a gui. It took a while to figure out that technobeta had gone down and not to check it. I really like the changes that have been made & I'm pumped with curiosity to try to add stuff to my hosts file to see what the results are.

riedzig
Posts: 40
Joined: Thu 01 Oct 2015, 06:14

Avoid displaying windows like "Unable to connect"

#58 Post by riedzig »

Many thanks for this nice tool which learned me how to work with the hosts file. I have one question: is in firefox settings possible to get rid of those numerous windows like "Unable to connect..."

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#59 Post by watchdog »


User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#60 Post by tallboy »

I noticed that the pup-advert-blocker in upupbb-18.05 is the old version 0.3. Probably not a mistake, because the same version 0.3 is the one to be found in https://github.com/puppylinux-woof-CE/w ... rt-blocker
Unless there are issues not known to me, can some of you competent members please update the woof-CE to v.0.5? :D

There have also been additions to lists of hosts candidates in a recent thread:
http://murga-linux.com/puppy/viewtopic.php?t=114611
I am not very competent when it comes to coding, but in the script pup-advert-blocker, there is code to delete all commented entries, as far as I understand it (I may absolutely be wrong!)

Code: Select all

# clean out everything but the list of IPs and servers
clean_adlist () {
	sed -i '/^#/d' /tmp/adlist-all # remove all comments
That will also remove some commented out entries in hosts, that have been creating trouble for some users, including me, and the explanatory text may be an eye-opener to some users. I think those commented-out lines should be kept there. See this post:
http://murga-linux.com/puppy/viewtopic. ... 16#1009816

A more general question: Would there be an idea to somehow 'flag' threads containing components of woof-CE, so that any changes to a program in a flagged thread will cause an update to woof-CE?
True freedom is a live Puppy on a multisession CD/DVD.

Post Reply