Axino.net

JavaScript Challenge 9 :: timer

by Arxleol on Wednesday 02.06.2010, under hellboundhackers.org, javascript, tutorial

In this challenge we are faced with timer.  As soon as you’ve seen this challenge you figured out you have to reset timer somehow.

Of course one probable solution would be to wait until timer reaches zero value.

But that defies the point. If you examine code you will find following script:

<script>
var c = 34200;
var p = "%68%6F%77%73%6C%69%66%65%3F%65%61%73%79%2E%00";
var a;
fc();
function fc()
{
if(c>0)
{
 document.getElementById("say").innerHTML = "<b><big>Please wait " + c + ' seconds.</big></b>';
 c = c - 1;
 setTimeout("fc()", 1000)
} else {
 a = unescape("%33");
 document.getElementById("say").innerHTML = "Your password is: " + unescape(p-a) + unescape("%3C%66%6F%72%6D%20%61%63%74%69%6F%6E%3D%27%69%6E%64%65%78%2E%70%68%70%27%20%6D%65%74%68%6F%64%3D%27%50%4F%53%54%27%3E%0D%0A%45%6E%74%65%72%20%50%61%73%73%77%6F%72%64%3A%20%3C%69%6E%70%75%74%20%74%79%70%65%3D%27%74%65%78%74%27%20%6E%61%6D%65%3D%27%70%61%73%73%27%20%73%74%79%6C%65%3D%27%74%65%78%74%62%6F%78%27%3E%3C%62%72%3E%0D%0A%3C%69%6E%70%75%74%20%74%79%70%65%3D%27%73%75%62%6D%69%74%27%20%6E%61%6D%65%3D%27%73%75%62%6D%69%74%27%20%76%61%6C%75%65%3D%27%43%68%65%63%6B%20%79%6F%75%20%61%6E%73%77%65%72%27%20%73%74%79%6C%65%3D%27%62%75%74%74%6F%6E%27%3E%0D%0A%3C%2F%66%6F%72%6D%3E%00");
}
}
</script>

This is where Firebug comes in really handy. Now open Firebug and select DOM tab in here you should search for variable c. Because variable c contains number of seconds till we receive our password. And now when you find variable c in DOM tab change its value to something low for example number 5. Now if you’ve done everything correctly you will notice that counters switched to 5 and is counting down. When it reaches 0 you will receive password:

Your password is: NaN

Similar Posts:

:, , , , , , ,
No comments for this entry yet...

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Archives