JavaScript bei HackIts (source code denied)

hi und hallo

ich habe schon lange nichts mehr gemacht mit Hackits un bin dem nach auch aus der übung nun hab ich folgendes problem das ich nicht lösen kann

Code:
<!-- source code denied //-->

<html><head>
<meta name="robots" content="noindex,nofollow">
</head><body bgcolor="#000000"><center><font face="veranda" color="blue"><h1>CONGRATULATIONS!</h1><br><br>Now you can sign the guestbook!</font><br><br><br><a href="http://gb.webmart.de/guestbook.cfm?bookid=506441" target="_blank" onFocus="this.blur()"><img src="fedkling.gif" border=0></a><br><br><br><br><br><font face="veranda" color="red"><b>SECURITY LEVEL 5</b></font><br><script language=JavaScript>

<!--
function abfrage1() {
var code = new Array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z");

Eingabe = window.prompt("Password : ","");

if(Eingabe != ((code.length)*100)/2-66)
        {
        window.location.href="denied.htm";
        }
else
         window.location.href=Eingabe+".htm";
}

// -->
</script>

<p><a href="javascript:abfrage1()" onFocus="this.blur()"><img src="enter.gif" border=0></a></p><IMG SRC="http://counter.digits.com/wc/-d/4/-h/nummervier" ALIGN=middle
      WIDTH=60 HEIGHT=20 BORDER=0 HSPACE=4 VSPACE=2>
</body>
</html>

Ich hoffe Ihr könnt mir weiter helfen weil ich wieder weiter kommen möchte als bis zum 5ten LVL
 
Eigentlich sollte man hackits selber lösen aber ich will mal nicht so sein.
als erstes brauchen wir die passwort abfrage:
Code:
if(Eingabe != ((code.length)*100)/2-66)
nun müssen wir nur noch code.lenght einsetzten, was die länge des arrays darstellt, also 26.
daraus ergibt sich ((26)*100)/2-66).
ergo ist das gesuchte passwort 1234

MfG
 
Javascript Hackits kann man meist über eine msgbox (alert) ganz einfach lösen:


Zuerst sucht man sich die PW-Abfrage.

Code:
if(Eingabe != ((code.length)*100)/2-66)
        {
        window.location.href="denied.htm";
        }
else
         window.location.href=Eingabe+".htm";
}

Nun bastelt man sich einfach eine alert mit dem richtigen PW rein:

Code:
if(Eingabe != ((code.length)*100)/2-66)
        {
        alert((code.length)*100)/2-66);
        }
else
         window.location.href=Eingabe+".htm";
}
Jetzt wird bei falschem PW das richtige in einer Msgbox angezeigt.

Edit:############
Gut, damit man das PW nicht mühsam abtippen muss, kann man das ganze auch noch gleich aufrufen:
Code:
if(Eingabe != ((code.length)*100)/2-66)
        {
        window.location.href=((code.length)*100)/2-66)+".htm";
        }
else
         window.location.href=Eingabe+".htm";
}


Gruss
IsNull
 
Zurück
Oben