User:Tawker/proxscript
From Wikipedia, the free encyclopedia
<? set_time_limit(0); ?><html>
<head>
<title>Tawker's Open Proxy Checker - enhanced by joshbuddy - original coding by Amgine</title>
</head>
<body>
<form action="<?=$_SERVER['REQUEST_URI']?>" method="get">
IP: <input type="text" name="ip" value="<?=$_GET['ip']?>"><br>
<input type="submit">
</form>
<?php
// Build shell command
if (isset($_GET['ip'])) {
$result = "";
$actions = "";
$arguments = '-ps4:1080,3380,3800,4232,14321,14441,15551,17771 ';
$arguments .= '-ps4:18844,19991,28882,29992,31121,38883,38884 ';
$arguments .= '-ps5:1080,3380,3800,4232,14321,14441,15551,17771 ';
$arguments .= '-ps5:18844,19991,28882,29992,31121,38883,38884 ';
$arguments .= '-phc:80,8080,8081,3124,3127,3128,6588,7212,8000,8888 ';
$arguments .= '-pho:80,8080,8081,3124,3127,3128,6588,7212,8000,8888 ';
$arguments .= '-phu:80,8080,8081,3124,3127,3128,6588,7212,8000,8888 ';
$arguments .= '-vvvv -d proxycheck.maxmind.com:10000 -c chat:"proxycheck":"Welcome" ';
$arguments .= $_GET['ip'];
$ip .= $_GET['ip'];
//$arguments .= '127.0.0.1';
//$result .= shell_exec('whoami');
//$result .= shell_exec('uptime');
$result .= "Proxyscan by Tawker";
$result .= "<br />\n";
$result .= "Scroll to bottom for script outbut";
$result .= "<br />\n";
//$result .= $arguments;
$result .= "<br />\n";
$tempfile = "/tmp/proxy-".md5($arguments);
if (file_exists($tempfile) && (time() - filemtime($tempfile)) < 60*60) {
$test = file_get_contents($tempfile);
$result .= "<h4>Using cached results - will expire in aprox 1 hour</h4>\n";
} else {
$test = shell_exec("/home/proxycheck/proxycheck/proxycheck $arguments 2>&1");
$fh = fopen($tempfile,'w');
fwrite($fh,$test);
fclose($fh);
}
$result .= (nl2br(htmlentities($test)));
$isproxy=false;
$ports = array('80','8080','3182','1080','4232','3380','4232','14321','14441','15551','17771','18844','19991','28882','29992','31121','38883','38884','18844','3800','8081','19991','28882','3124','3127','3128','6588','7212','8000','8888');
$report = "";
foreach ($ports as $port) {
if (preg_match("/$port open/i", $test)) {
$report .= "Open: $port<br>";
$isproxy = true;
}
}
$result .= "<br />\n";
$result .= "<br />\n";
//$result .= ("BLOCK: <a href="http://en.wikipedia.org/wiki/Special%3ABlockip/$ip"> Block this IP </a");
//$result .= "BLOCK: <a href="http://en.wikipedia.org/wiki/Special%3ABlockip/$ip"> Block this IP </a> ";
//$result .= "BLOCK: <a href="http://en.wikipedia.org/wiki/Special:Contributions/$ip"> User contribs </a> ";
//$result .= "$test";
//$result .= "$test";
$result .= "<br />\n";
$result .= "<br />\n";
$actions .= "<h3><a href='http://en.wikipedia.org/w/index.php?title=Special:Blockip&wpBlockAddress=$ip&wpBlockExpiry=indefinite&wpBlockOther=&wpBlockReason=%5B%5Bopen%20proxy%5D%5D%20or%20%5B%5BZombie_computer%7Czombie%5D%5D%20(see%20%5B%5BWP:OP%7CWikiProject%20on%20open%20proxies%5D%5D%20for%20information)'>WP: Block This IP $ip</a><br>\n";
$actions .= "<a href='http://en.wikisource.org/w/index.php?title=Special:Blockip&wpBlockAddress=$ip&wpBlockExpiry=infinite&wpBlockOther=&wpBlockReason=%5B%5Bopen%20proxy%5D%5D%20or%20%5B%5BZombie_computer%7Czombie%5D%5D%20(see%20%5B%5BWP:OP%7CWikiProject%20on%20open%20proxies%5D%5D%20for%20information)'>WS: Block This IP $ip</a><br>\n";
$actions .= "<a href='http://en.wiktionary.org/w/index.php?title=Special:Blockip&wpBlockAddress=$ip&wpBlockExpiry=infinite&wpBlockOther=&wpBlockReason=%5B%5Bopen%20proxy%5D%5D%20or%20%5B%5BZombie_computer%7Czombie%5D%5D%20(see%20%5B%5BWP:OP%7CWikiProject%20on%20open%20proxies%5D%5D%20for%20information)'>WT: Block This IP $ip</a><br>\n";
$actions .= "<a href='http://en.wikibooks.org/w/index.php?title=Special:Blockip&wpBlockAddress=$ip&wpBlockExpiry=infinite&wpBlockOther=&wpBlockReason=%5B%5Bopen%20proxy%5D%5D%20or%20%5B%5BZombie_computer%7Czombie%5D%5D%20(see%20%5B%5BWP:OP%7CWikiProject%20on%20open%20proxies%5D%5D%20for%20information)'>WB: Block This IP $ip</a><br>\n";
$actions .= "<a href='http://en.wikipedia.org/wiki/Special:Contributions/$ip'>WP: User Contribs for $ip</a><br>\n";
$actions .= "<a href='http://en.wikipedia.org/w/index.php?title=Special:Log/block&page=User:$ip'>WP: Block Log for $ip</a><br>\n";
$actions .= "<a href='http://en.wikipedia.org/w/index.php?title=User_talk:$ip&action=edit'>WP: Edit $ip user talk</a></h3>\n";
?>
<hi><?=($isproxy?"<span style=\"color: red\">$ip is probably a proxy</span>":"<span style=\"color: green\">$ip is probably NOT a proxy</span>")?></hi>
<p><?=$report?></p>
<?=$actions?>
<pre>
<?=$result?>
<?=$report?>
<? } ?> </body></html>

