Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.