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(tm)
Author Message
BobMarion
Former Admin in Good Standing



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

PostPosted: Thu Jul 29, 2004 8:39 am Reply with quote

When coding the Proxy Blocker I made it mild since I didn't have that list of proxies to test it with. Anyway follow the instructions below to increase it's effectiveness.

Open includes/sentinel.php and find:
Code:
// Proxy Blocker

$proxy1 = get_client_ip();
$proxy2 = get_x_forwarded();
if($ab_config['allow_proxy'] == 1 AND ($proxy1 != "none" OR $proxy2 != "none")) {
  $proxy_reason = stripslashes($ab_config['proxy_reason']);
  die($proxy_reason);
}


Now replace that with:
Code:
// Proxy Blocker

$proxy0 = get_ip();
$proxy1 = get_client_ip();
$proxy2 = get_x_forwarded();
$proxy_host = @getHostByAddr($proxy0);
if($ab_config['allow_proxy'] == 1 AND ($proxy1 != "none" OR $proxy2 != "none" OR stristr($proxy_host,"proxy") OR $proxy0 == $proxy_host)) {
  $proxy_reason = stripslashes($ab_config['proxy_reason']);
  die($proxy_reason);
}


This is a much stiffer proxy check and should catch most but not everyone since it's hard to catch everything.

_________________
Bob Marion
Codito Ergo Sum
http://www.nukescripts.net 
View user's profile Send private message Send e-mail Visit poster's website
Muffin
Client



Joined: Apr 10, 2004
Posts: 649
Location: UK

PostPosted: Fri Jul 30, 2004 5:51 am Reply with quote

I've had to turn this option off on my site, it wouldnt let any of my regulars on. I guess we must all use proxies.

Is there any way we can allow some and not others?
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm)

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 ©