javascript mission 3

Learn the basics of how to exploit JavaScript.

Re: javascript mission 3

Post by jm970 on Thu May 29, 2008 2:53 pm
([msg=3526]see Re: javascript mission 3[/msg])

---Edited---

Posting answers is not allowed. User is now banned for second offense.
jm970
New User
New User
 
Posts: 2
Joined: Thu May 29, 2008 2:40 pm
Blog: View Blog (0)


Re: javascript mission 3

Post by blackprince491 on Thu May 29, 2008 8:22 pm
([msg=3607]see Re: javascript mission 3[/msg])

thank you
“If I lose the light of the sun, I will write by candlelight, moonlight, no light. If I lose paper and ink, I will write in blood on forgotten walls. I will write always."
blackprince491
Poster
Poster
 
Posts: 209
Joined: Thu May 15, 2008 12:23 pm
Blog: View Blog (0)


Re: javascript mission 3

Post by hejjagheterjens on Wed Jun 04, 2008 3:26 pm
([msg=4005]see Re: javascript mission 3[/msg])

I really hope this isn't a spoiler...
A lot of people seem to think that 'foo % 8' means '8% of foo' or 'foo% of 8' or even 'foo/8'.
Google it.
hejjagheterjens
New User
New User
 
Posts: 1
Joined: Wed Jun 04, 2008 6:42 am
Blog: View Blog (0)


ok i REALLY REALLY need some help *may contain TINY spoiler*

Post by shanebane363 on Sun Jun 08, 2008 10:42 am
([msg=4274]see ok i REALLY REALLY need some help *may contain TINY spoiler*[/msg])

:ugeek: ok I have gotten like 3 or 4 different numbers...and tried MANY different calculations. now keep in mind 8% is equal to 0.08. i have tried (5+(6*7)0.08*2, ive tried 5+6(7*0.08*2), 5+6*7(0.08*2), etc. now i understand that x.length == moo, so it doesnt matter what the password i so long as the length is the same. i have gotten 3,4,5,31,32,33,54,and 27 character answer to the math (assuming the decimal is counted in the answer itself). i have tried the javascript:alert(var); code and it does nothing on the firefox browser... im wondering if its just the browser or if that was done on purpose, so that the answer couldnt just be given...

now, i know the answer is just staring me in the face laughing is fool head off at me...but i just...cant seem to grasp it...

If anyone can help me out at all, i would really appreciate it...

--Shane :ugeek:

PS. am i just thinking too hard or too complicated?
shanebane363
New User
New User
 
Posts: 8
Joined: Sun Jun 08, 2008 10:27 am
Blog: View Blog (0)


Re: javascript mission 3

Post by Dogt03 on Mon Jun 09, 2008 12:15 am
([msg=4326]see Re: javascript mission 3[/msg])

*Possible spoiler*

If you haven't gotten it by now think about x.length and what it might mean.

If this is a spoiler pm me and I will change it right away.
and btw I'm pretty sure that the lightning bolt means that somebody has posted in that thread recently.

*edit* Also check to make sure you have js enabled otherwise you will never know if your getting the question right or wrong.
Dogt03
New User
New User
 
Posts: 3
Joined: Tue Jun 03, 2008 11:05 pm
Blog: View Blog (0)


Re: javascript mission 3

Post by berstbest on Mon Jun 09, 2008 4:50 am
([msg=4333]see Re: javascript mission 3[/msg])

Hi shanebane,
I think that you're on the right track. But youd have a big mistake there. In programming-languages the % doesn't mean percent. It's the modulo operator. a%b means divide a/b and take the rest.
for example: 5 % 3 = 2 (as 5/3 = 1 with the rest 2)
Now do your calculations again and you should make it.
berstbest
New User
New User
 
Posts: 8
Joined: Sun Jun 08, 2008 1:47 pm
Blog: View Blog (0)


Re: javascript mission 3

Post by mosshack on Mon Jun 09, 2008 5:40 am
([msg=4335]see Re: javascript mission 3[/msg])

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:");
}
}


if (x.length == moo)

Firstly You will Want To Notice This Line Here, This Basically sets The Mission.

var foo = 5 + 6 * 7
var bar = foo % 8
var moo = bar * 2
var rar = moo / 3


You will then need to move onto this section here, Read and follow basically. I cant make it any simpler than that.
If you stil ldont understand it i recommend using www.htmlite.com to learn javascript. It really isnt a hard mission even if oyu dont know javascript at all.
mosshack
New User
New User
 
Posts: 18
Joined: Wed Apr 30, 2008 4:59 pm
Blog: View Blog (0)


Re: javascript mission 3

Post by podolop on Fri Jun 13, 2008 2:28 pm
([msg=4710]see Re: javascript mission 3[/msg])

When i got it It said level up but in the source it should say win???? :?
podolop
New User
New User
 
Posts: 2
Joined: Fri Jun 13, 2008 2:21 pm
Blog: View Blog (0)


Re: javascript mission 3

Post by Justjealouse on Mon Jun 16, 2008 7:45 pm
([msg=5003]see Re: javascript mission 3[/msg])

I hope this isnt too much of a spoiler because it actually takes javascript knowledge but what i did since i couldnt figure out the whole alert thing (it didnt work for me for some reason) is i made my own webpage and c/p the code onto my page. Then i just simply wrote document.write(moo)
Justjealouse
New User
New User
 
Posts: 6
Joined: Thu May 29, 2008 8:18 pm
Blog: View Blog (0)


Re: javascript mission 3

Post by Mindzai on Wed Jun 18, 2008 11:44 am
([msg=5145]see Re: javascript mission 3[/msg])

OK maybe im being dumb here.

I know what moo is (not thrown by the modulus), and I know what x.length means. I enter my answer of x characters and i even get the query string ?lvl_password={my_pass} appended to the URL so I must have entered the TRUE branch of the IF statement - yet I still get an incorrect password alert - not even the 'Fail D:' message...

EDIT: nvm, a hint for anyone else thats getting stuck here remember that mathematical operators have an order of precedence :)
Mindzai
New User
New User
 
Posts: 7
Joined: Tue Jun 17, 2008 4:06 pm
Blog: View Blog (0)


PreviousNext

Return to Javascript

Who is online

Users browsing this forum: No registered users and 0 guests