Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 6.9
Poll
If you favor a foul, what favorite foul would it be?
Dove
0%
 0%  [ 0 ]
Duck
0%
 0%  [ 0 ]
Crow
0%
 0%  [ 0 ]
Turkey
0%
 0%  [ 0 ]
Raven
100%
 100%  [ 2 ]
Total Votes : 2


Author Message
Frogger
Worker
Worker



Joined: Oct 06, 2003
Posts: 108

PostPosted: Wed Oct 29, 2003 3:51 am Reply with quote

Other than changing the necessary code below:

Around:

Code:
Line 109 MAXLENGTH=\"6


Line 126 - $code = substr($rcode, 2, 10);

Line 130 - ImageString ($image, 5, 6, 2, $code, $text_color);


from the admin.php

Code:


    OpenTable();
    echo "<form action=\"admin.php\" method=\"post\">"
        ."<table border=\"0\">"
   ."<tr><td>"._ADMINID."</td>"
   ."<td><input type=\"text\" NAME=\"aid\" SIZE=\"20\" MAXLENGTH=\"25\"></td></tr>"
   ."<tr><td>"._PASSWORD."</td>"
   ."<td><input type=\"password\" NAME=\"pwd\" SIZE=\"20\" MAXLENGTH=\"18\"></td></tr>";
    if (extension_loaded("gd")) {
   echo "<tr><td colspan='2'>"._SECURITYCODE.": <img src='admin.php?op=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'></td></tr>"
       ."<tr><td colspan='2'>"._TYPESECCODE.": <input type=\"text\" NAME=\"gfx_check\" SIZE=\"7\" MAXLENGTH=\"6\"></td></tr>";
    }
    echo "<tr><td>"
   ."<input type=\"hidden\" NAME=\"random_num\" value=\"$random_num\">"
   ."<input type=\"hidden\" NAME=\"op\" value=\"login\">"
   ."<input type=\"submit\" VALUE=\""._LOGIN."\">"
   ."</td></tr></table>"
   ."</form>";
    CloseTable();
    include ("footer.php");
}

function gfx($random_num) {
    global $prefix, $db;
    require("config.php");
    $datekey = date("F j");
    $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
    $code = substr($rcode, 2, 10);
    $image = ImageCreateFromJPEG("images/admin/code_bg.jpg");
    $text_color = ImageColorAllocate($image, 80, 80, 80);
    Header("Content-type: image/jpeg");
    ImageString ($image, 5, 6, 2, $code, $text_color);
    ImageJPEG($image, '', 100);
    ImageDestroy($image);
    die();


are there other references and/or files with the GFX code changes necessary to enable the increase - of the size of the security code.

I changed the 3 lines referenced above, increased the width of the code_bg.jpg (in my case: code_bg.png)

and although the security code was displayed and accepted with the increased length, . . . admin login was rejected.

In my case, as a test I increased the security code to 12 characters. When entering the code the status bar displays a 6 digit code, so that tells me there is another reference somewhere......but......doh!, I can't find it.

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger ICQ Number
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Wed Oct 29, 2003 7:35 am Reply with quote

You need to also change it in auth.php Smile
 
View user's profile Send private message
Frogger







PostPosted: Wed Oct 29, 2003 9:41 am Reply with quote

ThanX. Works great!

Now, you don't need to answer this publicly 'cause I know there is a security reason, but....

When the page loads, and in the source of the page, a 6 digit security code is still generated.

I take it that is generated to help thwart a possible security problem?
 
Raven







PostPosted: Wed Oct 29, 2003 9:46 am Reply with quote

That is just a pointer reference Smile
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 6.9

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©