Javascript Missions 3 :: Math time
by Arxleol on Monday 17.05.2010, under hackthissite.org, javascript, tutorial
Let’s see how faith intends to check our math skills
As you can see we have source code in front of us now let’s just crack it:
var foo = 5 + 6 * 7 var bar = foo % 8 var moo = bar * 2 var rar = moo / 3 function check(x) { if (x.length == moo) { alert("win!"); window.location += "?lvl_password="+x; } else { alert("fail D:"); } }
As you can see length of input is compared to variable moo.
Variable foo has value of 47. This should be straightforward math. Variable bar has value of 7 because % percentage sign represents remainder of 47 divided by 8. Read more about modular arithmetics. And therefore variable moo has value of 14.
To win we have solution string of length 14 characters and this one is really simple: aaaaaaaaaaaaaa

Sunday 23.05.2010 on 00:00
[...] Javascript Missions 3 :: Math time [...]