QUOTE (toadbee @ May 4 2004, 10:34 AM)
@r00ted -
Well I added append all ready, but it is not Looking for Dupes - simply adding on the end.
I can understand why Aldo's is making a mees for you, the seeking dupes is a trickery task than it may seem... i.e. a tab is different than a space, a space is different than 2 spaces etc, so it's brutal to look for an accurate match. If I get the time here I'll play around with that and see if I can come up with something.
Here's an updated version. Feel free to play around with it. Again the append is a "dumb" append at this point - though useful in some cases. You can also keep a bunch of different Hosts files (different names ofcourse) and "replace" the Hosts file at will. The back up is still a backup.
Also there a button there to remove all blocking lines in one shot (it leaves "local host") - basically strips the hosts of all 127.0.0.* - Some hiJacked folks might find that useful
http://members.aol.com/toadbee/hoster11.ziphmm. as far as the comparing algorithm and stuff, I try and keep my HOSTS file (as in the BLM HOSTS file Project) as clean cut as possible, as in
127.0.0.1<tab-key>ad.server.us
All the way down, the only tricky part, would be lines with comments such as
127.0.0.1<tab>rd.yahoo.com<tab>#<tab>This will block a lot of shit at yahoo.com
like, how it would deal with the rd.yahoo.com when it removes all of the duplicates, and keeps 1 in tact.
Would it be possible to compare just the hostnames? so, have the compare algorithm thing ignore the 127.0.0.1 (since that will be the same all the way thru, to re-route all traffic to localhost). But yea, I've been trying to keep the columns fairly straight

and I usually only use comments on entries that are already commented, or like, in the case of the above rd.yahoo.com, I have it un-commented, and a reason why.
Also, another suggestion

Would it be possible, to change the way the "Add to HOSTS file" text box functions upon "Add"?

Make it so it puts the 127.0.0.1<tab> followed by the hostname that is entered. Or hell, have a toggle/option thing for how the hostnames should be entered, like, some people use 0.0.0.0, some use 127.0.0.1, others use google.com (which, would be 216.239.37.99<tab>adserver.com). Maybe a seperator option, whether to seperate the columns by " " or "<tab>" even lol

hehe.
oops, dont know if this is a bug or not...lol. I hit the "Remove All Block Items" button, and it left behind the following:
QUOTE
# Welcome to the BlueTack.Co.Uk HOSTS file, brought to you by, r00ted!
#
# To INSTALL this HOSTS file:
# Windows XP C:\WINDOWS\SYSTEM32\DRIVERS\ETC (CONFIRMED)
# Windows 2K C:\WINNT\SYSTEM32\DRIVERS\ETC (CONFIRMED)
# Win 98\M C:\WINDOWS (UNCONFIRMED, IF IT WORKS TELL ME VIA PM PLEASE!)
#
# For more information please goto
http://www.bluetack.co.uk/forums/index.php?showtopic=812#
# To download the hosts goto
http://www.bluetack.co.uk/forums/index.php?showtopic=1099#
# Other Good URLS:
# www.21stcentury.net/~flan/hosts.html
#
http://pgl.yoyo.org/adservers/#
http://datadragon.com/banners/#
http://ssmedia.com/utilities/hosts/#
http://www.hostboard.com/cgi-bin/ultimateb...bb/forum/f/7596#
http://wizbangblog.com/mtblacklist/mtblacklist.php#
http://groups.yahoo.com/group/hphosts_support/#
http://groups.yahoo.com/group/hphosts_support/files/#
http://webpages.charter.net/hpguru/hosts/hosts.html#
http://asp.flaaten.dk/download/pafiledb.ph...n=category&id=2#
http://asp.flaaten.dk/proxo/#
http://someonewhocares.org/hosts/#
http://www.ngweb.biz/software/hostsedit.shtml#
http://www.pattersondesigns.com/tweakdun/#
http://www.mvps.org/winhelp2002/#
http://www.gnu.org/licenses/lgpl.txt#
http://mvps.org/winhelp2002/restricted.htm#
http://everythingisnt.com/hosts.html#
http://remember.mine.nu#
http://www.hostboard.com/cgi-bin/ultimateb...bb/forum/f/7596#
http://groups.yahoo.com/group/hphosts_support/#
http://groups.yahoo.com/group/hphosts_support/files/#
http://webpages.charter.net/hpguru/hosts/hosts.html#
http://ssmedia.com/utilities/hosts/#
# To report new Ads/Popups/etc e-mail hpguru(AT)flaaten.dk , hosts(AT)someonewhocares.org , r00ted(at)askchopper.com , user245(at)hotmail.com , pgl(at)yoyo.org , wduk10(at)hotmail.com , hphosts(at)yahoo.com , mjmeyer(at)myrealbox.com , x9000(at)techie.com
#
# Redirect to any of these three ip addresses using Find & Replace (the current settings SHOULD work fine though)
# 204.144.255.91 = www.localhost.com (some website lol)
# 0.0.0.0 = some invalid IP that NOBODY HAS
# 209.185.108.220 = www.google.com (BEST SEARCH ENGINE, FAST LOADING)
# 216.156.164.158 = www.vb.com (BLANK SITE)
# As a side-note, the HOSTS file can handle "descriptions" such as
127.0.0.1 localhost
127.0.0.1 localhost.utopiad.com
127.0.0.1 localhost.devnull.com
127.0.0.1 localhost.localdomain
127.0.0.1 localhost.devnull.com
127.0.0.1 www.127.0.0.1.in.localhost.net.ar
127.0.0.1 localhost.bonustreasures.com
127.0.0.1 localhost.bonusnation.com
my guess is you got some code in there to remove all lines, except for lines with leading #, and the term localhost ;-) hehe