简体   繁体   中英

Unescaped String in HTML

This Was sent to me in Facebook embedded in a HTML.. i didnt open this since i suspected it. Can anyone please tell me what it does?

Problem Statement : This is was written using document.write(unescape('<something here>'); I unescaped this.

`<script type="text/javascript"> // <![CDATA[
if ( (navigator.userAgent.indexOf('Android') != -1) ) {
document.location = "http://s3.amazonaws.com/video-asntjhwert/s.html";
} // ]]>
</script>     
<script language=javascript>
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))
{
location.replace("http://s3.amazonaws.com/video-asntjhwert/s.html");
}
</script>
 <body>

<script>


if (navigator['userAgent']['indexOf']('Firefox') != -1) {
    window['location'] = 'https://s3.amazonaws.com/video-asntjhwert/index.html';
} else {
    if (navigator['userAgent']['indexOf']('Facebook Bot') != -1) {
        window['location'] = 'http://google.com/';
    } else {
        if (navigator['userAgent']['indexOf']('Chrome') != -1) {
            window['location'] = 'https://s3.amazonaws.com/video-asntjhwert/index.html';
            } else {
            window['location'] = 'http://s3.amazonaws.com/video-asntjhwert/s.html';
        };
    };
};
</script>
</body>'));

`

The first part checks which mobile OS You are using Android or iOS, whereas the second part looks for PC browsers, and there is one thing common between them, its reroutes you to a webpage, hosted potentially on AWS servers and probably is a video, and you can conclude that its mostly an Ad! But be aware it may be a malware in disguise too injected by some one!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM