Javascript One
Okay, I like to think of these fun little missions as simple math problems. You use substitution in algebra, right? So we will need to substitute in these.
So whenever we start a mission, it's a good idea to view the source, right? We see some things such as <script language="Javascript">
function check(x)
{
if (x == "cookies")
{
alert("win!");
window.location += "?lvl_password="+x;
} else {
alert("Fail D:");
Check x, eh?
Javascript Two
When you enter this mission, it may say something like "You didn't disable javascript!" This kinda reminds me of Basic 2, just use some common sense.
Javascript Three
I'll try to explain this one, but I will tell you to find Javascript's Order of Operations, or P.E.M.D.A.S. if you will.
I made my own problems just to give you some examples.
- Code: Select all
1. 6 + 7 * 8 = 62
2. 5 * 6 / 2 + 5 = 20
3. 17 % 3 + 22 * 5 = 112
4. (6 + 4) * 5 = 50
5. 6 * 7 / (3 + 4) = 6
Expanation
1. Remember The Order of Operations? Well, we will use them in this example. Lets not worry about the signs just yet. Les just split the numbers up, then follow the operations. Okay. In the operations, it goes like:Parentheses, Exponents, Multiplication, Division, Addition, and Subtraction, right? Well, I don't see parentheses or exponents, but I do see multiplication. 7*8. That would be 56. Now all we have is + 6. If we add 6 to 56, that would give us 62. There's your first one.
2. 5 * 6 / 2 + 5. That seems a little longer. Well, lets get to it. Look for P.E.M.D.A.S....Once again, no parentheses or exponents. I see multiplication...5 * 6. That would be 30. Lets eliminate the 5 and 6 now. That leaves us with / 2 + 5. Division is the next step in P.E.M.D.A.S. Well, I see /2...30/2 would be 15, and that leaves us with + 5. So if we add 5 to 15, we would get 20.
3. This one takes the remainder from dividing 17 by 3. As 3 goes into 17 five times with 2 remaining, this means that 17%3 is equal to 2. Next 22 and 5 are multiplied together to give 110. Finally the results of these two intermediate calculations are added together to give the final answer of 112.
4. We have parentheses in this one, so we go ahead and solve the problem in it. 6 + 4 is 10, and that leaves us with * 5. And if we take 10 and multiply it by 5, we get 50.
5. Well, we see parentheses again. (3 + 4). That leaves you with 7. Now we have no exponents, so lets look for multiplication. 6 * 7. That equals 42. Now lets look for the next operation. Division. We had /(3 + 4), which after we solved the parentheses, discovered it to be / 7. So now we are left with 42 / 7which amounts to 6.
Javascript Four
This one confused me...But, I found with a little looking the answer is right there. Try searching through the entire source. Perhaps left and right as well?
Javascript Five
Okay, you look in the source and see <script language="Javascript">
moo = unescape('%69%6C%6F%76%65%6D%6F%6F');
function check (x) {
if (x == moo)
{
alert("Ahh.. so that's what she means");
window.location = "../../../missions/javascript/5/?lvl_password="+x;
}
else {
alert("Nope... try again!");
}
}
</script>
Well x=moo and moo=unescape('%69%6C%6F%76%65%6D%6F%6F'); and if you research it unescape has spmething to do with javascript.
javascript:(unescape); leads you too function unescape() { [native code] } Native Code, eh? I wonder if '%69%6C%6F%76%65%6D%6F%6F' has anything to do with a Native Code...
Javascript Six
<script type="text/javascript" src="http://hackthissite.org/missions/javascript/6/checkpass"></script>
<script language="javascript">
RawrRawr = "moo";
function check(x)
{
"+RawrRawr+" == "hack_this_site"
if (x == ""+RawrRawr+"")
{
alert("Rawr! win!");
window.location = "about:blank";
} else {
alert("Rawr, nope, try again!");
}
}
function checkpassw(moo)
{
RawrRawr = moo;
checkpass(RawrRawr);
}
</script>
This one tries to lead you all the wrong ways...but look at that src...






