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
BobMarion
Former Admin in Good Standing


Joined: Oct 30, 2002
Posts: 1037
Location: RedNeck Land (known as Kentucky)

PostPosted: Wed Dec 15, 2004 1:33 am Reply with quote

Find in includes/sentinel.php:
Code:
// Check for Referer

$blocker_row = $arrayreferer;
if($blocker_row['activate'] > 0) {

  $RefererList = explode("\r\n",$blocker_row['list']);
  $streferer = get_referer();
  for ($i=0; $i < count($RefererList); $i++) {
    $refered = $RefererList[$i];
    if (stristr($streferer, "$refered") AND $refered != "") {
      $abmatch = $refered;
      block_ip($ip, $banuser, $bantime, $blocker_row, $abmatch);
    }
  }
}

// Check for Harvester
$blocker_row = $arrayharvester;
if($blocker_row['activate'] > 0) {

  $HarvestList = explode("\r\n",$blocker_row['list']);
  $agent = get_user_agent();
  for ($i=0; $i < count($HarvestList); $i++) {
    $harvest = $HarvestList[$i];
    if (stristr($agent, "$harvest") AND $harvest != "") {
      $abmatch = $harvest;
      block_ip($ip, $banuser, $bantime, $blocker_row, $abmatch);
    }
  }
}

// Check for Strings
$blocker_row = $arraystring;
if($blocker_row['activate'] > 0) {

  $StringList = explode("\r\n",$blocker_row['list']);
  for ($i=0; $i < count($StringList); $i++) {
    $stringl = $StringList[$i];
    if (stristr($querystring, "$stringl") AND $stringl != "") {
      $abmatch = $stringl;
      block_ip($ip, $banuser, $bantime, $blocker_row, $abmatch);
    }
  }
}

// Check for Request
$blocker_row = $arrayrequest;
if($blocker_row['activate'] > 0) {

  $RequestList = explode("\r\n",$blocker_row['list']);
  $method = get_request_method();
  for ($i=0; $i < count($RequestList); $i++) {
    $request = $RequestList[$i];
    if (stristr($method, "$request") AND $request != "") {
      $abmatch = $request;
      block_ip($ip, $banuser, $bantime, $blocker_row, $abmatch);
    }
  }
}
and replace with:
Code:
// Check for Referer

$blocker_row = $arrayreferer;
if($blocker_row['activate'] > 0) {
  if($RefererList > "") {
    $RefererList = explode("\r\n",$blocker_row['list']);
    $streferer = get_referer();
    for ($i=0; $i < count($RefererList); $i++) {
      $refered = $RefererList[$i];
      if (stristr($streferer, "$refered") AND $refered != "") {
        $abmatch = $refered;
        block_ip($ip, $banuser, $bantime, $blocker_row, $abmatch);
      }
    }
  }
}

// Check for Harvester
$blocker_row = $arrayharvester;
if($blocker_row['activate'] > 0) {
  if($HarvestList > "") {
    $HarvestList = explode("\r\n",$blocker_row['list']);
    $agent = get_user_agent();
    for ($i=0; $i < count($HarvestList); $i++) {
      $harvest = $HarvestList[$i];
      if (stristr($agent, "$harvest") AND $harvest != "") {
        $abmatch = $harvest;
        block_ip($ip, $banuser, $bantime, $blocker_row, $abmatch);
      }
    }
  }
}

// Check for Strings
$blocker_row = $arraystring;
if($blocker_row['activate'] > 0) {
  if($StringList > "") {
    $StringList = explode("\r\n",$blocker_row['list']);
    for ($i=0; $i < count($StringList); $i++) {
      $stringl = $StringList[$i];
      if (stristr($querystring, "$stringl") AND $stringl != "") {
        $abmatch = $stringl;
        block_ip($ip, $banuser, $bantime, $blocker_row, $abmatch);
      }
    }
  }
}

// Check for Request
$blocker_row = $arrayrequest;
if($blocker_row['activate'] > 0) {
  if($RequestList > "") {
    $RequestList = explode("\r\n",$blocker_row['list']);
    $method = get_request_method();
    for ($i=0; $i < count($RequestList); $i++) {
      $request = $RequestList[$i];
      if (stristr($method, "$request") AND $request != "") {
        $abmatch = $request;
        block_ip($ip, $banuser, $bantime, $blocker_row, $abmatch);
      }
    }
  }
}


Long story short, I forgot to check for empty fields Sad

_________________
Bob Marion
Codito Ergo Sum
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
JRSweets
Worker
Worker


Joined: Aug 06, 2004
Posts: 192

PostPosted: Wed Dec 15, 2004 8:45 am Reply with quote

Thanks for the update. Everything works great now.
 
View user's profile Send private message
chrisy
New Member
New Member


Joined: Sep 12, 2004
Posts: 5

PostPosted: Wed Dec 15, 2004 9:05 am Reply with quote

i have updated from 2.1.0 now to 2.1.2
but with the new file sentinel.php i have a big problem...

if i reinstall the old sentinel.php (from 2.1.0) my phpnuke is running,
but with the new file my site just does not start, it is not found!!!???

no idea what happens...
 
View user's profile Send private message
chrisy
PostPosted: Wed Dec 15, 2004 9:55 am Reply with quote

i have found this forum:
Only registered users can see links on this board! Get registered or login!

but the changing stristr in stripos or stripos_clone does not work...
 
JRSweets
PostPosted: Wed Dec 15, 2004 10:16 am Reply with quote

Did you try the fix Bob posted above? It worked for me.
 
chrisy
PostPosted: Thu Dec 16, 2004 1:38 am Reply with quote

Yes I tried the code Bob posted here, that was the thing I did first...

In the moment I take the old sentinel file, replaced the code from above and I hope it works...
but it is not satisfied for me, and I hope i will get some help here...
 
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 ©