Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Closed Thread
 
Thread Tools Display Modes
Old Sep 29th, 2005, 8:49 AM   #1
anant_tickoo
Programmer
 
Join Date: Sep 2005
Posts: 50
Rep Power: 0 anant_tickoo is an unknown quantity at this point
a script i wanna crack

<SCRIPT LANGUAGE="JavaScript">
<!--
al="`1234567890-=~!@#$%^&*()_+qwer"
+"tyuiop[]QWERTYUIOP{}|asdfghjkl;A"
+"SDFGHJKL:zxcvbnm,./ZXCVBNM<>?";
ab1="";
bctr=0;
function ckPwd(){
 tst=document.isn.username.value
 +"*"+document.isn.passwrd.value+"*";
 ls=document.pd.pe.value;
 a=eval(ls.substring(0,2))-91;
 ls=ls.substring(2,ls.length);
 nls="";
 flg=0;
 while (ls.length>12){
  ab=eval(ls.substring(0,2))-89;
  ab1=(ab1==""?""+ab:ab1);
  oab1=ab1;
  ls=ls.substring(2,ls.length);
  for (var i=0;i<ab;i++){
   nr=eval(ls.substring(0,2))-a;
   ls=ls.substring(2,ls.length);
   nls+=al.charAt(nr);
   }
  nls+="*";
  if (nls.indexOf(tst)>-1){
   ls="";
   flg=1;
   }
  }
 if (flg==1){
  tstOk();
  }
 else{
  bctr++;
  if (bctr>3){
   location.href="wrongpage.php";
   }
  else{
   alert("Sorry. Bad Username or Password."
   +" Failed Attempt #"+bctr+".");
   }
  }
 }

function tstOk(){
 ab1=ab1+""+a;
  alert("OK. You Entered a Valid Username and Password, "
  +document.isn.username.value+"! Taking you to the"
  +" restricted page as soon as you click OK.");
  location.href="pwdss.php?"+ab1;
 }

function srand() {
 today=new Date();
 rand=today.getTime();
 picker=""+rand
 picker=picker.charAt((picker.length-4));
 rec=eval(picker);
 }
// -->
</SCRIPT>


<FORM NAME="pd">
<INPUT TYPE='hidden' NAME='pe' VALUE='9999621534361185176113439965168437841040414209'>
</FORM>

document.isn.username.value is any username
document.isn.passwrd.value is usernames password.

its a m 0 d - x challege
i wanna know how the code works or any info abt code.
thanks

Last edited by Pizentios; Sep 29th, 2005 at 3:49 PM.
anant_tickoo is offline  
Old Sep 29th, 2005, 10:17 AM   #2
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
Learn javascript: w3schools.com
__________________
Join us at #programmingforums @ irc.freenode.net!

My software never has bugs. It just develops random features.
coldDeath is offline  
Old Sep 29th, 2005, 10:24 AM   #3
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
and if you want some directions, please also say what the code does exactly.
Polyphemus_ is offline  
Old Sep 29th, 2005, 12:15 PM   #4
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Oh, and use [code] tags.
__________________
Me :: You :: Them
Ooble is offline  
Old Sep 29th, 2005, 3:13 PM   #5
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
This is probably against forum rules...
__________________

tempest is offline  
Old Sep 29th, 2005, 3:17 PM   #6
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
I read crack, thought I could score,

hmm, don't know much about java script, what's to crack about it? you have the script right here...
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline  
Old Sep 29th, 2005, 3:49 PM   #7
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
fixed code tags.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline  
Old Sep 29th, 2005, 4:08 PM   #8
pr0gm3r
Hobbyist Programmer
 
Join Date: Dec 2004
Location: CA
Posts: 102
Rep Power: 4 pr0gm3r is on a distinguished road
Send a message via MSN to pr0gm3r
crack ??? are you trying to do ? there anant_tickoo??
__________________
--
pr0gm3r
pr0gm3r is offline  
Old Sep 29th, 2005, 4:12 PM   #9
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
I CRACKED IT...! UREKA!

[php]function ckPwd() { return true; }[/php]

Sorry, i had to do it..
__________________

tempest is offline  
Old Sep 29th, 2005, 4:39 PM   #10
OpenLoop
Expert Programmer
 
OpenLoop's Avatar
 
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4 OpenLoop is on a distinguished road
Quote:
Originally Posted by tempest
I CRACKED IT...! UREKA!

[php]function ckPwd() { return true; }[/php]

Sorry, i had to do it..

I'm not sure that is a crack. The original function ckPwd() doesn't return anything. Instead it calls tstOk() upon successful login.

[php]function ckPwd() {
flg=1; //set the flag just in case it is used elsewhere
tstOk(); }[/php]


EDIT: If this crack actually works, it was intended only to point out a security hole in the code.
OpenLoop is offline  
Closed Thread

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:28 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC