From 8a86b6d9576d8943c3ddaaaf34c4917b2442c13b Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Wed, 11 Feb 2015 08:17:38 +0100 Subject: [PATCH] not previous included files added --- web/Obj/proxy_detector.phh | 74 ++++++++++++++++++++++++++++++++++++++ web/proxy_check.php | 48 +++++++++++++++++++++++++ webtest/proxy_mock.php | 3 ++ 3 files changed, 125 insertions(+) create mode 100644 web/Obj/proxy_detector.phh create mode 100644 web/proxy_check.php create mode 100644 webtest/proxy_mock.php diff --git a/web/Obj/proxy_detector.phh b/web/Obj/proxy_detector.phh new file mode 100644 index 0000000..0792521 --- /dev/null +++ b/web/Obj/proxy_detector.phh @@ -0,0 +1,74 @@ +"; + if ($resolved != $rblhost) { + return TRUE; + } + } + } + return FALSE; + } + + /** + * BOOL $proxy = detect( $addr ) + * Start detection and return TRUE if a proxy server is detected... + */ + function detect($addr){ + if ($this->exists_in_rbl($addr) == TRUE) + return (TRUE); + + //nope, no proxy was logged... + return FALSE; + } +} + +//init class +function is_proxy($addr) +{ + $proxy = new ProxyDetector(); + + //start detect + return ($proxy->detect($addr)); +} + +?> \ No newline at end of file diff --git a/web/proxy_check.php b/web/proxy_check.php new file mode 100644 index 0000000..e0e5320 --- /dev/null +++ b/web/proxy_check.php @@ -0,0 +1,48 @@ + \ No newline at end of file diff --git a/webtest/proxy_mock.php b/webtest/proxy_mock.php new file mode 100644 index 0000000..71c90e6 --- /dev/null +++ b/webtest/proxy_mock.php @@ -0,0 +1,3 @@ + -- 2.17.1