Basic JavaScript hacking

Basic JavaScript hacking

LEVEL 1
You must first obtain the "source code": Set the security of Internet Explorer to high, click on the link to level 1 at the very top of the menu bar, Internet Explorer, the File, Edit, View, etc. Press the "View", "Source".This will take it up a Notepad window. Look for:

passwort=prompt("Please enter password!","") passwort = prompt ( "Please enter password !","")

This ensures a prompt box you can write in, that you enter as a password is stored in the variable "passwort".

if (passwort=="easy") if (passwort == "easy")

This checks on "passwort" (what you type) is "easy", the password for level 1 is when the "easy".

Set back security to medium and click on the link to the Level 1and type "easy".

Use the same procedure to obtain the "source code".

LEVEL 2
Once you have retrieved the Notepad window, there will be a lot of code. Just scroll further down, find this:

var m1, i; was m1, i;
m1="JavaScript"; m1 = "JavaScript";
value=prompt("Please enter password!",""); value = prompt ( "Please enter password !","");
if (value==m1) { if (value == m1) (
window.location=value+".htm"; window.location = value + ". htm";
i=4; i = 4;


What you type being stored in the variable "value",

if (value==m1) if (value == m1)

"m1" is a variable that contains a value. See further up:

m1="JavaScript " m1 = "JavaScript"
The password is "JavaScript".

0 comments:

Need to say something ? Spell it out :)