This mission is really simple. After checking out the source code you will come to know it.
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!"); } }
In the first line, variable RawrRawr
has the value ‘moo’. Then in the function there is a weird command "+RawrRawr+" == "hack_this_site"
, which is just to confuse you, so don’t worry. And you will also find that, like every other mission by now, this one also takes the value entered and passes it to function check and compares it with RawrRawr
which still has the value ‘moo’.
Note: ‘+’ in javascript is used to concatenate two strings. So when we write ""+RawrRawr+""
, we are just concatenating two empty strings with RawrRawr
and compare it to user input. So the answer is still the same, moo.
Good luck!!!
Latest posts by Abhishek Gupta (see all)
- PHP syntactic sugar code example - September 5, 2021
- Python convert random string date format to Datetime - July 12, 2021
- Laravel Custom Exception Handlers - March 28, 2019
Thanks! I knew that part was trying to confuse but I managed to guess moo which I didnt understand till now!