Jump to content

how to test Proxy:IP


etusha

Recommended Posts

modified proxy checker for your needs:

<?php
/*
Title:
   Proxy Detection
Description:
   This will detect any suspicious open socket
   that the user is running and if found in an
   array, it will not let the user proceed to 
   the website, and the ability to allow certain
   hosts to pass the scan.

Usage:
   Name this page proxycheck.php and just include this    include "proxycheck.php";    in any webpage you want protected.
*/
/* Modify these next few lines to whatever you like. */

$Ports = array('1080', '8080', '8000', '3128', '8888', '23', '80', '8081');  // To hold the list of ports.
$AllowedHosts = array('localhost', 'allowedhost.com');     // To hold the list of allowed hosts.
$DisallowedHosts = array('127.0.0.1.poo.com', 'something.msn.com');   // To hold the list of disallowed hosts.
$Redirect = "http://www.google.com/";   // Redirect page
$SocketTimeout = 1;        // Higher the number, the longer it takes.
/* End of modification. */
if ((!in_array ($REMOTE_ADDR, $AllowedHosts)) && (!in_array ($REMOTE_ADDR, $DisallowedHosts)))
{

  $x = 1;

  while ($Ports[$x])
  {
   $fSockPointer = fsockopen($REMOTE_ADDR, $Ports[$x], $errno, $errstr, $SocketTimeout);
   if (@$fSockPointer)
   {
    print "You are behind a proxy!";
    fclose($fSockPointer);
   }
   $x++;
  }
} else {
print "you are not behind a proxy, as far as we can tell";
}
?>

Didn't test it too much, so be warned.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.