Skip to content

Instantly share code, notes, and snippets.

@joeangel
Created January 30, 2013 07:48
Show Gist options
  • Save joeangel/4671499 to your computer and use it in GitHub Desktop.
Save joeangel/4671499 to your computer and use it in GitHub Desktop.
var pass=new Array()
var t3=""
var lim=9
pass[0]="CNwdwN4KQcIc2x"
pass[1]="Wc9OmxdUuTsfAH8"
pass[2]="zFnTaXofZ2iEKvx"
pass[3]="UyzKVGXzHkV5RH4"
pass[4]="9jP4JE83vLdMVG42"
pass[5]="46jP4JE83vLdMVG4"
var enablelocking=0
var numletter="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
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 chk(){
t3=''
verification=document.lab.txt.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
input_user=document.lab.txt.value;
if (indicate)
window.location.href=input_user +".php";
else
alert("Try again...");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment