The net can be a dangerous tool. Those of us with dial-up services face the risk that a badly designed (especially deliberately so) website may cause problems, in the worst case a fatal exception resulting in the need to reconnect.

Should you encounter webpages which freeze, it may be necessary to debug them. It's generally a good idea to remove freeze-tags before distribution on the net.

Alternatively, you may wish to use these to screw with other people. This is pretty immature, but hey, there is no tool that cannot be used as a weapon.

The first of these is a simple JavaScript chunk which will chew up memory quite quickly, eventually causing a noticeable slowdown. The immediate window will freeze due to the unprimed loop.

<Script>
Var foo="a"
While (1){
foo=foo+foo
}
</Script>
Essentially, in this case, the $tring foo gets longer and longer, as "a"'s are added. "aaa", "aaaa", "aaaaa" and so forth. Note that adding additional "+foo"'s won't make it any more damaging.
The first problem with this is that later versions of JS will pick up the unending loop. It is therefore a good idea to lend purpose, in this manner:
<HTML>
<Head>
<Script>
Var foo="a"
While (1){
foo=foo+foo
document.textbox0r.value=foo
}
</Script>
</Head>
<Body>
<Input name="textbox0r" type=text>
</body>
</HTML>
90% of the time this will keep the window open and running, and before long you will have a non-responsive browser to gaze apon. If you are (un)lucky, you'll also wind up with memory conflicts all over the place, and be forced to reboot.

Now, that is just a simple example of how to make things freeze with JS. There are easier ways, but we wouldn't learn anything from that. Now for the interesting stuff: how to invoke a Blue Screen of Death. In Windows 98, there is a very famous flaw, that being the old c:\con\con glitch. But no one would be stupid enough to type it in themselves more then once, right?

<Img Src="file:\\C\con\con">
or
document.location.href="file://c:/con/con"
It's that simple. If a html file is causing your 98 to expel smoke by simply right-clicking it in My Computer (It tries to display a thumbnail, you see), chances are it is a tag similar to this. Just take it out, or insert itself into your favourite forum signature. *Cough*... least favourite. Note that c:\nul\nul will do the same thing, more or less. Some really interesting possibilities arise when you set someone's background to con\con, or include it as a startup item. But I digress.
file:/dev/mouse will also work nicely for some mischief in Netscape, but be aware that almost all of these have patches available. However, it is still a problem, since anyone still running Windows 9x is either unlikely to have access to such a patch, or has undergone a relatively recent install, like me. There are similar methods to cause hurt to NT/2000/XP, but these are a little more obscure.

Inserting an image into a webpage which is larger than the physical memory of the machine viewing it, and scaling it down using the width and height portions of the image tag can apparently take down a computer quite well.

<Img Src="fricking_enormous.gif" Width=15 Height=15>
However, a file so huge as to do this would probably require a fast network connection to view within the space of a few hours... so it's unlikely that this problem would arise with anything on the internet. If you can afford a broadband connection, chances are you can afford a decent quantity of memory, too.

If something you have written; particularly anything containing a lot of JS or possibly VBScript if you're getting kickbacks; causes problems, odds are that the problem lies in:

Most of this seems pretty obvious, but if you didn't know before, you do now. So go try some of these methods, and submit a link to Yahoo!.


Thanks to lj for giant image freezing info.

Log in or register to write something here or to contact authors.