Код:
<?php
set_time_limit(0);
function google($domen){
$file=file_get_contents("http://www.google.ru/ie?q=site%3A$domen&hl=ru&newwindow=1&btnG=%D0%9F%D0%BE%D0%B8%D1%81%D0%BA&num=100");
//$file=file_get_contents("http://www.google.ru/ie?q=".urlencode(trim($text))."&hl=ru&lr=&newwindow=1&btnI=I%27m+Feeling+Lucky&num=10000");
$result = array ();
$ex = array ();
$regexp = '[0-9]. <a title="(.*)" href=(.*)>(.*)<\/a>';
if (preg_match_all("/$regexp/siU", $file, $matches)) {
foreach($matches[2] as $item) {
array_push($result,$item);
}
if (is_integer(strpos($file,"&start="))) { // От 0 до 100
$file=file_get_contents("http://www.google.ru/ie?q=site:$domen&num=100&hl=ru&start=100&sa=N");
if (preg_match_all("/$regexp/siU", $file, $matches)) {foreach($matches[2] as $item) { array_push($result,$item);}}}
if (is_integer(strpos($file,"&start="))) { // От 100 до 200
$file=file_get_contents("http://www.google.ru/ie?q=site:$domen&num=200&hl=ru&start=100&sa=N");
if (preg_match_all("/$regexp/siU", $file, $matches)) {foreach($matches[2] as $item) { array_push($result,$item);}}}
if (is_integer(strpos($file,"&start="))) { // От 200 до 300
$file=file_get_contents("http://www.google.ru/ie?q=site:$domen&num=300&hl=ru&start=100&sa=N");
if (preg_match_all("/$regexp/siU", $file, $matches)) {foreach($matches[2] as $item) { array_push($result,$item);}}}
if (is_integer(strpos($file,"&start="))) { // От 300 до 400
$file=file_get_contents("http://www.google.ru/ie?q=site:$domen&num=400&hl=ru&start=100&sa=N");
if (preg_match_all("/$regexp/siU", $file, $matches)) {foreach($matches[2] as $item) { array_push($result,$item);}}}
if (is_integer(strpos($file,"&start="))) { // От 400 до 500
$file=file_get_contents("http://www.google.ru/ie?q=site:$domen&num=500&hl=ru&start=100&sa=N");
if (preg_match_all("/$regexp/siU", $file, $matches)) {foreach($matches[2] as $item) { array_push($result,$item);}}}
if (is_integer(strpos($file,"&start="))) { // От 500 до 600
$file=file_get_contents("http://www.google.ru/ie?q=site:$domen&num=600&hl=ru&start=100&sa=N");
if (preg_match_all("/$regexp/siU", $file, $matches)) {foreach($matches[2] as $item) { array_push($result,$item);}}}
if (is_integer(strpos($file,"&start="))) { // От 600 до 700
$file=file_get_contents("http://www.google.ru/ie?q=site:$domen&num=700&hl=ru&start=100&sa=N");
if (preg_match_all("/$regexp/siU", $file, $matches)) {foreach($matches[2] as $item) { array_push($result,$item);}}}
if (is_integer(strpos($file,"&start="))) { // От 700 до 800
$file=file_get_contents("http://www.google.ru/ie?q=site:$domen&num=800&hl=ru&start=100&sa=N");
if (preg_match_all("/$regexp/siU", $file, $matches)) {foreach($matches[2] as $item) { array_push($result,$item);}}}
if (is_integer(strpos($file,"&start="))) { // От 800 до 900
$file=file_get_contents("http://www.google.ru/ie?q=site:$domen&num=900&hl=ru&start=100&sa=N");
if (preg_match_all("/$regexp/siU", $file, $matches)) {foreach($matches[2] as $item) { array_push($result,$item);}}}
if (is_integer(strpos($file,"&start="))) { // От 800 до 900
$file=file_get_contents("http://www.google.ru/ie?q=site:$domen&num=1000&hl=ru&start=100&sa=N");
if (preg_match_all("/$regexp/siU", $file, $matches)) {foreach($matches[2] as $item) { array_push($result,$item);}}}
for ($i = 0; $i <= count($result)-1; $i++) {
if (is_integer(strpos($result[$i],"="))) {
$s=$result[$i];
$s=str_replace("&","'&",$s);
$s = $s."'";
$rx=file_get_contents($s);
if (is_integer(strpos($rx,"SQL syntax"))){
flush();
echo "<span class=\"red\">$s</span><br>";}
}}
if(count($ex)==0)
array_push($ex,"<center><b>Not found</b></center>");
return $ex;
} else return "<center><b>Not found</b></center>";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>SQL Inj Tester - Coded by ArxWolf, Powered by WebXakep.net - Russian</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<meta name="author" content="ArxWolf">
<style>
.red:link { color: red; font-weight: bold; text-decoration: none;}
.red:visited { color: red; font-weight: bold; text-decoration: none;}
.red:hover { color: red; font-weight: bold; text-decoration: underline;}
.red:active { color: red; font-weight: bold; text-decoration: none;}
body {
background-color: #1B1B1B;
font: normal 10px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
color: #83AACB;
font-weight: bold;
}
input,textarea,select
{font: normal 11px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
color: #B4B4B4;
background-color: #333333;
border-color: #424242;
border-left: 1px solid #0A0A0A;
border-top: 1px solid #0A0A0A;
border-right: 1px solid #2C2C2C;
border-bottom: 1px solid #2C2C2C;}
input:hover, textarea:hover, select:hover {
border-color: #B6FF48;
color: #B6FF48;}
input:focus, textarea:focus, select:hover {
border-color: #B6FF48;
color: #ffffff;}
.td {
border: 1px solid #666666;
}
</style>
</head>
<body>
<form method="post">
<table width="200" border="0" align="center" class="td">
<tr>
<td nowrap>Host [Scanning a maximum of 1000 pages]:</td>
<td><input type="text" name="tt" size="30"></td>
</tr>
<tr>
<td colspan="2"><div align="right">
<input type="submit" name="sbm" value="Run">
</div></td>
</tr>
</table>
</form>
<?php
if (isset($_POST['sbm'])){
$txt=$_POST['tt'];
if ($txt=="") die("<center><b>Empty</b></center>");
$res=google($txt);
}
?>
</body>
</html>
|