PHP anonymity checker script
PHP class : socks 4, socks 5 and proxy lists validation (based on curl lib).
Anonymity is one of my favourites’ interests. This simple PHP 5 class validates Socks4 , Socks5 and Proxy lists.
Version: 0.2
-
<?php// PHP anonymity checker
-
//
-
// (c) Involutive 2008 http://www.involutive.com
-
// author: Paolo Ardoino < paolo@involutive.com >
-
//
-
// Usage:
-
// $anons = array(
-
// array("ip" => "1.2.3.4", "port" => 8080, "type" => "socks4"),
-
// array("ip" => "1.2.3.5", "port" => 8080, "type" => "socks5"),
-
// array("ip" => "1.2.3.6", "port" => 8080, "type" => "proxy")
-
// );
-
//
-
// $pa = new phpanon(array("anons" => $anons));
-
// $pa->check();
-
// $pa->done();
-
//
-
// $anons is an array of triples ("ip" => ip, "port" => port, "type" => type)
-
// ip: ip address of the socks / proxy
-
// port: port of the socks / proxy
-
// type: socks5 (for socks5), socks4 (for socks4), proxy (for proxy)
-
//
-
// Other options:
-
// "url" => "http://www.example.com" : connection test page
-
// "needle" => "someword" : some word contained in the page set by "url"
-
// "user_agent" => "Mozilla Firefox" : set an alternative user_agent
-
// "url_referer" => "http://www.mypage.com" : set a referer urlclass phpanon {
-
public $opts = array("user_agent" => "", "url_referer" => "", "url" => "http://www.google.com", "needle" => "groups");function __construct($opts) {
-
-
$this->anons = $opts["anons"];
-
}
-
-
if($opts["user_agent"] != "") {
-
$this->opts["user_agent"] = $opts["user_agent"];
-
}
-
-
if($opts["url_referer"] != "") {
-
$this->opts["url_referer"] = $opts["url_referer"];
-
}
-
-
}
-
-
function check() {
-
echo "PHP anonymity checker v0.2\n\t(c) 2007 Involutive http://www.involutive.com\n";
-
echo "\tAuthor: Paolo Ardoino < paolo@involutive.com >\n";
-
-
$anon = &$this->anons[$i];
-
if($anon["ip"] != "" && $anon["port"] != "" && $anon["type"]) {
-
echo "Checking ".$anon["ip"].":".$anon["port"]." [ type ".$anon["type"]." ] … ";
-
-
-
if($this->opts["user_agent"] != "") {
-
}
-
if($this->opts["url_referer"] != "") {
-
}
-
-
-
$anon["status"] = 0;
-
$cnt_gad++;
-
echo "not working\n";
-
} else {
-
-
$anon["status"] = 1;
-
$cnt_good++;
-
echo "working\n";
-
}
-
}
-
}
-
}
-
-
echo "Done.\n";
-
}
-
}
-
-
?>
Tags: PHP code, PHP script, Review script PHP, Script code, Source code
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply