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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you crack this code?

Status
Not open for further replies.

meeble

Programmer
Sep 24, 2002
137
0
0
GB
My friend uses this code on his paysite for people with a password. I've told him I think it's too weak as it's JavaScript but he says it's fine. Can anyone crack this or is it ok?

Can you find out the password? I admit, I can't...

<script>

var pass=new Array()
var t3=&quot;&quot;
var lim=5
pass[0]=&quot;SKGGk6Y6CObrhkR&quot;
pass[1]=&quot;hUYRL9vGfkjpnfu&quot;
pass[2]=&quot;kYU9MqqvbPMEXcZ&quot;
pass[3]=&quot;DwyysHn5vwZML1f&quot;
pass[4]=&quot;5ehoWp1uSs60U1IF&quot;
pass[5]=&quot;62ehoWp1uSs60U1I&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>
 

I thought this thread would be crap so I've ignored it. It gets more interesting near the end though. :-D

I'd like a look-see at that before you post up the answers too. (Not very hopeful but it looks interesting.)
 
I don't have a crack for the last bunch of code I posted. I'm convinced it's too hard to crack. (Unless you've got a Cray supercomputer lying around)

Adam
while(ignorance==true){perpetuate(violence,fear,hatred);life=life-1};
 
Nevermind, you probably meant the password, huh? No problem, I'll wait.

Adam
while(ignorance==true){perpetuate(violence,fear,hatred);life=life-1};
 
adam -

I've kinda figured unEncrypt just a little - but who's got that kind of time? Yikes!!!

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top