...

View Full Version : Help with login script



Themself
12-31-2010, 03:57 AM
Could somebody please help get this login script working(I know it's vulnerable):

<html>
<body>
<script type = "text/javascript">
function validate() {
var F_F_F2318797AS$ = document.GENERATOR.color.value;
var color = "#FFFF9B"
if (F_F_F2318797AS$ == color && 1==1 && 2==2) {
alert ("Login was successful");
return false;
}
else{
alert ("Incorrect password");
return false;
}
</script>
<h1> Welcome to the realm of <big style="color:red">confusing</big> Javascript <h1>
<form name = "GENERATOR">
ENTER PASSWORD <input type="password" name="color">
<input type="button" value="Submit" name="Submit" onclick= "validate()">
<
</form>
</body>
</html>

Thanks in advance!

Nile
12-31-2010, 04:01 AM
You aren't closing your function (I also cleaned up a lil)


<html>
<body>
<script type = "text/javascript">
function validate() {
var F_F_F2318797AS$ = document.GENERATOR.color.value;
var color = "#FFFF9B"
if (F_F_F2318797AS$ == color && 1 == 1 && 2 == 2) {
alert("Login was successful");
return false;
} else {
alert("Incorrect password");
return false;
}
}
</script>
<h1> Welcome to the realm of <big style="color:red">confusing</big> Javascript <h1>
<form name = "GENERATOR" onsubmit="return validate();">
ENTER PASSWORD <input type="password" name="color">
<input type="button" value="Submit" name="Submit" onclick= "validate()">
</form>
</body>
</html>

Themself
12-31-2010, 04:02 AM
Wow
/facepalm
Thanks!

Nile
12-31-2010, 04:07 AM
No problem!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum