Javascript Mission 7

Learn the basics of how to exploit JavaScript.

Re: Javascript Mission 7

Post by wild_legs76 on Tue Mar 17, 2009 1:39 am
([msg=20076]see Re: Javascript Mission 7[/msg])

OK, i found the answer and passed the level, but I'm sure i did it in a way that wasn't supposed to be done.



That is what I got from the source, and I realized that this is what produces the 'button' and the check for the password. What i don't understand is what the following means:
document[_0x4e9d[0x1]](String[_0x4e9d[0x0]]

i know that _0x4e9d means fromCharcode,write but i'm having trouble understanding how that relates to the 0x1 and 0x0, is that an array? i just need someone to explain what that means. appreciate all of your helps.


EDIT: i figured out what each represents, but why does, document[_0x4e9d[0x1]] (string[_0x4e9d[0x0]]
translate to, d************* (*****.*****ode
instead of, d************ (************de

Where do the periods come from? is that what the brackets do?

[Removed Spoiler -Insomaniacal]




[Edited By: Monica]
wild_legs76
New User
New User
 
Posts: 5
Joined: Tue Mar 17, 2009 1:34 am
Blog: View Blog (0)


Re: Javascript Mission 7

Post by mutants_r_us_guild on Tue Mar 17, 2009 2:08 am
([msg=20078]see Re: Javascript Mission 7[/msg])

wild_legs76 wrote:OK, i found the answer and passed the level, but I'm sure i did it in a way that wasn't supposed to be done.



That is what I got from the source, and I realized that this is what produces the 'button' and the check for the password. What i don't understand is what the following means:
document[_0x4e9d[0x1]](String[_0x4e9d[0x0]]

i know that _0x4e9d means fromCharcode,write but i'm having trouble understanding how that relates to the 0x1 and 0x0, is that an array? i just need someone to explain what that means. appreciate all of your helps.


EDIT: i figured out what each represents, but why does, document[_0x4e9d[0x1]] (string[_0x4e9d[0x0]]
translate to, document.write (string.fromCharCode
instead of, documentwrite (stringfromCharCode

Where do the periods come from? is that what the brackets do?



no... document.write("stuff here"); is how to write stuff to the page in JS
string.fromCharCode(charcodes) is how to convert charcodes to ASCII (ASCII means text)

the periods are there because they are. Thats part of JavaScript syntax. Thats like asking why you need a << with cout << in C++.


[Edited By: Monica]
Image
Image
Image
User avatar
mutants_r_us_guild
Poster
Poster
 
Posts: 246
Joined: Fri May 30, 2008 7:56 pm
Blog: View Blog (0)


Re: Javascript Mission 7

Post by wild_legs76 on Tue Mar 17, 2009 12:57 pm
([msg=20097]see Re: Javascript Mission 7[/msg])

wild_legs76 wrote:OK, i found the answer and passed the level, but I'm sure i did it in a way that wasn't supposed to be done.


That is what I got from the source, and I realized that this is what produces the 'button' and the check for the password. What i don't understand is what the following means:
document[_0x4e9d[0x1]](String[_0x4e9d[0x0]]

i know that _0x4e9d means fromCharcode,write but i'm having trouble understanding how that relates to the 0x1 and 0x0, is that an array? i just need someone to explain what that means. appreciate all of your help.


EDIT: i figured out what each represents, but why does, document[_0x4e9d[0x1]] (string[_0x4e9d[0x0]]
translate to, document.write (string.fromCharCode
instead of, documentwrite (stringfromCharCode

Where do the periods come from? is that what the brackets do?




I got a few more question pertaining to the variable _0x4e9d because I want to fully understand what is happening.

I understand that everything is encoded in HEX, but would it be possible to encode the variable in DEC while encoding the string HEX?

Why are there different methods of encoding characters in HEX, the variable is \x66 while in the string it would be 0x66 followed by a comma?

I noticed that the encoded string does not have quotation marks around it. Is that because the string.fromCharCode is telling that it is a string rather than a variable?

When declaring a variable encoded in HEX why do I have to have each character encoded in \x66 . I mean what is the point of the backward slash. I see that in the string the character would be encoded in 0x66. Why can't I encode the variable using the same notation as in the string i.e instead of \x66\x66\x66\x66.. but when I try that it doesn't produce anything.

I searched for 'multiple variable values' and 'variable arrays' but I got no where. What is it called when declaring variables with multiple strings? as in var _0x4e9d=["\x66\x72\x6F\x6D\x43\x68\x61\x72\x43\x6F\x64\x65","\x77\x72\x69\x74\x65"]


[Edited By: Monica]
wild_legs76
New User
New User
 
Posts: 5
Joined: Tue Mar 17, 2009 1:34 am
Blog: View Blog (0)


Re: Javascript Mission 7

Post by ulcimd1 on Wed Mar 25, 2009 12:13 pm
([msg=20511]see Re: Javascript Mission 7[/msg])

Now that I have finally completed this mission, I know that I did it the hardest and slowest and most tedious way possible. (With an ASCII conversion table, a pen, and a notepad...) I know that I could have written a script to do this conversion for me, but it just wasn't turning out for me. Would anyone that has completed this using a script of their own mind emailing me or PMing me the source of the script so I could see what the HECK I was doing wrong (or what I was doing right, if anything?) If this isn't OK, no biggie, I'm just moving on, but this will irritate me forever!
ulcimd1
New User
New User
 
Posts: 3
Joined: Sun Mar 22, 2009 11:40 am
Blog: View Blog (0)


Re: Javascript Mission 7

Post by variants on Thu Mar 26, 2009 6:41 pm
([msg=20632]see Re: Javascript Mission 7[/msg])

Souns like everyone had difficulty with this?? I just opened the Source and checked out that button code, and the password kind-of jumped out and poked me in the eye, if you will... Is there some reason why it took me a total of 10 seconds and other 5 hours?
variants
New User
New User
 
Posts: 1
Joined: Tue Mar 24, 2009 8:04 pm
Blog: View Blog (0)


Re: Javascript Mission 7

Post by acskurucz on Thu Mar 26, 2009 6:46 pm
([msg=20634]see Re: Javascript Mission 7[/msg])

lol, everyone trying to do a very long solution instead of installing the best firefox addon...
acskurucz
New User
New User
 
Posts: 29
Joined: Wed Jan 14, 2009 8:31 am
Blog: View Blog (0)


Re: Javascript Mission 7

Post by thebrokenbox on Fri Mar 27, 2009 5:02 pm
([msg=20718]see Re: Javascript Mission 7[/msg])

I finally did it, only after giving up and using Firefox and Firebug to figure out what was going on. The pass was in plain sight but I still have no idea what was actually happening. anyone have a link where I can learn what I could have done to solve it myself?
thebrokenbox
New User
New User
 
Posts: 6
Joined: Tue Mar 24, 2009 6:34 pm
Blog: View Blog (0)


Re: Javascript Mission 7

Post by mutants_r_us_guild on Fri Mar 27, 2009 6:09 pm
([msg=20722]see Re: Javascript Mission 7[/msg])

thebrokenbox wrote:I finally did it, only after giving up and using Firefox and Firebug to figure out what was going on. The pass was in plain sight but I still have no idea what was actually happening. anyone have a link where I can learn what I could have done to solve it myself?



The idea is that the browser processes all the hex and such before executing the code. firebug accesses the code the BROWSER uses.. therefor.. the plaintext. you could do it all manually... but... no need to.
Image
Image
Image
User avatar
mutants_r_us_guild
Poster
Poster
 
Posts: 246
Joined: Fri May 30, 2008 7:56 pm
Blog: View Blog (0)


Re: Javascript Mission 7

Post by acskurucz on Sun Mar 29, 2009 6:03 pm
([msg=20862]see Re: Javascript Mission 7[/msg])

mutants_r_us_guild wrote:
thebrokenbox wrote:I finally did it, only after giving up and using Firefox and Firebug to figure out what was going on. The pass was in plain sight but I still have no idea what was actually happening. anyone have a link where I can learn what I could have done to solve it myself?



The idea is that the browser processes all the hex and such before executing the code. firebug accesses the code the BROWSER uses.. therefor.. the plaintext. you could do it all manually... but... no need to.

yeah, :) thats why i said it is easier :D
acskurucz
New User
New User
 
Posts: 29
Joined: Wed Jan 14, 2009 8:31 am
Blog: View Blog (0)


Re: Javascript Mission 7

Post by gud_boy on Thu Apr 02, 2009 6:01 pm
([msg=21076]see Re: Javascript Mission 7[/msg])

i got a button.............check password.........but its not loading!!!!
can nyone plzz help!!!!
gud_boy
New User
New User
 
Posts: 1
Joined: Thu Apr 02, 2009 5:46 pm
Blog: View Blog (0)


PreviousNext

Return to Javascript

Who is online

Users browsing this forum: No registered users and 0 guests

cron