Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™
Author Message
spiritwulf
New Member
New Member


Joined: Feb 10, 2006
Posts: 18

PostPosted: Fri Feb 10, 2006 3:20 pm Reply with quote

Running php-nuke 7.7 Patched(i know, you dont like 7.7, been using it to long to change it now though)
Alright ive just instaled sentinel on my server, everything looking good, then i get
Quote:
It appears that NukeSentinel(tm) has not been configured correctly. The most common cause is that you either have an error in the syntax that is including includes/nukesentinel.php from your mainfile.php, or you have not added the NukeSentinel(tm) code to your mainfile.php. Details for including this code are included in the download package in the Edits_For_Core_Files directory.


Seems fairly straightforward, open my php editor and the mainfile7.7.txt found in core edits folder. I start running searches for the find and replace sections and come up blank. cant find the sections in mainfile.php that need to be replaced. can anyone help me out here? closest i seem to be able to find is:

Quote:
if(defined('FORUM_ADMIN')) {
define('INCLUDE_PATH', '../../../');
} elseif(defined('INSIDE_MOD')) {
define('INCLUDE_PATH', '../../');
} else {
define('INCLUDE_PATH', './');
}

@require_once(INCLUDE_PATH."config.php");
@require_once(INCLUDE_PATH."db/db.php");
@require_once(INCLUDE_PATH."includes/sql_layer.php");
@require_once(INCLUDE_PATH."includes/ipban.php");
if (file_exists(INCLUDE_PATH."includes/custom_files/custom_mainfile.php")) {
@include_once(INCLUDE_PATH."includes/custom_files/custom_mainfile.php");
}

