Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Working Password Gate?

Status
Not open for further replies.

darkprince

Programmer
Jun 4, 2002
165
AU
hello i found a password gate on the internet but i dont know if it will work as i sought of edited it a bit and can some1 plz tell me if it will work and where do i put the login url in it? cya and thanks in advance

<HTML>

<script>

var pass=new Array()
var t3=&quot;&quot;
var lim=7
pass[0]=&quot;muska_flip&quot;
pass[1]=&quot;battlesick&quot;

//configure extension to reflect the extension type of the target web page (ie: .htm or .html)
var extension=&quot;.html&quot;
var enablelocking=0
var numletter=&quot;0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_&quot;
var temp3=''
var cur=0


function max(which){
return (pass[Math.ceil(which)+(3&15)].substring(0,1))
}

function testit(input){
temp=numletter.indexOf(input)
var temp2=temp^parseInt(pass[phase1-1+(1|3)].substring(0,2))
temp2=numletter.substring(temp2,temp2+1)
return (temp2)
}


function submitentry(){
t3=''
verification=document.password1.password2.value
phase1=Math.ceil(Math.random())-6+(2<<2)
var indicate=true
for (i=(1&2);i<window.max(Math.LOG10E);i++)
t3+=testit(verification.charAt(i))
for (i=(1&2);i<lim;i++){
if (t3.charAt(i)!=pass[phase1+Math.round(Math.sin(Math.PI/2)-1)].charAt(i))
indicate=false
}
if (verification.length!=window.max(Math.LOG10E))
indicate=false
if (indicate)
window.location=verification+extension
else
alert(&quot;Invalid password. Please try again&quot;)
}
</script>



<table border=&quot;1&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#FFFFBD&quot;>
<tr>
<td width=&quot;100%&quot;><form name=&quot;password1&quot;><div align=&quot;center&quot;><center><p><strong>Enter password: </strong><input
type=&quot;text&quot; name=&quot;password2&quot; size=&quot;15&quot;><br>
<input type=&quot;button&quot; value=&quot;Submit&quot; onClick=&quot;submitentry()&quot;></p>
</center></div>
</form>
</td>
</tr>
</table>

</HTML>
 
Hi,

If you want a seriuos password protected page then use .htacess not Javascript. If I were to go to your site and saw your Javascript password page, I could view the source and take the password.

Hope this helps! NATE
spyderix.gif

design@spyderix-designz.com
 
ok thanx i thought that would be the case but i figured that the people who viewed my page would not be very good at computers lol

ok ive got a question for you SPYDERIX how do i work .htacess see im learning html and i haven't learned that yet, can you refer me to where i can find out how to do it or you tell me? thanx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top