Parts Catalog Accessories Catalog How To Articles Tech Forums
Call Pelican Parts at 888-280-7799
Shopping Cart Cart | Project List | Order Status | Help



Go Back   PeachParts Mercedes-Benz Forum > General Discussions > Off-Topic Discussion

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 04-23-2007, 01:30 AM
Registered User
 
Join Date: Oct 2005
Posts: 4,263
Banner ads make me want to kill

Kill the ads, that is. Especially those that flash.

This site is nice enough to give me a "low bandwidth" option, which doesn't display banner ads. But I do buy parts from Fastlane, so I hope they forgive me for using this option. I also kill avatars and signatures, because I can.

But most sites do not give you such options, and don't want to. You can take control, using tricks of DNS resolution.

There is a file on Windows XP machines named:
C:\WINDOWS\system32\drivers\etc\hosts

I think the top-level directory is WINNT on Win2k, but there's still a system32\drivers\etc subdirectory with a file called "hosts" with no extension.

This contains hostname to IP address mappings.

The key here is to map ad servers to your local machine, assuming that your local machine does not serve web requests; if it does, point it to some machine that does not. Then when your browser tries to access the advertisement, it attempts to connect to the local machine and immediately gets an ICMP port unreachable message and goes on.

The file contains lines of this form:
127.0.0.1 a.trivalfusion.com
One IP address and hostname per line. I use a tab character between them, but spaces work too. # is the comment character for this file.

The first part is the IP address of your machine (all machines have this IP as a local address) and the second is a hostname. With that in my "hosts" file, anytime I try to access a page from "a.tribalfusion.com" I get nothing back. But that's fine, since there is nothing there but advertising.

Now to find what hostnames to put in the file, mapping to your localhost. First, download a program called "Ethereal." A google search will find the download page quite easily. This is a network capture and protocol analyzer. It's a really neat tool if you do network programming (which I do) but it's also useful for things such as this.

Install and run it. Select "Capture | Options" in the title bar, and set the button for "Update list of packets in real time," ensure that the "Interface" box at the top reflects your ethernet interface, and hit the "Start" button.

In the "Filter" box on the "main" page, type "udp.port==53" and hit enter. This is the filter to show only DNS lookups. You want to subvert some of these, and Ethereal will show which ones.

With Ethereal running with that filter set, go to your favorite web site which has annoying advertisements. (If you visited the page very recently, the addresses will be cached, so wait a few minutes in that case.) Ethereal will show all DNS lookups (but with the filter, won't show everything else so you can actually catch them).

Now you simply watch to see what lookups are being performed. It should be obvious what sites are required for the page that you are viewing, and what reflect advertising. You'll often see spaces with error messages displayed instead of ads, but I'll take it. If you kill something that you need, you'll get an error message specifically for that, so you can take it back out of the "hosts" file.

Reply With Quote
  #2  
Old 04-23-2007, 04:39 AM
ForcedInduction
Guest
 
Posts: n/a
Thanks for the tip.

I like the no graphics option. Even with 8mbps cable it speeds things up a bit.

Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:59 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0
Copyright 2024 Pelican Parts, LLC - Posts may be archived for display on the Peach Parts or Pelican Parts Website -    DMCA Registered Agent Contact Page