Advertisement
gowenfawr

se.a.102897.3365.tags.js

Oct 19th, 2015
540
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var org_str = "vduzzz8d";
  2. var session_str = "a91013b9e0042d1a033ab51fa60d08281445023133826";
  3. var base_str = "https://h.online-metrix.net/fp";
  4. var page_id = "1";
  5. var ip_addr_str = "FFFFFFFFFFFFFFFF";
  6. var tarpitting_param = "";
  7. var carrier_id_enabled = "false";
  8. var flash_tags = "true";
  9.  
  10.  
  11. var thm_tags = {
  12.     injectIframe: function(org_id, session_id, page_id) {
  13.         var dom, doc, where, iframe = document.createElement('iframe');
  14.         iframe.src = "javascript:false";
  15.         (iframe.frameElement || iframe).style.cssText = "width:100px;height:100px;border:0;position:absolute;top:-5000px;";
  16.         where = document.getElementById("thm_iframe_loc");
  17.         if (!where) {
  18.             document.body.appendChild(iframe);
  19.         } else {
  20.             where.parentNode.insertBefore(iframe, where);
  21.         }
  22.         try {
  23.             doc = iframe.contentWindow.document;
  24.         } catch (e) {
  25.             dom = document.domain;
  26.             iframe.src = "javascript:var d=document.open();d.domain='" + dom + "';void(0);";
  27.             doc = iframe.contentWindow.document;
  28.         }
  29.         doc.open()._l = function() {
  30.             if (typeof this.readyState === "undefined" || typeof this.readyState === "unknown") {
  31.                 this.readyState = "complete";
  32.             }
  33.             if (dom) {
  34.                 this.domain = dom;
  35.             }
  36.             var divx, param1, param2, obj, swf_url, win, img, js, u, p, div = this.createElement('p');
  37.             this.body.appendChild(div);
  38.             div.style.background = "url(" + base_str + "/clear.png?org_id=" + org_id + "&session_id=" + session_id + "&m=1&w=" + ip_addr_str + tarpitting_param + ")";
  39.             img = this.createElement("img");
  40.             img.src = base_str + "/clear.png?org_id=" + org_id + "&session_id=" + session_id + "&m=2" + tarpitting_param;
  41.             this.body.appendChild(img);
  42.             js = this.createElement("script");
  43.             js.src = base_str + "/check.js?org_id=" + org_id + "&session_id=" + session_id + tarpitting_param + "&pageid=" + page_id;
  44.             this.body.appendChild(js);
  45.             if (carrier_id_enabled === "true") {
  46.                 var ciddoc, cidframe = document.createElement("iframe");
  47.                 cidframe.src = "javascript:false";
  48.                 (cidframe.frameElement || cidframe).style.cssText = "width:100px;height:100px;border:0;position:absolute;top:-5000px;";
  49.                 document.body.appendChild(cidframe);
  50.                 try {
  51.                     ciddoc = cidframe.contentWindow.document;
  52.                 } catch (e) {
  53.                     cidframe.src = "javascript:var d=document.open();d.domain='" + document.domain + "';void(0);";
  54.                     ciddoc = cidframe.contentWindow.document;
  55.                 }
  56.                 ciddoc.open()._l = function() {
  57.                     var cidscript = this.createElement("script");
  58.                     cidscript.src = base_str + "/checkcid.js?org_id=" + org_id + "&session_id=" + session_id;
  59.                     this.body.appendChild(cidscript);
  60.                 };
  61.                 ciddoc.write('<body onload="document._l();">');
  62.                 ciddoc.close();
  63.             }
  64.             if (flash_tags === "true") {
  65.                 u = navigator.userAgent.toLowerCase();
  66.                 p = navigator.platform.toLowerCase();
  67.                 win = p ? /win/.test(p) : /win/.tesft(u);
  68.                 try {
  69.                     ie = !+"\v1";
  70.                     if (!ie) {
  71.                         ie = /*@cc_on!@*/ false;
  72.                     }
  73.                 } catch (e) {}
  74.                 if (!ie) {
  75.                     ie = (navigator.userAgent.indexOf('MSIE') > -1);
  76.                 }
  77.                 swf_url = base_str + "/fp.swf?org_id=" + org_id + "&session_id=" + session_id + tarpitting_param;
  78.                 if (ie && win) {
  79.                     divx = this.createElement("div");
  80.                     divx.innerHTML = '<object type="application/x-shockwave-flash"data="' + swf_url + '"width="1"height="1"><param name="movie"value="' + swf_url + '"/><param name="wmode"value="transparent"/></object>';
  81.                     this.body.appendChild(divx);
  82.                 } else {
  83.                     obj = this.createElement('object');
  84.                     obj.setAttribute("type", "application/x-shockwave-flash");
  85.                     obj.setAttribute("data", swf_url);
  86.                     obj.setAttribute("width", "1");
  87.                     obj.setAttribute("height", "1");
  88.                     param1 = this.createElement('param');
  89.                     param1.setAttribute("name", "movie");
  90.                     param1.setAttribute("value", swf_url);
  91.                     param2 = this.createElement('param');
  92.                     param2.setAttribute("name", "wmode");
  93.                     param2.setAttribute("value", "transparent");
  94.                     obj.appendChild(param1);
  95.                     obj.appendChild(param2);
  96.                     this.body.appendChild(obj);
  97.                 }
  98.             }
  99.         };
  100.         doc.write('<body onload="document._l();">');
  101.         doc.close();
  102.     },
  103.     go: function() {
  104.         if (session_str && org_str) {
  105.             var isWebkit = 'WebkitAppearance' in document.documentElement.style;
  106.             if (document.body && (document.readyState === 'complete' || !isWebkit)) {
  107.                 this.injectIframe(org_str, session_str, page_id);
  108.                 return;
  109.             }
  110.             var waittime = 200;
  111.             var node;
  112.             if (typeof window !== "undefined" && typeof window !== "unknown" && window !== null) {
  113.                 node = window;
  114.             } else {
  115.                 node = document.body;
  116.             }
  117.             if (node.addEventListener) {
  118.                 node.addEventListener("load", function() {
  119.                     thm_tags.injectIframe(org_str, session_str, page_id);
  120.                 }, false);
  121.             } else {
  122.                 if (node.attachEvent) {
  123.                     node.attachEvent("onload", function() {
  124.                         thm_tags.injectIframe(org_str, session_str, page_id);
  125.                     });
  126.                 } else {
  127.                     var oldonload = node.onload;
  128.                     node.onload = new function() {
  129.                         var r = true;
  130.                         if (oldonload !== null && typeof oldonload === "function") {
  131.                             r = oldonload();
  132.                         }
  133.                         setTimeout(function() {
  134.                             thm_tags.injectIframe(org_str, session_str, page_id);
  135.                         }, waittime);
  136.                         node.onload = oldonload;
  137.                         return r;
  138.                     };
  139.                 }
  140.             }
  141.         }
  142.     }
  143. };
  144. thm_tags.go();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement