PDA

View Full Version : Block Ads \ Updates to my hosts file


Fianor
11-12-2006, 05:00 PM
I wrote this thread a while back:

http://www.phoenixrising.at/forums/showthread.php?t=28619&highlight=hosts


As it's closed and the download links from it are bad now I figured I'd just write a new one and update. I'm only going to provide steps for the big one and WinXP, if you have other questions read the old thread, or just ask.

To block most ads on the internet do this:

1.) Download http://www.fianor.vengefuldeath.com/files/hosts.super
2.) Download http://www.fianor.vengefuldeath.com/files/Superhosts.bat
3.) Download http://www.fianor.vengefuldeath.com/files/UndoSuper.bat
4.) Copy all 3 files to the c:\windows\system32\drivers\etc directory on your computer.
5.) Run superhosts.bat

You should not see many ads now. Clearing your cache, restarting your browser and/or restarting your computer may be neccessary to get the full effect.

There may be sites you want to use that it blocks, my first answer is stop using those sites, they're blocked 'cuase they do sucky things to your computer. When you don't like that answer and want to use some odd site anyway, just open c:\windows\system32\driver\etc\hosts in notepad, do a find to search for the website you want and add a # to the front of the line that has it. E.G. change:

0.0.0.0 www.crappysitethatwilldobadthingstomypc.com

to

#0.0.0.0 www.crappysitethatwilldobadthingstomypc.com

Save the file and you should be able to go to your crappy site that does bad things to your computer again. You can also just use the undosuper.bat to go back to normal browsing while your doing whatever crappy sites, and use superhost.bat again to put the blocks back. It will not hurt to use them over and over.

Devilish-Dion
13-12-2006, 03:18 AM
Thanks for the update :)

Edit: Okies, slight problem. I moved all 3 files into the correct directory then executed the superhosts.bat file. Then when ever I open a new browser I can seem to connect to any websites at all unless I run the undosuper.bat file. Any suggets?

Fianor
13-12-2006, 03:21 PM
odd ... I had that result for the first time on my cousin's pc the other day too. What IE are you using? I'm wondering if it's a hot fix broke my hosts file, or if perhaps IE7 did. I don't have 7 so I'm just guessing right now.

One of the things the script does is turning off the DNS client, which in IE6/XP was completely unneeded. If you can't turn it off, then with ie6/xp my hosts file would actually slow your internet to a crawl becuase of it.

Try just manually renaming hosts to hosts.orig, and hosts.super to hosts without running the bat or turning off dns client. See if it slows your inet or helps it.

Let me know. I haven't upgraded to IE7 yet, and if this is the case, I won't be. I'd rather have my hosts file work than yet another crappy version of IE.

SpiritOfBuffylou
01-01-2007, 04:39 AM
Cool deal. Thanks, I'll give this a try on IE7 and let you know what happens...

OK, so I tried it on my desktop which is an XP-SP2 with IE7 and could not access the websites. I then changed the services to manual. Next, I went into the host to find the websites and only found my.myway.com blocked did the # before and still had trouble accessing the websites... (myway was ok), but phoenixrising and KOC were not...
I ended up doing a restore to the previous morning ...

MightyWarMonger
13-01-2007, 05:56 PM
ok is this program or files sole porpose to block adds? because if so why not just use admuncher? or am I way off lol BTW I'm stupid dumb with computers is why I ask so for me admuncher was easier. the stuff you have listed hear might take me a week to figure out if then lol. I had to have some one come to my house and set up mIRC for me :( sad I know but what can you do.

FirePenguins
13-01-2007, 07:06 PM
Ad muncher expires eventually and it is another program that runs on your computer and uses memory.

What I am wondering though is if some one (maybe fianor :p ) could tell me how to edit my existing host file to block just the KoC ads. Blocking lots of stuff is great and all but I'm really only looking to block the KoC ads for now and then I can edit in other ads as I need. I tried opening my host file in notepad and entering the line:

0.0.0.0 kingsofchaos.com/ads

but it doesn't have seemed to do anything and I can't get the specific ads because they all show up as "internal server error 500" which also makes clicking impossibly slow. Any help is appreciated! thanks

