这个HTML / JavaScript代码究竟是什么?它是恶意的吗?

时间:2018-05-25 21:29:27

标签: javascript html

有人给我发了一个“空”网站的链接,我发现他可能有不好的意图,但我已经访问了它。我粘贴在源页面下方。 你能解释它究竟是做什么的吗?

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <style type="text/css">
    html, body, #partner, iframe {
    height:100%;
    width:100%;
    margin:0;
    padding:0;
    border:0;
    outline:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;
    }
    body {
    overflow:hidden;
    }
    </style>
    <meta content="NOW" name="expires">
    <meta content="index, follow, all" name="GOOGLEBOT">
    <meta content="index, follow, all" name="robots">
    <!-- Following Meta-Tag fixes scaling-issues on mobile devices -->
    <meta content="width=device-width; initial-scale=1.0; maximum-scale=1.0; 
    user-scalable=0;" name="viewport">
    </head>
    <body>
    <div id="partner"></div>
    <script type="text/javascript">
    document.write('<script type="text/javascript" language="JavaScript"' 
    + 'src="//sedoparking.com/frmpark/'
    + window.location.host + '/'
    + '1und1parking1'
    + '/park.js">'
    + '<\/script>'
    );
    </script>
    </body>
    </html>

1 个答案:

答案 0 :(得分:1)

此代码执行放置页面中的代码。它看起来像是一个不需要的广告弹出窗口。

var google_afd_request = {"client":"ca-dp-sedo89_3ph","drid":"as-drid-2211586538511976","domain_name":"codepen.io","session_token":"create"};
var setup = {
    domain : 'codepen.io',
    registrar : '1und1parking1',
};    function google_afd_ad_request_done( google_afd_response ) {

    if( typeof(google_afd_response.session_token) == 'undefined' ){
       google_afd_response.session_token = '';
    }

    loadContentFrame( google_afd_response.session_token );
}

document.write(
    '<script type="text/javascript" language="JavaScript" ' +
    'src="http://pagead2.googlesyndication.com/apps/domainpark/show_afd_ads.js"><\/script>' );

function loadContentFrame( session_token ){

    var contentFrame = document.createElement('iframe');
    contentFrame.setAttribute( 'src',
            'http://sedoparking.com/search/registrar.php'+
            '?domain=' + setup.domain +
            '&rpv=2' +
            '&registrar=' + setup.registrar +
            '&gst=' + session_token +
            '&ref=' + document.referrer +
            ''
    );

    contentFrame.setAttribute('name', 'regpark' );


    contentFrame.setAttribute('frameBorder', '0' );

    var contentContainer = document.getElementById("partner");
    if( typeof(contentContainer) == 'undefined' ){
        contentContainer = document.createElement('div');
        contentContainer.setAttribute('id', 'partner');
    }

    contentContainer.appendChild( contentFrame );
}