#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Posts
    162
    Rep 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]
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    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.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Posts
    162
    Rep 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).]
  6. #4
  7. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    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);
    }
    }
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Posts
    162
    Rep 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).]
  10. #6
  11. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    Sorry I can't.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Posts
    162
    Rep Power
    0
    would it help if I say please? i really want to get this script working
  14. #8
  15. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    Southern California
    Posts
    73
    Rep Power
    15
    <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...

IMN logo majestic logo spyfu logo threadwatch logo seochat tools logo