X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;ds=inline;f=web%2FObj%2Fproxyscan.phh;h=662ccb2ea4cff6a71b095aaa7fb1b53ed2bc7f51;hb=27185d840648e6857ab197900e3cb11baf5a3692;hp=ea704c3ef454d3f5a927dd75f0e7d6c36a880223;hpb=ba124be15839e2a62fa793b70869e0209f8daf90;p=brisk.git
diff --git a/web/Obj/proxyscan.phh b/web/Obj/proxyscan.phh
index ea704c3..662ccb2 100644
--- a/web/Obj/proxyscan.phh
+++ b/web/Obj/proxyscan.phh
@@ -128,16 +128,16 @@ class proxy_detector {
* BOOL $proxy = detect( VOID )
* Start detection and return TRUE if a proxy server is detected...
*/
- function detect(){
+ function detect($addr){
GLOBAL $G_proxy_white_list;
$log = "";
foreach($G_proxy_white_list as $authproxy) {
- if ($_SERVER['REMOTE_ADDR'] == $authproxy)
+ if ($addr == $authproxy)
return (FALSE);
}
- if ($this->exists_in_rbl($_SERVER['REMOTE_ADDR']) == TRUE)
+ if ($this->exists_in_rbl($addr) == TRUE)
return (TRUE);
// //scan all headers
@@ -149,11 +149,11 @@ class proxy_detector {
//let's do something...
if($log){
- $log = $this->lastLog = date("Y-m-d H:i:s")."\nDetected proxy server: ".gethostbyaddr($_SERVER['REMOTE_ADDR'])." ({$_SERVER['REMOTE_ADDR']})\n".$log;
+ $log = $this->lastLog = date("Y-m-d H:i:s")."\nDetected proxy server: ".gethostbyaddr($addr)." ({$addr})\n".$log;
//mail message
if($this->getConfig('MAIL_ALERT_TO'))
- mail($this->getConfig('MAIL_ALERT_TO'),"Proxy detected at {$_SERVER['REQUEST_URI']}",$log);
+ mail($this->getConfig('MAIL_ALERT_TO'),"Proxy detected at {$addr}",$log);
//write to file
$f = $this->getConfig('LOG_FILE');
@@ -177,15 +177,15 @@ class proxy_detector {
}
//init class
-function is_proxy()
+function is_proxy($addr)
{
$proxy = new proxy_detector();
//start detect
- if($proxy->detect()) {
+ if($proxy->detect($addr)) {
//returned TRUE, lets die...
echo "