on July 27, 2009 by Adam in Technology, Comments (1)

Why Javascript is So Fun

Javascript is an amazing nifty little tool. Let me show you some examples, if you want to quickly look at someone’s website’s cookies, all you have to do is type the following into the URL bar: “javascript:alert(document.cookie)};. A link is given as an example. There are, of course, more naughty things it can be used for such as form injection and such. My personal favorite is the infinate loop.

The infinate loop can be manually created by typing the following into the URL bar:

javascript:while(1){alert(“hello”);}

Tags:

1 Comment

  1. Adam

    July 27, 2009 @ 11:27 am

    javascript:var x = 1;while(x<1000000){alert(x);x=x+x}document.write(“done!”);

Leave a comment

XHTML: Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>