EDIT: basically the 500 Internal server Error is making it to where I can't click and ad muncher trial has expired and it would appear they fixed the uninstall reinstall. Some how I need to click though so anything would be great since this has been going on for two days now :( :( :(

jaketo
13-01-2007, 10:55 PM
ok is this program or files sole porpose to block adds? because if so why not just use admuncher? or am I way off lol BTW I'm stupid dumb with computers is why I ask so for me admuncher was easier.

Admuncher and an editted hosts files are basically doing exactly the same thing - intercepting a request from a website for more material i.e. an ad, and redirecting this request elsewhere, usually i.e. locally to a null address. This makes the loading of the site faster as it has to download less. Admuncher just has a nice front end on it and replacement the directed content with something else.

What I am wondering though is if some one (maybe fianor :p ) could tell me how to edit my existing host file to block just the KoC ads. Blocking lots of stuff is great and all but I'm really only looking to block the KoC ads for now and then I can edit in other ads as I need. I tried opening my host file in notepad and entering the line:

0.0.0.0 kingsofchaos.com/ads

but it doesn't have seemed to do anything and I can't get the specific ads because they all show up as "internal server error 500" which also makes clicking impossibly slow. Any help is appreciated! thanks

EDIT: basically the 500 Internal server Error is making it to where I can't click and ad muncher trial has expired and it would appear they fixed the uninstall reinstall. Some how I need to click though so anything would be great since this has been going on for two days now :( :( :(

A line in 'hosts' can only point to a full domain name and not a sub-domain e.g.

127.0.0.1 www.anyoldsite.com
127.0.0.1 ads.anyoldsite.com

Anything else won't work, such as

127.0.0.1 anyoldsite.com
127.0.0.1 www.anyoldsite.com/ads

I'm not sure about the KoC site (I use Norton Internet Security which quite happily blocks ads for me) but their ads use to redirect from ads.kingsofchaos.com which is still live. You might try that line in hosts and see if that helps?

Cheers

J

Fianor
14-01-2007, 08:52 PM
Additionally admuncher requires ram and processor time, meaning it slows your computer down as it's taking up resources. The hosts file does not do this because it is not a program, it's just a file that your browser reads everytime you load a webpage already. Yes you can use admuncher and it does something similar to my hosts file, but it is not the same. Also at one time admuncher itself was causing KoC not to load at all and people couldn't click or play. My hosts file was created at that time asa wayto still block the ads without using admuncher. I still use it and share it becuase it's still better than admuncher as it doesn't use up resources and slow your computer down.

Firepenguins, you can certainly create your own hosts file which only blocks sites that KoC uses for advertising. But it will not be as easy as simply adding one line. You will have to add one for every sponsor KoC uses, and will then have to continually edit it as they find more advertisers to use. Hover your mouse over the ad and see what domain it is coming from, add the line to your hosts file with that domain and you will no longer see ads from that sponsor. Mine is simply a precompiled list of about 75,000 adsites which I add to often.

MightyWarMonger
14-01-2007, 10:30 PM
fianor

How much does admuncherslow down a computer? I have 1 gig of ram and about 50% free memory space on my cpu. I guess what I'm realy trying to say is will it make that much of a differance? Not that I doubt what you said at all it's just I have no clue, and is it easy to learn how to do?

jaketo
14-01-2007, 11:48 PM
The hosts file does not do this because it is not a program, it's just a file that your browser reads everytime you load a webpage already......it's still better than admuncher as it doesn't use up resources and slow your computer down.

Hosts may not use resources per se but it is parsed everytime your PC performs a DNS lookup so if Hosts grows too large it will start to impact system performance, though still less than third party programs ;)

How much does admuncherslow down a computer?

Probably not that much difference to be honest. Download the trial and see if you're curious, or just use Fianor's hosts file, it rocks :)

Banished Angel
15-01-2007, 12:25 AM
does this work with firefox?

and does it work with IE7?

and final question, how do u run superhosts.bat?

