Author
Message
BobMarion Site Admin Joined: Oct 30, 2002 Posts: 1039 Location: RedNeck Land (known as Kentucky)
Posted:
Wed Dec 15, 2004 1:33 am
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
JRSweets Worker Joined: Aug 06, 2004 Posts: 192
Posted:
Wed Dec 15, 2004 8:45 am
Thanks for the update. Everything works great now.
chrisy New Member Joined: Sep 12, 2004 Posts: 5
Posted:
Wed Dec 15, 2004 9:05 am
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...
chrisy New Member Joined: Sep 12, 2004 Posts: 5
Posted:
Wed Dec 15, 2004 9:55 am
i have found this forum:
but the changing stristr in stripos or stripos_clone does not work...
JRSweets Worker Joined: Aug 06, 2004 Posts: 192
Posted:
Wed Dec 15, 2004 10:16 am
Did you try the fix Bob posted above? It worked for me.
chrisy New Member Joined: Sep 12, 2004 Posts: 5
Posted:
Thu Dec 16, 2004 1:38 am
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 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