Jump to content

Nuke Module Access


dfwcomputer

Recommended Posts

i have 2 different versions of nuke and just wondering what the difference is between the following 2 pieces of code that are used to protect the modules.This code is located at the very beginning of the index file, Is one more secure than the other? or if any what is the difference.

 

if (!eregi("modules.php", $PHP_SELF)) {
  die ("You can't access this file directly...");
}

 

and

 

if ( !defined('MODULE_FILE') )
{
    die("You can't access this file directly...");
}

Link to comment
https://forums.phpfreaks.com/topic/86581-nuke-module-access/
Share on other sites

if (!eregi("modules.php", $PHP_SELF)) {

  die ("You can't access this file directly...");

}

 

^-- That searches to see if the page we are accessing from the address bar is "modules.php", if it is it displays that error.

 

if ( !defined('MODULE_FILE') )

{

    die("You can't access this file directly...");

}

^-- Somewhere in a different nuke file it defines what a MODULE_FILE is, if MODULE_FILE is not defined on that page then display the same error...

 

Whether or not one is more secure than the other would require you to find the part that defines 'MODULE_FILE'

Link to comment
https://forums.phpfreaks.com/topic/86581-nuke-module-access/#findComment-442441
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.