How to Crash Internet Explorer With One Line of Code

30 08 2006

How to Crash Internet Explorer

All credit goes to Stuart Brown on this little line o Java.

<script>for (x in document.write) { document.write(x);}</script>

He explains:

Ever wish you could make your friends and family switch away from Internet Explorer? Perhaps the ability to make it spontaneously crash (and I mean totally crash) just by sending them a link might sway them…

I spend a lot of time working with both JavaScript and Internet explorer, and a while back (probably about a year ago now) I was trying to debug a script to make it work in both Firefox and Internet Explorer. As part of the diagnostics, I wrote a script to iterate through objects and print their properties. As it happens, I tried this on the ‘document.write’ method, used to output text to the document. I forget the exact reason, but I do remember the outcome.

Firefox handles the code perfectly – but Internet Explorer, on the other hand, throws an exception and unceremoniously quits. Considering the script in question is one line long, or 61 bytes (about 0.06Kb), and that it can be embedded into any webpage, it’s rather worrying.

Why won’t IE fix this type of shit that can really screw over the average end user? That’s what I want to know.


Actions

Information

2 responses

1 09 2006
Azag

Crash me’s are funny bits of code. Well I like to call them this some people have other names for them like ‘browser crasher’ or security community will give it an ‘exploit’ name of possible variance, the way anti-virus industry can’t decide on a universal naming scheme, and MS will give it an MS0X-XXX number (and a KB####### “number” for knowledge base as well) since it is there problem really if they even decide to acknowledge it at all since it some times takes them years before admitting flaws that are obvious to the end user even with proof.
It’s fun to kill your browser, when the code is safe at least.
Yet more fun to send to linked code to a dear friend to show you care. =)Well let’s see if they can or will patch this just for laughs. I love the fact that it is so darn short since it will make it rather hard to pick out of a web page without a really keen eye. 8-} Interesting stuff indeed. I should really sleep before I comment next time…😄

– Azag

15 06 2012
Ronaldinho

Very good written article. It will be supportive to anybody who employess it, including me. Keep doing what you are doing – i will definitely read more posts.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: