Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old December 26th, 2000, 02:17 PM
guest guest is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 163 guest Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 10 h 1 m 44 sec
Reputation Power: 0
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]

Reply With Quote
  #2  
Old December 26th, 2000, 08:41 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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.

Reply With Quote
  #3  
Old December 27th, 2000, 05:28 AM
guest guest is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 163 guest Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 10 h 1 m 44 sec
Reputation Power: 0
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).]

Reply With Quote
  #4  
Old December 27th, 2000, 05:45 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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);
}
}

Reply With Quote
  #5  
Old December 27th, 2000, 07:27 AM
guest guest is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 163 guest Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 10 h 1 m 44 sec
Reputation Power: 0
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).]

Reply With Quote
  #6  
Old December 27th, 2000, 08:56 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Sorry I can't.

Reply With Quote
  #7  
Old December 28th, 2000, 09:59 AM
guest guest is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 163 guest Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 10 h 1 m 44 sec
Reputation Power: 0
would it help if I say please? i really want to get this script working

Reply With Quote
  #8  
Old December 28th, 2000, 09:29 PM
vpopper's Avatar
vpopper vpopper is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Location: Southern California
Posts: 73 vpopper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 24 sec
Reputation Power: 9
<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...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > need help with perl code


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway