Faith is trying to trick you... she knows that you're tired after all the math works...So, we are facing another java-script challenge.whatever the challenge, we should check all our previous knowledge here.Type in something and hit Check Password.It alerts "Rawr, nope, try again!". Lets view the source code.Right click and select view source.Now right click on the check password button and inspect,we saw the following code,
<button onclick="javascript:check(document.getElementById('pass').value)">Check Password</button>Now we know that whatever we type is send to check function.Go to the source code we already viewed and search for check.
GOT THIS SCRIPT:
<script language="Javascript"> RawrRawr = "moo";
function check(x)
{
"+RawrRawr+" == "hack_this_site"
if (x == ""+RawrRawr+"")
{
alert("Rawr! win!");
window.location = "../../../missions/javascript/4/?lvl_password="+x;
} else {
alert("Rawr, nope, try again!");
}
}
</script>
====================
This is the most cunning part, it misleads us.For people like you and me when we take a quick glance we see our password is compared with ""+RawrRawr+"" and more over in the above line this is written:
"+RawrRawr+" == "hack_this_site"
this is enough to mislead.If you watch it closely actually x is not compared with +RawrRawr+ more over its compared with RawrRawr in the start and end "" is added with it but "" is null so we only need value of RawrRawr and you can clearly see the value in the script itself.!
Comments
Post a Comment