You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 61 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Shortening Security Code in Nuke 6.5 RC2 [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Cyberclark
Elite Nuker
Elite Nuker


Joined: Nov 20, 2002
Posts: 237


PostPosted: Mon Mar 10, 2003 2:16 pm Reply with quoteBack to top

Had a request from some of my users so figured I would ask. (Well actually they asked me to remove it altogether and I said no Wink )

Anyways is it possible to shorten the random number that is generated from the security code?

I have an admin that is doing a lot of testing for me and is logging in and out of the site alot as different users with different authorization levels and what not and I guess his little fingers are starting to hurt, so I told him I would ask Wink
Find all posts by CyberclarkView user's profileSend private message
Cyberclark
Elite Nuker
Elite Nuker


Joined: Nov 20, 2002
Posts: 237


PostPosted: Mon Mar 10, 2003 8:39 pm Reply with quoteBack to top

The code responsible for generating the random number looks to be in the index.php of Your Account module.

Code:

function gfx($random_num) {
    global $prefix, $db, $module_name;
    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("modules/$module_name/images/code_bg.jpg");
    $text_color = ImageColorAllocate($image, 80, 80, 80);
    Header("Content-type: image/jpeg");
    ImageString ($image, 5, 12, 2, $code, $text_color);
    ImageJPEG($image, '', 75);
    ImageDestroy($image);
    die();
}


I was thinking that in the line $code = substr($rcode, 2, 10); I could just change the 10 to like 6 and that should do the trick? But I am afraid to try it as I have users on the site already and I figure if I mess that one up it could be bad Wink

I really think this is a cool feature but I hear what my people are saying. A User name + password + 5 user random number should keep any script kiddie just as busy as a 10 digit number. Especially since the site this is on isn't mission critical or anything I doubt anyone would get much joy out of hacking it.

Thanks in advance for any info on this matter
Find all posts by CyberclarkView user's profileSend private message
sixonetonoffun
Major
Major


Joined: Jan 13, 2003
Posts: 892


PostPosted: Tue Mar 11, 2003 5:35 am Reply with quoteBack to top

I think if you change all (4) instances of
$code = substr($rcode, 2, 10);
to
$code = substr($rcode, 2, 6);


That will work. For admin you would have to do the same in admin.php I didn't try the admin.php but seems to work fine for Your Account so it should work there too. Though of course a 6 digit # is much less secure then a 10 digit # just like a 5 char pass is much less secure then a 7 char pass.

_________________
www.netflake.com
www.glowoptics.com
Find all posts by sixonetonoffunView user's profileSend private message
intel352
Lieutenant
Lieutenant


Joined: Mar 11, 2003
Posts: 180


PostPosted: Tue Mar 11, 2003 10:12 pm Reply with quoteBack to top

seems to me that the code isn't very secure at all, cus if you right-click on the image, it has the number in Properties... any decent scripter could easily have the script read the image title and pull out the number...

i know this cus i just installed nuke 6.5 rc3, and the damn security image isn't showing up (tho it shows up in analyze.php), and i had to login somehow
Find all posts by intel352View user's profileSend private messageVisit poster's websiteICQ Number
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Thu Mar 13, 2003 9:45 am Reply with quoteBack to top

erm..... yes and no. That number in the properties shouldn't be the same as the one on the security code block. If it is something's wrong.

AI
Find all posts by ArtificialIntelView user's profileSend private message
intel352
Lieutenant
Lieutenant


Joined: Mar 11, 2003
Posts: 180


PostPosted: Thu Mar 13, 2003 12:17 pm Reply with quoteBack to top

hmm... i'll have to check it now, but i've installed RC3 twice, and had to login using that method each time...
Find all posts by intel352View user's profileSend private messageVisit poster's websiteICQ Number
Astalon_Decurth
Nuke Soldier
Nuke Soldier


Joined: Feb 13, 2003
Posts: 10

Location: Pine Bluff, Arkansas

PostPosted: Tue Mar 25, 2003 10:30 am Reply with quoteBack to top

How do you get the Image to center in the Block after chaning it? out of curiosity? BTW. Thanks. Smile
Find all posts by Astalon_DecurthView user's profileSend private messageSend e-mail
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Tue Mar 25, 2003 11:04 am Reply with quoteBack to top

Cyberclark wrote:
Had a request from some of my users so figured I would ask. (Well actually they asked me to remove it altogether and I said no Wink )

Anyways is it possible to shorten the random number that is generated from the security code?

I have an admin that is doing a lot of testing for me and is logging in and out of the site alot as different users with different authorization levels and what not and I guess his little fingers are starting to hurt, so I told him I would ask Wink


back to the original ?

6.5 Final has the security code shortened to 6 characters by default.

mikem

_________________
Getting Started | My Projects
Find all posts by mikemView user's profileSend private message
dsnail2000
Site Admin
Site Admin


Joined: Mar 17, 2003
Posts: 331

Location: Northern VA

PostPosted: Wed Apr 02, 2003 2:52 pm Reply with quoteBack to top

the new account security code at www.controlbooth.com shows 7 visible numbers and what appears to be another one that is hidden... Any suggestions or known fixes that I haven't found for this problem?

And... what part of the english language file do I need to copy to have that same page correctly display the English translation of those fields?
Find all posts by dsnail2000View user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.184 Seconds - 192 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::