HOW-TO Beat the ADS on FWP (Free Webpage Providers) ?

http://smog.cjb.net
Version 1.0

Oct 5 1999 © 1999 SmoG Alert.


INDEX :

Why ?
1 - Pop-ups
1.1 - Removing the Pop-ups
1.2 - Killing pop-ups when they appear
2 - Banners
3 - Make stuff invisible (banners, counters, buttons, text, etc)
4 - Frames
5 - Remove end
6 - Avoiding rule scanners
7 - Make sure users can reach you page
8 - Contributions / Bibliography
9 - Copyright

Why ?

1 - Pop-ups :

1.1 - Removing the Pop-ups :

This technique makes the browser ignore the pop-up.

The pop-up is a javascript code, so if we surround the place where the server inserts this code with a <noscript> or a <!-- //--> (comment) tag the pop-up will be ignored.

· Look at the example for the <!-- (comment) tag:

<!-- Start code //-->
<NOSCRIPT>
<!-- <BODY> --> // the Decoy body tag, it can at the beginning of the head tag too
</NOSCRIPT>
<TITLE>Your Title Here</TITLE>
</HEAD>
<BODY> // The real body tag

· Look at the example for the <noscript> tag:

<!-- Start code //-->
<NOSCRIPT>
<BODY> // the server will insert their code right before or after the <body> tag so any javascript will be ignored
</NOSCRIPT>

· A Meta tag may be usefull when the server uses a </noscript> before the zone where they pop-up will be inserted, because the <noscript> technique is disabled:

<HTML>
<META popupssuck="
<HEAD>
<TITLE>Your Page Title</TITLE>
</HEAD>
<BODY>
<!-- your homepage-->

· A simpler way in case you don't need to open any windows using javascript is to include this code in every page of the site.

<!-- Start code //-->
<SCRIPT LANGUAGE="JavaScript">
<!--
function open () {return true;} // this will redefine the open function.
//-->
</SCRIPT>

· The jawascript method is used when the server inserts a </noscript> before the pop-up, this way the <noscript> trick won't work so if I insert a "<SCRIPT LANGUAGE="JawaScript">" (notice that jawascript can be anything, it's only convenience is looking like javascript) will disable the rest of the script.

<SCRIPT LANGUAGE="JawaScript"> // just insert this line before the place where the pop-up will be.
<!-- -->
</noscript>
<script language="JavaScript">

· This script by "the_omega" allows the opening of all urls in new windows except one called popup.html .

<SCRIPT>
<!--
function ScreenIt(url,name,parm){
if(url.indexOf("popup.html")!=-1) return false;
return window.Xopen(url,name,parm);
}
window.Xopen=window.open;
window.open=ScreenIt;
//-->
</SCRIPT>

1.2 - Killing pop-ups when they appear :

· When a pop-up name open it will have a name, what this script does is open a window with that name and closing it right after.
"w" is name of the window do open and close, this can be anything w is just an example.
To know the "Popupname" you must look at the code the server inserts in your page and get it there.
The window.focus() is optional, it will only make this window become active when the popup closes.

<!-- Start code //-->
<script language="JavaScript">
w=window.open("http://smog.cjb.net","Popupname","");
w.window.close();
window.focus();
<!-- End code //-->


2 - Banners :

· If you need to remove a banner in a place of your choice use the make invisible technique, if the server inserts the code in the end of the document just use "remove end" of document technique. You can also replace the banner with the image you want.

· If the banner is placed automatically on the beginning of the page, the best thing to do is have a layer filling the space occupied by the ad. This banner can contain a image or a solid color background.

<LAYER top="27" name="top"><center>
<IMG SRC="http://smog.cjb.net/logo2.gif" width="490" height="95"></center>
</LAYER>

· If the banner is a shtml code like

<NOSCRIPT>
<!--#geoguide-->
</NOSCRIPT>

· It's possible to change the banner to any image you want, your logo or maybe a 1x1 transparent gif .

Change the "src" property of the image by refering to the image number on the page, if the banner is on top it's number must be 0 if it's the last image on the page you must count all the images, or in case the banner has a "name" property you can replace the "images[0]" with the "name" value of the image. Just insert this script after the image you want to replace.

<script language="JavaScript">
<!--
document.images[0].src='banners_suck.gif';
-->

</script>


3 - Make stuff invisible (banners, counters, buttons, text, etc) :

· This technique is possible using layers, the variables don't really matter the important this is the "visibility=hide" part.
Just add your invisible stuff to a layer like this:

<ilayer id="invisible" z-index="1" visibility="hide" >Your banners,counters, text here</ilayer>

The "Your banners,counters, text here" will be invisible to everyone viewing your page but not for their browsers.


4 - Frames :

· This code checks for the existence of frames, if they exist the page where you put this code becomes the only page in the browser.

<script language=JavaScript>
if(top!=self){top.location.href=self.location.href;}
</script>

· or have the first page of your site point to a second one with this code on the body:

<body onLoad="window.open('http://smog.cjb.net/html/index.htm','_parent')">

By opening in a _parent window the browser will go to the previous window in the history, this is the one just before the frames and open the site there.

Sometimes the location that FWP give you is just an alias to your real page location. They use this aliasing method to make users load a frame, if you know where the real page is located just make some redirector point there.

Just look at the xoom example

"http://members.xoom.com/_XOOM/username/" is your real page location and "http://members.xoom.com/username/" is the location they use to make viewers load the adframe.

To discover the real location of your site just press right mouse click on your page and look in the "info" panel.


5 - Remove end :

· Sometimes servers add stuff in the end of the pages, to remove it just place <!-- or <noscript> before the place where they're publicity is going to be, the <!-- comments the rest of the file making it only visible when viewing the source, the <noscript> is used if the ad comes in form of javascript, disabling it.


6 - Avoiding rule scanners :

· Some servers scan .htm files for suspect code, spliting popups names is useful when escaping this scanners.

var Popup="po"+"pWind"+"ow"; window.onError=null; tasteful=window.open(newpage,wndname,"");

· You should also encode your code in hexadecimal format. When it is encoded put it like this

<SCRIPT>
<!--
eval(unescape("your code in hex here"))
//-->
</SCRIPT>


7 - Make sure users can reach you page:

When/If the FWP services track you they may delete your pages and the usual viewers won't be able to know the next location of your site, so you better use redirectors. You can find a list of redirectors that don't use ads on my site.

With redirectors your site will look like http://smog.cjb.net , where cjb.net is the name of the redirector and smog is the name of my site.


8 - Contributions / Bibliography :

Popups must die
Counterexploitation and the Free Webpage Provider
the_omega


This is the end, I hope this tips help anybody make better, or at least less annoying web sites.
Anybody that wishes to contribute to this article should e-mail smogzer@iname.com


COPYRIGHT

This document is Copyright © 1999 Smog Alert smogzer@iname.com . It may be freely redistributed in its entirety, including the whole of this copyright notice, but may not be changed without permission from the author. Dispensation is granted for copying small verbatim portions for the purposes of reviews or for quoting; in these circumstances, sections may be reproduced in the presence of an appropriate citation but without this copyright notice.