|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
it is a pasword protection type of thing it is a new password accoring to date 12.24.2000 GMT how can i change the password to guest ?? thanks
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre> sub code { $t=time;($a,$a1,$a2,$a3,$a4,$a5,$a6,$a7,$a8)=gmtime($t);$s=$a3.$a4.$a7;$s=$s*$s;$s=$s.$s;@g=split(//,$s); $kn=&k;if($kn ne $INPUT{'reg'}){&error(9);};} sub location { my($location) = @_; print "Location: $location nn"; exit; } sub k { $m='';@m1=('P'..'Z','m'..'z','2'..'9','a'..'k','a'..'k', 'm'..'z', 'A'..'N','P'..'S','A'..'N');for ($i = 0; $i < 10; $i++) {$j = $i+1;$m3 = $g[$i].$g[$j];$m .= @m1[$m3];}return($m); } [/code] |
|
#2
|
|||
|
|||
|
But the code you posted is non-relevant to password protection and there was no indication your sub k has something to do with password. Please repost with more details.
|
|
#3
|
|||
|
|||
|
hi!,
it takes the reg which is the registration serial number and if the password/serial number is wrong it wont let you in. the password/serial number is different every day according to the date e.g 12.24.2000 GMT I was wondering how do I change teh serial number to guest as I dont understand how it creates the password as it seems to be quite complicated. I think these two subroutines create the serial number acording to date, so it is different every day [This message has been edited by guest (edited December 27, 2000).] |
|
#4
|
|||
|
|||
|
This line:
$t=time;($a,$a1,$a2,$a3,$a4,$a5,$a6,$a7,$a8)=gmtime($t);$s=$a3.$a4.$a7;$s=$s*$s;$s=$s.$s;@g=split(//,$s); and this line: $kn=&k;if($kn ne $INPUT{'reg'}){&error(9);};} have nothing in common, no same variables or anything carry over. Just that they are within the same sub. >>I think these two subroutines create the serial number acording to date, so it is different every day If you think so, then you forgot to post some important sub. Anyway, try to remove sub k completely and edit your sub code like so: sub code { $t=time; ($a,$a1,$a2,$a3,$a4,$a5,$a6,$a7,$a8)=gmtime($t); $s=$a3.$a4.$a7; $s=$s*$s; $s=$s.$s; @g=split(//,$s); $kn="guest"; if($kn ne $INPUT{'reg'}){ &error(9); } } |
|
#5
|
|||
|
|||
|
it did not work
if you give me your email address I can send you the cgi program to take a look at if you dont mind?my email is space_cadet38@hotmail.com lol the program is a webmail thing i found on a search engine it looks quit good.. [This message has been edited by guest (edited December 27, 2000).] |
|
#6
|
|||
|
|||
|
Sorry I can't.
|
|
#7
|
|||
|
|||
|
would it help if I say please? i really want to get this script working
![]() |
|
#8
|
||||
|
||||
|
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by guest:
how can i change the password to guest?[/quote] The code is a clever scheme to determine if an input string matches a secret key. The secret key is determined by the date: * It first gets the gmtime values $mday, $mon and $yday (or subscripts 3,4,7) and concatenates them, i.e. "2911363" * It then multiples that number by itself, then appends that number to itself, i.e. 2911363 * 2911363 = 8476034517769 then 8476034517769 . 8476034517769 * It splits the resulting number into an array with one number per item, i.e. @g = qw(8 4 7 6 0 ... * sub 'k' is called to fetch items from the @m1 array, i.e. $subscript = $g[0] . $g[1]; # 84 $m .= $m1[84]; # maybe 'Az' * It returns the string, maybe "A2tHlK" to $kn and compares it to $INPUT{reg} I'm not sure I understand what you mean by changing the password, but if you want to have $INPUT{reg} match 'guest', simply change $kn to guest, i.e. $kn = 'guest' Hope this helps... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > need help with perl code |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|