help!
need help what is the password in this codse:
<SCRIPT LANGUAGE="JavaScript"> function pw() { var d1, Eingabe; d1=window.document.linkColor;
Eingabe=prompt ("Please enter password");
if (Eingabe==d1)
{
window.location.href=String.fromCharCode(65,66,67)+".htm";
}
else
{
window.location.href="denied.htm";
}
} </SCRIPT> <p><a href="javascript:pw()" onFocus="this.blur()"><img src="enter.gif" border=0></a></p> <IMG SRC="http://counter.digits.com/wc/-d/4/-h/zwei" ALIGN=middle WIDTH=60 HEIGHT=20 BORDER=0 HSPACE=4 VSPACE=2>
d1=window.document.linkColor;
Eingabe=prompt ("Please enter password"; if (Eingabe==d1)
That's all you need. The d1 equals the document's link color and the Eingabe, which is the password prompt, only accepts that variable. Although, there are other ways of completing this, this is probably the quickest way. Also, i seen this somewhere beforeā¦
Something I've found useful when dealing with javascript security is to look for the variable that holds what your input should equal. Then, instead of reversing the whole thing (trust me, this CAN be a hassle), I just copy the script's source, then take out all the checking/prompting part and throw in a
document.write(pass_variable);
Run the page and it'll print the password out for you ;)
Xero wrote: Something I've found useful when dealing with javascript security is to look for the variable that holds what your input should equal. Then, instead of reversing the whole thing (trust me, this CAN be a hassle), I just copy the script's source, then take out all the checking/prompting part and throw in a
document.write(pass_variable);
Run the page and it'll print the password out for you ;) Another thing that works is:
alert(pass_variable);