Advertisement
Guest User

Dom xss?

a guest
Nov 29th, 2014
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function _START_TEMPLATE_SECTION() {}
  2.  
  3. function _END_TEMPLATE_SECTION() {}
  4.  
  5. function _TEMPLATE_VARIABLE() {}
  6.  
  7. function _INLINE_TEMPLATE_SECTION() {}
  8.  
  9. function _PARENS() {}
  10.  
  11. function _TEMPLATE_INCLUDE() {};
  12. var ifpc_;
  13. ifpc_ || (ifpc_ = function() {
  14.     function a(a) {
  15.         return 10 > a ? "0" + a : a
  16.     }
  17.  
  18.     function b(a) {
  19.         d.lastIndex = 0;
  20.         return d.test(a) ? '"' + a.replace(d, function(a) {
  21.             var b = p[a];
  22.             return "string" === typeof b ? b : "\\u" + (
  23.                 "0000" + (+a.charCodeAt(0)).toString(16)
  24.             ).slice(-4)
  25.         }) + '"' : '"' + a + '"'
  26.     }
  27.  
  28.     function c(a, e) {
  29.         var d, m, n, q, r = f,
  30.             l, h = e[a];
  31.         h && "object" === typeof h && "function" === typeof h.toJSON &&
  32.             (h = h.toJSON(a));
  33.         "function" === typeof k && (h = k.call(e, a, h));
  34.         switch (typeof h) {
  35.             case "string":
  36.                 return b(h);
  37.             case "number":
  38.                 return isFinite(h) ? String(h) : "null";
  39.             case "boolean":
  40.             case "null":
  41.                 return String(h);
  42.             case "object":
  43.                 if (!h) return "null";
  44.                 f += g;
  45.                 l = [];
  46.                 if ("number" === typeof h.length && !h.propertyIsEnumerable(
  47.                     "length")) {
  48.                     q = h.length;
  49.                     for (d = 0; d < q; d += 1) l[d] = c(d, h) ||
  50.                         "null";
  51.                     n = 0 === l.length ? "[]" : f ? "[\n" + f + l.join(
  52.                         ",\n" + f) + "\n" + r + "]" : "[" + l.join(
  53.                         ",") + "]";
  54.                     f = r;
  55.                     return n
  56.                 }
  57.                 if (k && "object" === typeof k)
  58.                     for (q = k.length, d = 0; d < q; d += 1) m = k[
  59.                         d], "string" === typeof m && (n = c(m,
  60.                         h)) && l.push(b(m) + (f ? ": " : ":") +
  61.                         n);
  62.                 else
  63.                     for (m in h) Object.hasOwnProperty.call(h, m) &&
  64.                         (n = c(m, h)) && l.push(b(m) + (f ? ": " :
  65.                             ":") + n);
  66.                 n = 0 === l.length ? "{}" : f ? "{\n" + f + l.join(
  67.                     ",\n" + f) + "\n" + r + "}" : "{" + l.join(
  68.                     ",") + "}";
  69.                 f = r;
  70.                 return n
  71.         }
  72.     }
  73.     Date.prototype.toJSON = function() {
  74.         return this.getUTCFullYear() + "-" + a(this.getUTCMonth() +
  75.                 1) + "-" + a(this.getUTCDate()) + "T" + a(this.getUTCHours()) +
  76.             ":" + a(this.getUTCMinutes()) + ":" + a(this.getUTCSeconds()) +
  77.             "Z"
  78.     };
  79.     String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype
  80.         .toJSON = function() {
  81.             return this.valueOf()
  82.         };
  83.     var e =
  84.         /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
  85.         d =
  86.         /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
  87.         f, g, p = {
  88.             "\b": "\\b",
  89.             "\t": "\\t",
  90.             "\n": "\\n",
  91.             "\f": "\\f",
  92.             "\r": "\\r",
  93.             '"': '\\"',
  94.             "\\": "\\\\"
  95.         },
  96.         k;
  97.     return {
  98.         stringify: function(a, b, d) {
  99.             var e;
  100.             g = f = "";
  101.             if ("number" === typeof d)
  102.                 for (e = 0; e < d; e += 1) g += " ";
  103.             else "string" === typeof d && (g = d); if ((k = b) &&
  104.                 "function" !== typeof b && ("object" !== typeof b ||
  105.                     "number" !== typeof b.length)) throw Error(
  106.                 "JSON.stringify");
  107.             return c("", {
  108.                 "": a
  109.             })
  110.         },
  111.         parse: function(a, b) {
  112.             function c(a, b) {
  113.                 var e, f, g = a[b];
  114.                 if (g && "object" === typeof g)
  115.                     for (e in g) Object.hasOwnProperty.call(g,
  116.                         e) && (f = c(g, e), void 0 !== f ?
  117.                         g[e] = f : delete g[e]);
  118.                 return d.call(a, b, g)
  119.             }
  120.             var d = b,
  121.                 f;
  122.             e.lastIndex = 0;
  123.             e.test(a) && (a = a.replace(e, function(a) {
  124.                 return "\\u" + ("0000" + (+a.charCodeAt(
  125.                     0)).toString(16)).slice(-4)
  126.             }));
  127.             if (/^[\],:{}\s]*$/.test(a.replace(
  128.                     /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@")
  129.                 .replace(
  130.                     /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
  131.                     "]").replace(/(?:^|:|,)(?:\s*\[)+/g, "")))
  132.                 return f = eval("(" + a + ")"), "function" ===
  133.                     typeof d ? c({
  134.                         "": f
  135.                     }, "") : f;
  136.             throw Error("JSON.parse");
  137.         }
  138.     }
  139. }());
  140. ifpc_.parse = function() {
  141.     var a = ifpc_.parse;
  142.     return function(b, c) {
  143.         try {
  144.             return a(b, c)
  145.         } catch (e) {
  146.             return !1
  147.         }
  148.     }
  149. }();
  150.  
  151. function ifpc_a(a) {
  152.     var b = document.createElement("DIV");
  153.     b.innerHTML = "<iframe onload='this.pool_locked=false'></iframe>";
  154.     var c = b.getElementsByTagName("IFRAME")[0];
  155.     c.style.visibility = "hidden";
  156.     c.style.width = c.style.height = "0px";
  157.     c.style.border = "0px";
  158.     c.style.position = "absolute";
  159.     c.pool_locked = a;
  160.     this.b[this.b.length] = c;
  161.     b.removeChild(c);
  162.     return c
  163. }
  164.  
  165. function ifpc_b(a) {
  166.     if (a.match(/^http[s]?:\/\//)) {
  167.         var b = this;
  168.         window.setTimeout(function() {
  169.             for (var c = null, e = b.b.length - 1; 0 <= e; e--) {
  170.                 var d = b.b[e];
  171.                 if (d && !d.pool_locked)
  172.                     if (d.parentNode.removeChild(d), window.ActiveXObject)
  173.                         b.b[e] = null, b.b.splice(e, 1);
  174.                     else {
  175.                         d.pool_locked = !0;
  176.                         c = d;
  177.                         break
  178.                     }
  179.             }
  180.             c = c ? c : b.p(!0);
  181.             c.src = a;
  182.             document.body.appendChild(c)
  183.         }, 0)
  184.     }
  185. }
  186.  
  187. function ifpc_c() {
  188.     for (var a = 0; a < this.b.length; a++) this.b[a].onload = null, this.b[
  189.         a] = null;
  190.     this.b.length = 0;
  191.     this.b = []
  192. }
  193.  
  194. function ifpc_d() {
  195.     for (var a = 0; a < this.b.length; a++) {
  196.         var b = this.b[a];
  197.         b && b.parentNode.removeChild(b)
  198.     }
  199. }
  200.  
  201. function ifpc_e() {
  202.     this.b = [];
  203.     this.p = ifpc_a;
  204.     this.iframe = ifpc_b;
  205.     this.clear = ifpc_c;
  206.     this.dispose = ifpc_d
  207. }
  208.  
  209. function ifpc_f(a, b) {
  210.     _IFPC.e[a] = b
  211. }
  212.  
  213. function ifpc_g(a) {
  214.     delete _IFPC.e[a]
  215. }
  216.  
  217. function ifpc_h(a, b, c, e, d, f, g, p) {
  218.     if (!_IFPC.j) {
  219.         var k = 4095 - e.length,
  220.             k = parseInt(k / 3, 10);
  221.         "undefined" == typeof g && (g = !0);
  222.         if (p) g = {
  223.             s: b,
  224.             a: c,
  225.             f: "..",
  226.             t: window._isk[a.split("_")[2]]
  227.         }, a = [a, "..", _IFPC.h, 1, 1, encodeURIComponent(ifpc_.stringify(
  228.             g))].join("&"), _IFPC.g.iframe(e + "#" + a);
  229.         else
  230.             for (c = c.slice(0), c.unshift(_IFPC.w(d)), c.unshift(f), c.unshift(
  231.                 b), c.unshift(a), b = _IFPC.m(c), c = parseInt(b.length /
  232.                 k, 10), 0 < b.length % k && (c += 1), d = 0; d < c; d++) f =
  233.                 b.substr(d * k, k), f = [a, _IFPC.h, c, d, f, g], _IFPC.g.iframe(
  234.                     e + "#" + _IFPC.m(f));
  235.         _IFPC.h++
  236.     }
  237. }
  238.  
  239. function ifpc_i() {
  240.     _IFPC.e = {};
  241.     _IFPC.d = {};
  242.     _IFPC.g.clear()
  243. }
  244.  
  245. function ifpc_j() {
  246.     _IFPC.j || (_IFPC.j = !0, _IFPC.g.dispose(), _IFPC.clear())
  247. }
  248.  
  249. function ifpc_k(a) {
  250.     var b = _IFPC.i(a)[0],
  251.         c = null;
  252.     try {
  253.         c = window.parent.frames[b]
  254.     } catch (e) {}
  255.     try {
  256.         c || window.parent.parent.frames[b] == window.parent || (window.parent
  257.             .parent.frames[b].setTimeout(function() {}, 0), c = window.parent
  258.             .parent.frames[b])
  259.     } catch (d) {}
  260.     c || (c = window.parent.parent);
  261.     c && void 0 != c._IFPC ? (b = function() {
  262.         c._IFPC.handleRequest(a)
  263.     }, window.ActiveXObject ? b() : c.setTimeout(b, 0)) : c = null
  264. }
  265.  
  266. function ifpc_l(a) {
  267.     a = _IFPC.i(a);
  268.     var b = a.shift(),
  269.         c = a.shift(),
  270.         e = a.shift(),
  271.         d = a.shift(),
  272.         f = a.shift();
  273.     a = a.shift();
  274.     b = b + "_" + c;
  275.     _IFPC.c[b] || (_IFPC.c[b] = []);
  276.     _IFPC.c[b].push([d, f]);
  277.     if (_IFPC.c[b].length == e) {
  278.         _IFPC.c[b].sort(function(a, b) {
  279.             return parseInt(a[0], 10) - parseInt(b[0], 10)
  280.         });
  281.         f = "";
  282.         for (d = 0; d < e; d++) f += _IFPC.c[b][d][1];
  283.         _IFPC.c[b] = null;
  284.         var d = _IFPC.i(f),
  285.             b = d.shift(),
  286.             c = d.shift(),
  287.             e = d.shift(),
  288.             f = d.shift(),
  289.             g = _IFPC.u(c);
  290.         if (g) a = g.apply(null, d), _IFPC.v(f) && (a.unshift(f), _IFPC.call(
  291.             b, _IFPC.l, a, e, null, ""));
  292.         else if (a) throw Error("Service " + c + " not registered.");
  293.     }
  294. }
  295.  
  296. function ifpc_m(a) {
  297.     return _IFPC.e.hasOwnProperty(a) ? _IFPC.e[a] : null
  298. }
  299.  
  300. function ifpc_n(a) {
  301.     var b = "";
  302.     a && "function" == typeof a && (b = _IFPC.r(), _IFPC.d[b] = a);
  303.     return b
  304. }
  305.  
  306. function ifpc_o(a) {
  307.     _IFPC.d.hasOwnProperty(a) && (_IFPC.d[a] = null)
  308. }
  309.  
  310. function ifpc_p(a) {
  311.     return a && _IFPC.d.hasOwnProperty(a) ? _IFPC.d[a] : null
  312. }
  313.  
  314. function ifpc_q() {
  315.     return _IFPC.k + _IFPC.n++
  316. }
  317.  
  318. function ifpc_r(a) {
  319.     return 0 == (a + "").indexOf(_IFPC.k)
  320. }
  321.  
  322. function ifpc_s(a) {
  323.     a = a.split("&");
  324.     for (var b = 0; b < a.length; b++) {
  325.         var c = decodeURIComponent(a[b]);
  326.         try {
  327.             c = ifpc_.parse(c)
  328.         } catch (e) {}
  329.         a[b] = c
  330.     }
  331.     return a
  332. }
  333.  
  334. function ifpc_t(a) {
  335.     for (var b = [], c = 0; c < a.length; c++) {
  336.         var e = ifpc_.stringify(a[c]);
  337.         b.push(encodeURIComponent(e))
  338.     }
  339.     return b.join("&")
  340. }
  341.  
  342. function ifpc_u(a) {
  343.     var b = _IFPC.q(a);
  344.     if (b) {
  345.         for (var c = [], e = 1; e < arguments.length; e++) c[c.length] =
  346.             arguments[e];
  347.         b.apply(null, c);
  348.         _IFPC.z(a)
  349.     } else throw Error("Invalid callbackId");
  350. }
  351. var _IFPC = {};
  352.  
  353. function ifpc_v(a) {
  354.     (a = window._argsUrl && window._argsUrl(a)) && 1 == a.exp_rpc_js && (
  355.         window.FLAG_use_rpc_js = !0);
  356.     window.FLAG_use_rpc_js ? _IFPC = {
  357.         registerService: function(a, c) {
  358.             window.gadgets.rpc.register(a, function() {
  359.                 var a = this.a.slice(0);
  360.                 a.unshift(this.f);
  361.                 c.apply(null, a)
  362.             })
  363.         },
  364.         unregisterService: function(a) {
  365.             window.gadgets.rpc.unregister(a)
  366.         },
  367.         handleRequest: function(a) {
  368.             window.gadgets.rpc.receive(a)
  369.         },
  370.         call: function(a, c, e, d, f, g, p, k) {
  371.             g = window.gadgets.rpc;
  372.             d == g.getRelayUrl("..") && (a = "..");
  373.             e || (e = []);
  374.             k || (e = e.slice(1));
  375.             e.unshift(f);
  376.             e.unshift(c);
  377.             e.unshift(a);
  378.             g.call.apply(g, e)
  379.         }
  380.     } : (_IFPC = {
  381.         registerService: ifpc_f,
  382.         unregisterService: ifpc_g,
  383.         call: ifpc_h,
  384.         clear: ifpc_i,
  385.         dispose: ifpc_j,
  386.         relayRequest: ifpc_k,
  387.         processRequest: ifpc_k,
  388.         handleRequest: ifpc_l,
  389.         k: "cbid",
  390.         l: "ifpc_callback",
  391.         g: new ifpc_e,
  392.         c: {},
  393.         e: {},
  394.         d: {},
  395.         n: 0,
  396.         h: 0,
  397.         j: !1,
  398.         u: ifpc_m,
  399.         w: ifpc_n,
  400.         z: ifpc_o,
  401.         q: ifpc_p,
  402.         r: ifpc_q,
  403.         v: ifpc_r,
  404.         i: ifpc_s,
  405.         m: ifpc_t,
  406.         o: ifpc_u
  407.     }, _IFPC.registerService(_IFPC.l, _IFPC.o));
  408.     _IFPC.registerService = _IFPC.registerService;
  409.     _IFPC.unregisterService = _IFPC.unregisterService;
  410.     _IFPC.call = _IFPC.call;
  411.     _IFPC.handleRequest = _IFPC.handleRequest
  412. }
  413. ifpc_v(document.location.href);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement