X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;ds=inline;f=web%2FObj%2Fproxyscan.phh;h=662ccb2ea4cff6a71b095aaa7fb1b53ed2bc7f51;hb=cb2f40283ece5cd3c855e74281773e5722996f23;hp=c458926b9fe4e37a5d68c5103a19eb05141102b8;hpb=0c0725455c4c965b8eafeb7dad0453b7cd0e4ac0;p=brisk.git
diff --git a/web/Obj/proxyscan.phh b/web/Obj/proxyscan.phh
index c458926..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 "