FirePenguins
15-01-2007, 12:49 AM
Ad muncher works with both and I'm pretty sure that hosts file does as well. One thing that I'm messing around with is you can also block ads with a custom style sheet for your browser. Kinda cool :P

Now that the ads are back on koc I'm no longer in a panic. I can click 60cpm average with ads but with those Internal Server Errors I was at 5cpm average.

Thanks for the help Jaketo and Fianor!

Fianor
15-01-2007, 05:11 PM
fianor

How much does admuncherslow down a computer? I have 1 gig of ram and about 50% free memory space on my cpu. I guess what I'm realy trying to say is will it make that much of a differance? Not that I doubt what you said at all it's just I have no clue, and is it easy to learn how to do?

It depends on your computer. If you have a nice newer fast computer, you may not notice admuncher at all. If you're using an older system without a large amount of ram it's fairly significant. Either way it's wasting resources that could be used to speed something else up.

Hosts may not use resources per se but it is parsed everytime your PC performs a DNS lookup so if Hosts grows too large it will start to impact system performance, though still less than third party programs ;)

Probably not that much difference to be honest. Download the trial and see if you're curious, or just use Fianor's hosts file, it rocks :)

My hosts file is monstrous, I've never seen another even close to it. That said it still doesn't impact performance if you turn off the dns client, which is unneeded anyway. If you leave it turned on and have a host file like mine you will never get a page to load up at all.

does this work with firefox?

and does it work with IE7?

and final question, how do u run superhosts.bat?

What my hosts file is doing is affects windows itself and the way the TCP/IP stack resolves DNS. It works with ALL browsers, every single one, even if you programed one yourself. You run batch files like all other programs, you double click it.

Madn355
18-01-2007, 04:00 PM
Thanks Fianor. I tested it but didn't work first. But then I rebooted and works fine now.

Rep for you :)

FlamingKnights
16-02-2007, 12:10 AM
i cant get it to work at all :(
is the first link suppose to open up as a website?

jaketo
16-02-2007, 12:47 AM
Which link FK?

FlamingKnights
16-02-2007, 12:49 AM
http://www.fianor.vengefuldeath.com/files/hosts.super

opens as a website i just clicked file save as and saved it under the etc driver but i was thinking its suppose to be a program.

jaketo
16-02-2007, 01:26 AM
Ok, that link opens Fianor's list. The other two links are for the scripts he wrote to ease installation.

If your comfortable enough (and from your comment I guess you are) you can just save this list and then either use it to replace your existing hosts file or merge the list into your existing hosts file and skip the installation scripts.

To get the new hosts file working, either -

1. (Easy) Reboot.

2. (More complex) Close any open instances of any program that connects to the internet in some way e.g. IE, MSN, mIRC etc, then drop to a command prompt and run 'ipconfig /flushdns'. After this the majority of your ads should be gone.

Hope that helps :)

FlamingKnights
16-02-2007, 01:51 AM
i would say its not working as from his other thread it blocks illegal sites so i tested that and went to warez.com just clicked the link in that other thread and it took me to the site and didnt block it and also sent you another pm

jaketo
16-02-2007, 05:03 PM
FK, did you save the list as 'hosts' in c:\windows\system32\drivers\etc?

The name should be 'hosts', with no extension.

FlamingKnights
16-02-2007, 11:24 PM
saved it as hosts. merged the two together and ran the superhost file. it changed the name to hosts.orig.

FlamingKnights
08-04-2007, 10:29 PM
doesn't work. downloaded mvps hosts and extracted it. it created a new hosts file instead of adding to the old one. i think my old hosts file was broke. mvps hosts works

Fianor
09-04-2007, 02:54 AM
FK, either read my instructions and follow them exactly or this will not work. I'm not typing them up again, go read the post again. Do not deviate, do not try and do things your own way, it won't work. I wrote the instructions very specifically, becuase if you don't follow them to the letter you will not get the desired effect.

It does work, it's works very well. Stop browsing the instructions and doing one part here and one part there, and follow them. I can't help you if you don't follow directions my man.

FlamingKnights
09-04-2007, 04:00 AM
jaketo told me save the list and merge and i did. it didn't work dont yell at me.

