PHP Web Host - Quality Web Hosting For All PHP Applications PRO Forms v2.0.0.
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
BobMarion
Site Admin


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

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

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
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 Back to top

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 Back to top

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
New Member
New Member


Joined: Sep 12, 2004
Posts: 5

PostPosted: Wed Dec 15, 2004 9:55 am Reply with quote Back to top

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


but the changing stristr in stripos or stripos_clone does not work...
View user's profile Send private message
JRSweets
Worker
Worker


Joined: Aug 06, 2004
Posts: 192

PostPosted: Wed Dec 15, 2004 10:16 am Reply with quote Back to top

Did you try the fix Bob posted above? It worked for me.
View user's profile Send private message
chrisy
New Member
New Member


Joined: Sep 12, 2004
Posts: 5

PostPosted: Thu Dec 16, 2004 1:38 am Reply with quote Back to top

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...
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum