PDA

View Full Version : Administrative and Maintenance Tools - KX - Rename Config File


Ziki
12-13-2008, 10:00 PM
This modification was brought to you by
KXDesign
http://www.kxdesign.com/


~Modification name
Rename Config File

~Modification description
This modification allows you to rename or move the config.php file.This is to protect your sensible information and increase the security of your vBulletin board.

The majority of boards get hacked because a hacker uploads a malicious script to get hold of the config.php content.But if you move or rename it,there is no chance that they find out the location of it.

~Modification options
None

~Modification info
File uploads: 0
File edits: 1
Templates: 0
Template edits: 0
Plugins: 0
SQL Queries: 0
Phrases: 0
Settings: 0
Hooks: 0

Install time: 1 minute
Install level: Light

~Modification installation

Step 1: Open includes/class_core.php and find:

include(CWD . '/includes/config.php');

if (sizeof($config) == 0)
{
if (file_exists(CWD. '/includes/config.php'))
{
// config.php exists, but does not define $config
die('<br /><br /><strong>Configuration</strong>: includes/config.php exists, but is not in the 3.6+ format. Please convert your config file via the new config.php.new.');
}
else
{
die('<br /><br /><strong>Configuration</strong>: includes/config.php does not exist. Please fill out the data in config.php.new and rename it to config.php');
}
}

And replace it with:


include(CWD . 'XXXXX');

if (sizeof($config) == 0)
{
if (file_exists(CWD. 'XXXXX'))
{
// config.php exists, but does not define $config
die('<br /><br /><strong>Configuration</strong>: includes/config.php exists, but is not in the 3.6+ format. Please convert your config file via the new config.php.new.');
}
else
{
die('<br /><br /><strong>Configuration</strong>: includes/config.php does not exist. Please fill out the data in config.php.new and rename it to config.php');
}
}

Where XXXXX is the relative path to your new config file.It can be, for instance:
admincp/mynewconfig.php or includes/configuration.php .

~Modification screenshots
None


~Modification changelog


1.0.0 - First Release



~Modification copyright
This may not be distributed,released or claimed as your work without author's permission.

Ziki
12-14-2008, 12:50 PM
~Reserved~

vip-q.com
12-14-2008, 12:55 PM
thanks, it's not new for me, I was know how to do it

but it may help others :)

JOFAA
12-14-2008, 01:46 PM
Thankx

i have been hacked before ... so i hope im save now :up:

iogames
12-14-2008, 03:07 PM
incredible move... but does it causes any more problems? or runs smoothly?

Ziki
12-14-2008, 07:24 PM
Sure it works fine.

Hornstar
12-14-2008, 10:03 PM
I'm going to give this a go asap as I have had to many problems with these hackers going around and defacing my sites. I have even hired a security team to go over the server, so hopefully this will help that little more.

NoCo7
12-20-2008, 04:57 AM
Hmm, might be blind here... But cannot locate the string to edit in Step1 ??
Copied class_core.php from server, opened in txt editor... manually went over it, even tried using the "find" feature and nothing.

I am using VB3.7.4 PL1 , is it different for this latest version?

tlwwolfseye
12-20-2008, 07:04 AM
Its in Line 2532 - 2545 of the class_core.php in my vB 3.7.4 PL1.
Just edited that, seems to work great.