Looks like i need to add a bit to this. but what where?
Also found 2 instances that may be affecting it as well
Quote:
if (!defined('ADMIN_FILE') && !file_exists('includes/nukesentinel.php')) {
foreach ($_GET as $sec_key => $secvalue) {
if ((eregi("<[^>]*script*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*object*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*iframe*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*applet*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*meta*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*style*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*form*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*img*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*onmouseover*\"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*body*\"?[^>]*>", $secvalue)) ||
(eregi("\([^>]*\"?[^)]*\)", $secvalue)) ||
(eregi("\"", $secvalue)) ||
(eregi("forum_admin", $sec_key)) ||
(eregi("inside_mod", $sec_key))) {
die ($htmltags);
}
}

and
Quote:
if(!file_exists('includes/nukesentinel.php')) {
if(isset($_SERVER['QUERY_STRING']) && (!stripos_clone($_SERVER['QUERY_STRING'], "ad_click") || !stripos_clone($_SERVER['QUERY_STRING'], "url"))) {
$queryString = $_SERVER['QUERY_STRING'];
if (stripos_clone($queryString,'%20union%20') OR stripos_clone($queryString,'/*') OR stripos_clone($queryString,'*/union/*') OR stripos_clone($queryString,'c2nyaxb0') OR stripos_clone($queryString,'+union+') OR stripos_clone($queryString,'http://') OR (stripos_clone($queryString,'cmd=') AND !stripos_clone($queryString,'&cmd')) OR (stripos_clone($queryString,'exec') AND !stripos_clone($queryString,'execu')) OR stripos_clone($queryString,'concat')) {
die('Illegal Operation');
}
}
}
 
View user's profile Send private message
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Fri Feb 10, 2006 4:40 pm Reply with quote

Just add another line
Code:


@require_once(INCLUDE_PATH."includes/nukesentinel.php");

to the rest of those

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
spiritwulf
PostPosted: Fri Feb 10, 2006 6:14 pm Reply with quote

yeah that was what i was thinking as well but wanted an expert opinion ^^ thanks bunches
 
abusuffian
New Member
New Member


Joined: Feb 25, 2006
Posts: 1

PostPosted: Tue Feb 28, 2006 4:08 am Reply with quote

evaders99 wrote:
Just add another line
Code:


@require_once(INCLUDE_PATH."includes/nukesentinel.php");

to the rest of those


to the rest of those??
at last of the script? i mean

Code:


 
if(defined('FORUM_ADMIN')) {
define('INCLUDE_PATH', '../../../');
} elseif(defined('INSIDE_MOD')) {
define('INCLUDE_PATH', '../../');
} else {
define('INCLUDE_PATH', './');
}

@require_once(INCLUDE_PATH."config.php");
@require_once(INCLUDE_PATH."db/db.php");
@require_once(INCLUDE_PATH."includes/sql_layer.php");
@require_once(INCLUDE_PATH."includes/ipban.php");
if (file_exists(INCLUDE_PATH."includes/custom_files/custom_mainfile.php")) {
@include_once(INCLUDE_PATH."includes/custom_files/custom_mainfile.php");
@require_once(INCLUDE_PATH."includes/nukesentinel.php");
}

like this?
i use phpnuke 7.8 and patch 3.2

 
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9449
Location: Arizona

PostPosted: Tue Feb 28, 2006 6:58 am Reply with quote

abusuffian, instead of:

Code:


if (file_exists(INCLUDE_PATH."includes/custom_files/custom_mainfile.php")) {
@include_once(INCLUDE_PATH."includes/custom_files/custom_mainfile.php");
@require_once(INCLUDE_PATH."includes/nukesentinel.php");
}


You will want to move the NS include outside the if statement like this:

Code:


if (file_exists(INCLUDE_PATH."includes/custom_files/custom_mainfile.php")) {
@include_once(INCLUDE_PATH."includes/custom_files/custom_mainfile.php");
}
@require_once(INCLUDE_PATH."includes/nukesentinel.php");

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
ANTH
Regular
Regular


Joined: May 27, 2005
Posts: 62

PostPosted: Tue May 16, 2006 1:51 am Reply with quote

Mine seems to be different to all ive looked at im unsure where to put it

Code:
if (defined('FORUM_ADMIN')) {

    @require_once("../../../config.php");
    @require_once("../../../db/db.php");
} elseif (defined('INSIDE_MOD')) {
    @require_once("../../config.php");
    @require_once("../../db/db.php");
} else {
    @require_once("config.php");
    @require_once("db/db.php");
}


/* FOLLOWING LINES ARE DEPRECATED BUT ARE HERE FOR OLD MODULES COMPATIBILITY */
/* PLEASE START USING THE NEW SQL ABSTRACTION LAYER. SEE MODULES DOC FOR DETAILS */
if (defined('FORUM_ADMIN')) {
    @require_once("../../../includes/sql_layer.php");
    $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
} elseif (defined('INSIDE_MOD')) {
    @require_once("../../includes/sql_layer.php");
    $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
} else {
    @require_once("includes/sql_layer.php");
    $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
}
 
View user's profile Send private message
montego
PostPosted: Wed May 17, 2006 6:26 am Reply with quote

ANTH, you need to get current with the patches... Wink

Try this:

Code:


if (defined('FORUM_ADMIN')) {
    @require_once("../../../config.php");
    @require_once("../../../db/db.php");
    @require_once("../../../includes/nukesentinel.php");
} elseif (defined('INSIDE_MOD')) {
    @require_once("../../config.php");
    @require_once("../../db/db.php");
    @require_once("../../includes/nukesentinel.php");
} else {
    @require_once("config.php");
    @require_once("db/db.php");
    @require_once("includes/nukesentinel.php");
}


happy nuke'in...
 
ANTH
PostPosted: Wed May 17, 2006 10:09 am Reply with quote

I would love to get current with the patches but im afraid it may disturb the mods on my site.

Attahcment mod
arcade mod
Ns downloads
CZ links
CZ modules
and many more I fixed by replacing


Code:
if (defined('FORUM_ADMIN')) {

    @require_once("../../../config.php");
    @require_once("../../../db/db.php");
} elseif (defined('INSIDE_MOD')) {
    @require_once("../../config.php");
    @require_once("../../db/db.php");
} else {
    @require_once("config.php");
    @require_once("db/db.php");
}


With this and it works

Code:
if (defined('FORUM_ADMIN')) {

   @require_once("../../../config.php");
   @require_once("../../../db/db.php");
   @require_once("../../../includes/sql_layer.php");
   if (file_exists("../../../includes/custom_files/custom_mainfile.php")) { @include_once("../../../includes/custom_files/custom_mainfile.php"); }
   @require_once("../../../includes/ipban.php");
   if (defined('NUKE_HEADER') && file_exists("../../../includes/custom_files/custom_head.php")) { @include_once("../../../includes/custom_files/custom_head.php"); }
   if (defined('NUKE_HEADER') && file_exists("../../../includes/custom_files/custom_header.php")) { @include_once("../../../includes/custom_files/custom_header.php"); }
} elseif (defined('INSIDE_MOD')) {
   @require_once("../../config.php");
   @require_once("../../db/db.php");
   @require_once("../../includes/sql_layer.php");
   if (file_exists("../../includes/custom_files/custom_mainfile.php")) { @include_once("../../includes/custom_files/custom_mainfile.php"); }
   @require_once("../../includes/ipban.php");
   if (defined('NUKE_HEADER') && file_exists("../../includes/custom_files/custom_head.php")) { @include_once("../../includes/custom_files/custom_head.php"); }
   if (defined('NUKE_HEADER') && file_exists("../../includes/custom_files/custom_header.php")) { @include_once("../../includes/custom_files/custom_header.php"); }
} else {
   @require_once("config.php");
   @require_once("db/db.php");
   @require_once("includes/sql_layer.php");
   if (file_exists("includes/custom_files/custom_mainfile.php")) { @include_once("includes/custom_files/custom_mainfile.php"); }
   @require_once("includes/ipban.php");
   if (defined('NUKE_HEADER') && file_exists("includes/custom_files/custom_head.php")) { @include_once("includes/custom_files/custom_head.php"); }
   if (defined('NUKE_HEADER') && file_exists("includes/custom_files/custom_header.php")) { @include_once("includes/custom_files/custom_header.php"); }
}
 
montego
PostPosted: Fri May 19, 2006 6:30 am Reply with quote

Ok, I am confused and/or blind. Laughing Where is the include to nukesentinel.php in your posted code?
 
ANTH
PostPosted: Fri May 19, 2006 7:05 am Reply with quote

Whoops sorry my bad Looks like this now Smile

Code:
if (defined('FORUM_ADMIN')) {

   @require_once("../../../config.php");
   @require_once("../../../db/db.php");
   @require_once("../../../includes/sql_layer.php");
   if (file_exists("../../../includes/custom_files/custom_mainfile.php")) { @include_once("../../../includes/custom_files/custom_mainfile.php"); }
   //@require_once("../../../includes/ipban.php");
   @include_once("../../../includes/nukesentinel.php");
   if (defined('NUKE_HEADER') && file_exists("../../../includes/custom_files/custom_head.php")) { @include_once("../../../includes/custom_files/custom_head.php"); }
   if (defined('NUKE_HEADER') && file_exists("../../../includes/custom_files/custom_header.php")) { @include_once("../../../includes/custom_files/custom_header.php"); }
} elseif (defined('INSIDE_MOD')) {
   @require_once("../../config.php");
   @require_once("../../db/db.php");
   @require_once("../../includes/sql_layer.php");
   if (file_exists("../../includes/custom_files/custom_mainfile.php")) { @include_once("../../includes/custom_files/custom_mainfile.php"); }
   //@require_once("../../includes/ipban.php");
   @include_once("../../includes/nukesentinel.php");
   if (defined('NUKE_HEADER') && file_exists("../../includes/custom_files/custom_head.php")) { @include_once("../../includes/custom_files/custom_head.php"); }
   if (defined('NUKE_HEADER') && file_exists("../../includes/custom_files/custom_header.php")) { @include_once("../../includes/custom_files/custom_header.php"); }
} else {
   @require_once("config.php");
   @require_once("db/db.php");
   @require_once("includes/sql_layer.php");
   if (file_exists("includes/custom_files/custom_mainfile.php")) { @include_once("includes/custom_files/custom_mainfile.php"); }
   //@require_once("includes/ipban.php");
   @include_once("includes/nukesentinel.php");
   if (defined('NUKE_HEADER') && file_exists("includes/custom_files/custom_head.php")) { @include_once("includes/custom_files/custom_head.php"); }
   if (defined('NUKE_HEADER') && file_exists("includes/custom_files/custom_header.php")) { @include_once("includes/custom_files/custom_header.php"); }
}

/* FOLLOWING LINES ARE DEPRECATED BUT ARE HERE FOR OLD MODULES COMPATIBILITY */
/* PLEASE START USING THE NEW SQL ABSTRACTION LAYER. SEE MODULES DOC FOR DETAILS */
if (defined('FORUM_ADMIN')) {
    @require_once("../../../includes/sql_layer.php");
    $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
} elseif (defined('INSIDE_MOD')) {
    @require_once("../../includes/sql_layer.php");
    $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
} else {
    @require_once("includes/sql_layer.php");
    $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
}
 
montego
PostPosted: Fri May 19, 2006 7:39 am Reply with quote

Ah, yes, looks good! Wink
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™

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 ©