now how would i test to see if it works?

Fianor
09-04-2007, 05:21 AM
Not yelling, just saying.

To test if it's working, you simply go to a website that usually has a lot of ads, if they are there, you didn't do it right. If they are gone you did. If most are gone and you see an occasional ad that isn't blocked, right click on the ad, and give me it's url to add to the list.

FlamingKnights
10-04-2007, 02:48 AM
its working. thanks for the help on IRC. sorry for leaving all of a sudden though but my friend came over.

Fianor
10-04-2007, 04:12 AM
np, glad it's working now.

FlamingKnights
10-04-2007, 10:37 PM
hmmm maybe not...

i have a hosts.orig but not really a hosts

i hit undosuper.bat hosts.orig goes to hosts
i hit superhosts.bat hosts goes to hosts.orig

Fianor
11-04-2007, 12:39 AM
You need hosts.super in there for superhosts.bat to work.

FlamingKnights
11-04-2007, 12:50 AM
i have hosts.super.txt there

jaketo
11-04-2007, 01:15 AM
Fk, rename hosts.super.txt to host.super

And maybe don't get too bogged down with Fianor's scripts.

The goal is just to put Fianor's 'hosts' file into c:\windows\system32\drivers\etc.

The name should be 'hosts', with no extension.

FlamingKnights
11-04-2007, 01:22 AM
ok named it to hosts.super and ran the superhosts.bat script when it was ran it created hosts.orig

i have
hosts -- never ever changes with the scripts
hosts.super -- renamed file
hosts.orig --- goes away with undo and is recreated everytime superhosts is ran

Fianor
11-04-2007, 04:58 AM
Follow the instructions. Read them 10000 more times and follow them.

There are 5 steps, that's it. If you can't follow those 5 steps then this is too complicated for you.

FlamingKnights
12-04-2007, 12:36 AM
maybe my posts are to complicated for you......

Ive read your steps and did what they said.... IT DOESN'T WORK..........

Fianor
12-04-2007, 04:49 AM
It works for everyone who follows the directions exactly as given to them. So far every time you've posted you mentioned either having done something, or not done something as instructed. I'm sorry FK, but it's 5 steps in the directions. If you can't follow them, I can't help you. That's as easy as I can make it.

If you did everything right, you will have some number of files in that directory. ONE of them will be named hosts with no extension. That ONE file is the only file with hosts in it's name that your computer gives a rat's ass about. IF you FOLLOWED THE DIRECTIONS that file will be approximately 2.5meg in size. If you have the 2.5meg hosts file, then you are done. My blocks are working, it's that simple.

You should also have a file named hosts.orig which is your original hosts file renamed for backup purposes. Superhosts.bat renames 2 files and turns off a service. Undosuperhosts.bat swaps the names back to how they were before you ran superhosts and turns the service on. This is all something you would know, if you had read the instructions and it's now been typed at least 3 times. There is a link to the original post in the first post of this thread which goes into detail everything that has been said since you started asking questions.

As I said, go actually read the post, every single word of it. If you are incapable of reading it fully, or incapable of understanding it, then this is simply too complicated of a procedure for you to perform on your computer and you should stop before you lose your internet access by screwing something up. That does not mean you're stupid, I think you're stupid, or anything else bad about you. It just means that this is more than you currently have the computer skills to do.

FlamingKnights
12-04-2007, 11:57 PM
lets see i cleared out my hosts files (some of them) and redownloaded each one of them and it works.

i have a few theories

1. I know how to read instructions
2. My computer didn't fully download one or my computer just hates your hosts file
3. it doesn't help telling me to reread what hasn't worked the first time
4. Maybe my hosts file was crap and just needed cleaned out. (program cleaned it out)
5. i probably have more skills than you in fixing a computer. not hardware though but with virus/trojans/malware and other crap. Which you probably could care less but would like to point out the fact that i do know quite a bit about computers and fixing them.

jaketo
13-04-2007, 10:23 AM
Good job that you've got Fianor's hosts file working FK, that's the main of your thread after all, not running/debugging the script Fianor wrote to accompany his hosts file :)

:closed: