-
-
Save yingziwu/6e16c14565eec77e6768411677ed1ff3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _window = window, | |
_document = _window["document"], | |
_navigator = _window["navigator"], | |
_screen = _window["screen"], | |
g = "https://miao.baidu.com/abdr", | |
S__abbaidu_ = "__abbaidu_", | |
S_2_9_1 = "2.9.17", | |
I_2020 = 2020, | |
S__abbaidu_2020_zidgetf = S__abbaidu_ + I_2020 + "_zidgetf", | |
S__abbaidu_2020_bidgetf = S__abbaidu_ + I_2020 + "_bidgetf", | |
S__abbaidu_2020_subidgetf = S__abbaidu_ + I_2020 + "_subidgetf", | |
S__abbaidu_2020_extra_datagetf = S__abbaidu_ + I_2020 + "_extra_datagetf", | |
S__abbaidu_2020_onerror = S__abbaidu_ + I_2020 + "_onerror", | |
S_3a159c9c204845c9 = "3a159c9c204845c9", | |
S__abbaidu_2020_cb = S__abbaidu_ + I_2020 + "_cb", | |
S_7D33FCD55FE3447C = "7D33FCD55FE3447C", | |
S_636014d173e04409 = "636014d173e04409", | |
I_2500 = 2500, | |
U_8000 = 8000; | |
/** | |
* 在全局下执行函数 | |
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply | |
* | |
* @param {Function} func | |
* @param {Array} x | |
* @return {any} | |
*/ | |
function windowCall(func, x) { | |
try { | |
return func && func["apply"](window, x || []) || ""; | |
} catch (y) { | |
return ""; | |
} | |
} | |
/** | |
* | |
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor | |
* @param {*} object | |
* @param {*} property | |
* @return {*} | |
*/ | |
function getToStringLength(object, property) { | |
try { | |
var u = Object["getOwnPropertyDescriptor"](object, property); | |
return u ? u["get"] ? u["get"]["toString"]()["length"] : 0 : 0; | |
} catch (D) { | |
return 0; | |
} | |
} | |
/** | |
* https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener | |
* | |
* @param {Window|Document|Element} target | |
* @param {Event} eventType | |
* @param {EventListener|Function} listener | |
*/ | |
function _addEventListener(target, eventType, listener) { | |
target["addEventListener"] ? target["addEventListener"](eventType, listener, true) : target["attachEvent"] && target["attachEvent"]("on" + eventType, listener, true); | |
} | |
/** | |
* | |
* | |
* @param {Window|Document|Element} target | |
* @param {Event} eventType | |
* @param {EventListener|Function} listener | |
*/ | |
function _removeEventListener(target, eventType, listener) { | |
target["addEventListener"] ? target["removeEventListener"](eventType, listener, true) : target["attachEvent"] && target["detachEvent"]("on" + eventType, listener, true); | |
} | |
/** | |
* 获取时间戳 | |
* | |
* @return {number} | |
*/ | |
function getTime() { | |
return new Date()["getTime"](); | |
} | |
/** | |
* | |
* | |
* @param {*} h | |
*/ | |
function appendLogData(h) { | |
var data, | |
sdk_log_data = document["getElementById"]("__sdk_log_data"); | |
sdk_log_data && | |
( | |
(data = JSON["parse"]( | |
sdk_log_data["innerHTML"] || "[]" | |
) | |
)["push"](h), | |
sdk_log_data["innerHTML"] = JSON["stringify"](data, null, 2) | |
); | |
} | |
/** | |
* base64 | |
* | |
*/ | |
function R() { | |
var d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; | |
this["encode"] = function (h) { | |
var E, | |
u, | |
R, | |
g, | |
Y, | |
f, | |
p = "", | |
i = 0; | |
for (h = function (h) { | |
h = h["replace"](/\r\n/g, "\n"); | |
for (var E = "", u = 0; u < h["length"]; u++) { | |
var R = h["charCodeAt"](u); | |
R < 128 ? E += String["fromCharCode"](R) : (127 < R && R < 2048 ? E += String["fromCharCode"](R >> 6 | 192) : (E += String["fromCharCode"](R >> 12 | 224), E += String["fromCharCode"](R >> 6 & 63 | 128)), E += String["fromCharCode"](63 & R | 128)); | |
} | |
return E; | |
}(h); i < h["length"];) R = (f = h["charCodeAt"](i++)) >> 2, g = (3 & f) << 4 | (E = h["charCodeAt"](i++)) >> 4, Y = (15 & E) << 2 | (u = h["charCodeAt"](i++)) >> 6, f = 63 & u, isNaN(E) ? Y = f = 64 : isNaN(u) && (f = 64), p = p + d["charAt"](R) + d["charAt"](g) + d["charAt"](Y) + d["charAt"](f); | |
return p; | |
}; | |
} | |
/** | |
* base64 encode | |
* @param {string} | |
* @return {string} | |
*/ | |
var _btoa = window["btoa"] || function (h) { | |
return new R()["encode"](h); | |
}; | |
/** | |
* send xhr | |
* | |
* @param {object} paramsDictionary | |
*/ | |
function xhr(paramsDictionary) { | |
var url = paramsDictionary["url"], | |
data = paramsDictionary["data"], | |
success = paramsDictionary["success"], | |
error = paramsDictionary["error"], | |
headers = paramsDictionary["headers"], | |
headers_new = void 0 === headers ? {} : headers, | |
withCredentials = paramsDictionary["withCredentials"], | |
XDomainRequest = _window["XDomainRequest"]; | |
void 0 === withCredentials && (withCredentials = true), windowCall(XDomainRequest ? function () { | |
var E = new XDomainRequest(); | |
E["open"]("post", url, true), withCredentials && (E["withCredentials"] = true), E["onerror"] = function (h) { | |
error && error(h); | |
}, E["onload"] = function () { | |
var h = E["responseText"]; | |
success && success(h); | |
}, setTimeout(function () { | |
_window["signSendStartTime"] && _window["signSendStartTime"](), E["send"](data); | |
}, 0); | |
} : function () { | |
var h, | |
u = new _window["XMLHttpRequest"](); | |
for (h in u["open"]("POST", url, true), headers_new) u["setRequestHeader"](h, headers_new[h]); | |
withCredentials && (u["withCredentials"] = true), u["onreadystatechange"] = function (h) { | |
var E; | |
4 === u["readyState"] && 200 === u["status"] && (E = u["responseText"], success && success(E, u)); | |
}, u["onerror"] = function (h) { | |
error && error(h); | |
}, _window["signSendStartTime"] && _window["signSendStartTime"](), u["send"](data); | |
}); | |
} | |
var aq = { | |
"TOTAL": "t", | |
"CID": "cid", | |
"CANVAS_NATIVE": "cn", | |
"CANVAS_SHA1": "cs", | |
"CANVAS": "c", | |
"BATTERY_INFO_EVENT_LOOP": "biel", | |
"WEBGL": "w", | |
"FIELD_S": "fs", | |
"CODE_S": "codes" | |
}; | |
/** | |
* | |
* @property {number} | |
*/ | |
function _times() { | |
this["_times"] = {}; | |
} | |
_times["prototype"]["start"] = function (h) { | |
this["_times"][h] = getTime(); | |
}, | |
_times["prototype"]["end"] = function (h) { | |
this["_times"][h] = getTime() - this["_times"][h]; | |
}, | |
_times["prototype"]["getTime"] = function (h) { | |
h = void 0 === this["_times"][h] ? "" : this["_times"][h]; | |
return 13 !== (h + "")["length"] ? h : ""; | |
}, | |
_times["prototype"]["getData"] = function () { | |
var h = []; | |
return h["push"](this["getTime"](aq["CID"])), | |
h["push"](this["getTime"](aq["BATTERY_INFO_EVENT_LOOP"])), | |
h["push"](this["getTime"](aq["WEBGL"])), | |
h["push"](this["getTime"](aq["CANVAS"])), | |
h["push"](this["getTime"](aq["CANVAS_NATIVE"])), | |
h["push"](this["getTime"](aq["CANVAS_SHA1"])), | |
h["push"](this["getTime"](aq["FIELD_S"])), | |
h["push"](this["getTime"](aq["CODE_S"])), | |
h["join"](","); | |
}; | |
var tiems_ = new _times(), | |
F1_table = { | |
"F1_1": 1, | |
"F1_3": 3, | |
"F1_4": 4, | |
"F1_5": 5, | |
"F1_6": 6, | |
"F1_7": 7, | |
"F1_8": 8, | |
"F1_9": 9, | |
"F1_11": 11, | |
"F1_12": 12, | |
"F1_13": 13, | |
"F1_14": 14, | |
"F1_15": 15, | |
"F1_16": 16, | |
"F1_17": 17, | |
"F1_18": 18, | |
"F1_19": 19, | |
"F1_20": 20, | |
"F1_21": 21, | |
"F1_22": 22, | |
"F1_23": 23, | |
"F1_24": 24, | |
"F1_25": 25, | |
"F1_27": 27, | |
"F1_28": 28, | |
"F1_29": 29, | |
"F1_30": 30, | |
"F1_31": 31, | |
"F1_32": 32, | |
"F1_34": 34, | |
"F1_35": 35, | |
"F1_41": 41, | |
"F1_42": 42, | |
"F1_43": 43, | |
"F1_44": 44, | |
"F1_60": 60, | |
"F1_61": 61, | |
"F1_62": 62, | |
"F1_63": 63, | |
"F1_64": 64, | |
"F1_65": 65, | |
"F1_69": 69, | |
"F1_70": 70, | |
"F1_71": 71, | |
"F1_72": 72, | |
"F1_78": 78, | |
"F1_79": 79, | |
"F1_80": 80, | |
"F1_81": 81, | |
"F1_82": 82, | |
"F1_83": 83, | |
"F1_85": 85, | |
"F1_86": 86, | |
"F1_112": 112, | |
"F1_113": 113, | |
"F1_114": 114, | |
"F1_115": 115, | |
"F1_198": 198, | |
"F1_199": 199 | |
}, | |
ObjectCreate = Object["create"] || function (h) { | |
return empty["prototype"] = h, h = new empty(), empty["prototype"] = null, h; | |
}; | |
function empty() {} | |
// AES ?? | |
var _obj = { | |
"extend": function (h) { | |
var E = ObjectCreate(this); | |
return h && | |
E["mixIn"](h), | |
E["hasOwnProperty"]("init") | |
&& this["init"] !== E["init"] | |
|| (E["init"] = function () { | |
E["$super"]["init"]["apply"](this, arguments); | |
}), | |
(E["init"]["prototype"] = E)["$super"] = this, E; | |
}, | |
"create": function () { | |
var h = this["extend"](); | |
return h["init"]["apply"](h, arguments), h; | |
}, | |
"init": function () {}, | |
"mixIn": function (h) { | |
for (var E in h) h["hasOwnProperty"](E) && (this[E] = h[E]); | |
h["hasOwnProperty"]("toString") && (this["toString"] = h["toString"]); | |
}, | |
"clone": function () { | |
return this["init"]["prototype"]["extend"](this); | |
} | |
}, | |
aC = { | |
"stringify": function (h) { | |
for (var E = h["words"], u = h["sigBytes"], R = [], g = 0; g < u; g++) { | |
var aU = E[g >>> 2] >>> 24 - g % 4 * 8 & 255; | |
R["push"]((aU >>> 4)["toString"](16)), R["push"]((15 & aU)["toString"](16)); | |
} | |
return R["join"](""); | |
}, | |
"parse": function (h) { | |
for (var E = h["length"], u = [], R = 0; R < E; R += 2) u[R >>> 3] |= parseInt(h["substr"](R, 2), 16) << 24 - R % 8 * 4; | |
return new aD["init"](u, E / 2); | |
} | |
}, | |
aD = _obj["extend"]({ | |
"init": function (h, E) { | |
h = this["words"] = h || [], this["sigBytes"] = null != E ? E : 4 * h["length"]; | |
}, | |
"toString": function (h) { | |
return (h || aC)["stringify"](this); | |
}, | |
"concat": function (h) { | |
var E = this["words"], | |
u = h["words"], | |
R = this["sigBytes"], | |
g = h["sigBytes"]; | |
if (this["clamp"](), R % 4) for (var b7 = 0; b7 < g; b7++) { | |
var f = u[b7 >>> 2] >>> 24 - b7 % 4 * 8 & 255; | |
E[R + b7 >>> 2] |= f << 24 - (R + b7) % 4 * 8; | |
} else for (b7 = 0; b7 < g; b7 += 4) E[R + b7 >>> 2] = u[b7 >>> 2]; | |
return this["sigBytes"] += g, this; | |
}, | |
"clamp": function () { | |
var h = this["words"], | |
E = this["sigBytes"]; | |
h[E >>> 2] &= 4294967295 << 32 - E % 4 * 8, h["length"] = Math["ceil"](E / 4); | |
}, | |
"clone": function () { | |
var h; | |
return (h = _obj["clone"]["call"](this))["words"] = this["words"]["slice"](0), h; | |
}, | |
"random": function (h) { | |
for (var E = [], u = 0; u < h; u += 4) { | |
var R = function (E) { | |
var E = E, | |
u = 987654321, | |
R = 4294967295; | |
return function () { | |
var h = ((u = 36969 * (65535 & u) + (u >> 16) & R) << 16) + (E = 18000 * (65535 & E) + (E >> 16) & R) & R; | |
return h /= 4294967296, (h += 0.5) * (0.5 < Math["random"]() ? 1 : -1); | |
}; | |
}(4294967296 * (g || Math["random"]())), | |
g = 987654071 * R(); | |
E["push"](4294967296 * R() | 0); | |
} | |
return new aD["init"](E, h); | |
} | |
}), | |
aE = function (h) { | |
for (var E = h["words"], u = h["sigBytes"], R = [], g = 0; g < u; g++) { | |
var br = E[g >>> 2] >>> 24 - g % 4 * 8 & 255; | |
R["push"](String["fromCharCode"](br)); | |
} | |
return R["join"](""); | |
}, | |
aF = function (h) { | |
for (var E = h["length"], u = [], R = 0; R < E; R++) u[R >>> 2] |= (255 & h["charCodeAt"](R)) << 24 - R % 4 * 8; | |
return new aD["init"](u, E); | |
}, | |
aG = { | |
"stringify": function (h) { | |
try { | |
return decodeURIComponent(escape(aE(h))); | |
} catch (bx) { | |
throw new Error("Malformed UTF-8 data"); | |
} | |
}, | |
"parse": function (h) { | |
return aF(unescape(encodeURIComponent(h))); | |
} | |
}, | |
aH = _obj["extend"]({ | |
"reset": function () { | |
this["_data"] = new aD["init"](), this["_nDataBytes"] = 0; | |
}, | |
"_append": function (h) { | |
"string" == typeof h && (h = aG["parse"](h)), this["_data"]["concat"](h), this["_nDataBytes"] += h["sigBytes"]; | |
}, | |
"_process": function (h) { | |
var E, | |
u = this["_data"], | |
R = u["words"], | |
g = u["sigBytes"], | |
bF = this["blockSize"], | |
f = g / (4 * bF), | |
p = (f = h ? Math["ceil"](f) : Math["max"]((0 | f) - this["_minBufferSize"], 0)) * bF, | |
g = Math["min"](4 * p, g); | |
if (p) { | |
for (var i = 0; i < p; i += bF) this["_doProcessBlock"](R, i); | |
E = R["splice"](0, p), u["sigBytes"] -= g; | |
} | |
return new aD["init"](E, g); | |
}, | |
"clone": function () { | |
var h; | |
return (h = _obj["clone"]["call"](this))["_data"] = this["_data"]["clone"](), h; | |
}, | |
"_minBufferSize": 0 | |
}), | |
aI = _obj["extend"]({ | |
"init": function (h) { | |
this["mixIn"](h); | |
}, | |
"toString": function (h) { | |
return (h || this["formatter"])["stringify"](this); | |
} | |
}), | |
aJ = { | |
"stringify": function (h) { | |
var E = h["words"], | |
u = h["sigBytes"], | |
R = this["_map"]; | |
h["clamp"](); | |
for (var g = [], bS = 0; bS < u; bS += 3) for (var f = (E[bS >>> 2] >>> 24 - bS % 4 * 8 & 255) << 16 | (E[bS + 1 >>> 2] >>> 24 - (bS + 1) % 4 * 8 & 255) << 8 | E[bS + 2 >>> 2] >>> 24 - (bS + 2) % 4 * 8 & 255, p = 0; p < 4 && bS + 0.75 * p < u; p++) g["push"](R["charAt"](f >>> 6 * (3 - p) & 63)); | |
var i = R["charAt"](64); | |
if (i) for (; g["length"] % 4;) g["push"](i); | |
return g["join"](""); | |
}, | |
"parse": function (h) { | |
var E = h["length"], | |
u = this["_map"]; | |
if (!(R = this["_reverseMap"])) for (var R = this["_reverseMap"] = [], g = 0; g < u["length"]; g++) R[u["charCodeAt"](g)] = g; | |
var c1 = u["charAt"](64); | |
return !c1 || -1 !== (c1 = h["indexOf"](c1)) && (E = c1), function (h, E, u) { | |
for (var R = [], g = 0, c1 = 0; c1 < E; c1++) { | |
var f, p; | |
c1 % 4 && (f = u[h["charCodeAt"](c1 - 1)] << c1 % 4 * 2, p = u[h["charCodeAt"](c1)] >>> 6 - c1 % 4 * 2, p = f | p, R[g >>> 2] |= p << 24 - g % 4 * 8, g++); | |
} | |
return aD["create"](R, g); | |
}(h, E, R); | |
}, | |
"_map": "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" | |
}; | |
var ca = _obj["extend"]({ | |
"cfg": _obj["extend"]({ | |
"format": { | |
"stringify": function (h) { | |
var E = h["ciphertext"], | |
h = h["salt"], | |
E = h ? aD["create"]([1398893684, 1701076831])["concat"](h)["concat"](E) : E; | |
return E["toString"](aJ); | |
}, | |
"parse": function (h) { | |
var E, | |
u = aJ["parse"](h), | |
h = u["words"]; | |
return 1398893684 === h[0] && 1701076831 === h[1] && (E = aD["create"](h["slice"](2, 4)), h["splice"](0, 4), u["sigBytes"] -= 16), aI["create"]({ | |
"ciphertext": u, | |
"salt": E | |
}); | |
} | |
} | |
}), | |
"encrypt": function (h, E, u, R) { | |
R = this["cfg"]["extend"](R); | |
var g = h["createEncryptor"](u, R), | |
E = g["finalize"](E), | |
g = g["cfg"]; | |
return aI["create"]({ | |
"ciphertext": E, | |
"key": u, | |
"iv": g["iv"], | |
"algorithm": h, | |
"mode": g["mode"], | |
"padding": g["padding"], | |
"blockSize": h["blockSize"], | |
"formatter": R["format"] | |
}); | |
}, | |
"decrypt": function (h, E, u, R) { | |
return R = this["cfg"]["extend"](R), E = this["_parse"](E, R["format"]), h["createDecryptor"](u, R)["finalize"](E["ciphertext"]); | |
}, | |
"_parse": function (h, E) { | |
return "string" == typeof h ? E["parse"](h, this) : h; | |
} | |
}), | |
cb = aH["extend"]({ | |
"cfg": _obj["extend"](), | |
"createEncryptor": function (h, E) { | |
return this["create"](this["_ENC_XFORM_MODE"], h, E); | |
}, | |
"createDecryptor": function (h, E) { | |
return this["create"](this["_DEC_XFORM_MODE"], h, E); | |
}, | |
"init": function (h, E, u) { | |
this["cfg"] = this["cfg"]["extend"](u), this["_xformMode"] = h, this["_key"] = E, this["reset"](); | |
}, | |
"reset": function () { | |
aH["reset"]["call"](this), this["_doReset"](); | |
}, | |
"process": function (h) { | |
return this["_append"](h), this["_process"](); | |
}, | |
"finalize": function (h) { | |
return h && this["_append"](h), this["_doFinalize"](); | |
}, | |
"keySize": 4, | |
"ivSize": 4, | |
"_ENC_XFORM_MODE": 1, | |
"_DEC_XFORM_MODE": 2, | |
"_createHelper": function (R) { | |
return { | |
"encrypt": function (h, E, u) { | |
return cN(E)["encrypt"](R, h, E, u); | |
}, | |
"decrypt": function (h, E, u) { | |
return cN(E)["decrypt"](R, h, E, u); | |
} | |
}; | |
} | |
}); | |
function cN(h) { | |
return "string" == typeof h ? PasswordBasedCipher : ca; | |
} | |
var cP = _obj["extend"]({ | |
"createEncryptor": function (h, E) { | |
return this["Encryptor"]["create"](h, E); | |
}, | |
"createDecryptor": function (h, E) { | |
return this["Decryptor"]["create"](h, E); | |
}, | |
"init": function (h, E) { | |
this["_cipher"] = h, this["_iv"] = E; | |
} | |
}), | |
cQ = ((_crypto = cP["extend"]())["Encryptor"] = _crypto["extend"]({ | |
"processBlock": function (h, E) { | |
var u = this["_cipher"], | |
R = u["blockSize"]; | |
d6["call"](this, h, E, R), u["encryptBlock"](h, E), this["_prevBlock"] = h["slice"](E, E + R); | |
} | |
}), | |
_crypto["Decryptor"] = _crypto["extend"]({ | |
"processBlock": function (h, E) { | |
var u = this["_cipher"], | |
R = u["blockSize"], | |
g = h["slice"](E, E + R); | |
u["decryptBlock"](h, E), d6["call"](this, h, E, R), this["_prevBlock"] = g; | |
} | |
}), _crypto); | |
function d6(h, E, u) { | |
var R, | |
g = this["_iv"]; | |
g ? (R = g, this["_iv"] = void 0) : R = this["_prevBlock"]; | |
for (var dc = 0; dc < u; dc++) h[E + dc] ^= R[dc]; | |
} | |
var dd = { | |
"pad": function (h, E) { | |
for (var E = 4 * E, u = E - h["sigBytes"] % E, R = u << 24 | u << 16 | u << 8 | u, g = [], dr = 0; dr < u; dr += 4) g["push"](R); | |
E = aD["create"](g, u); | |
h["concat"](E); | |
}, | |
"unpad": function (h) { | |
var E = 255 & h["words"][h["sigBytes"] - 1 >>> 2]; | |
h["sigBytes"] -= E; | |
} | |
}, | |
S__abbaidu_ = cb["extend"]({ | |
"cfg": cb["cfg"]["extend"]({ | |
"mode": cQ, | |
"padding": dd | |
}), | |
"reset": function () { | |
var h; | |
cb["reset"]["call"](this); | |
var E = this["cfg"], | |
u = E["iv"], | |
E = E["mode"]; | |
this["_xformMode"] == this["_ENC_XFORM_MODE"] ? h = E["createEncryptor"] : (h = E["createDecryptor"], this["_minBufferSize"] = 1), this["_mode"] && this["_mode"]["__creator"] == h ? this["_mode"]["init"](this, u && u["words"]) : (this["_mode"] = h["call"](E, this, u && u["words"]), this["_mode"]["__creator"] = h); | |
}, | |
"_doProcessBlock": function (h, E) { | |
this["_mode"]["processBlock"](h, E); | |
}, | |
"_doFinalize": function () { | |
var h, | |
E = this["cfg"]["padding"]; | |
return this["_xformMode"] == this["_ENC_XFORM_MODE"] ? (E["pad"](this["_data"], this["blockSize"]), h = this["_process"](true)) : (h = this["_process"](true), E["unpad"](h)), h; | |
}, | |
"blockSize": 4 | |
}), | |
df = _obj["extend"]({ | |
"init": function (h, E) { | |
h = this["_hasher"] = new h["init"](), "string" == typeof E && (E = aG["parse"](E)); | |
var u = h["blockSize"], | |
R = 4 * u; | |
(E = E["sigBytes"] > R ? h["finalize"](E) : E)["clamp"](); | |
for (var h = this["_oKey"] = E["clone"](), E = this["_iKey"] = E["clone"](), g = h["words"], dJ = E["words"], f = 0; f < u; f++) g[f] ^= 1549556828, dJ[f] ^= 909522486; | |
h["sigBytes"] = E["sigBytes"] = R, this["reset"](); | |
}, | |
"reset": function () { | |
var h = this["_hasher"]; | |
h["reset"](), h["update"](this["_iKey"]); | |
}, | |
"update": function (h) { | |
return this["_hasher"]["update"](h), this; | |
}, | |
"finalize": function (h) { | |
var E = this["_hasher"], | |
h = E["finalize"](h); | |
return E["reset"](), E["finalize"](this["_oKey"]["clone"]()["concat"](h)); | |
} | |
}), | |
dg = aH["extend"]({ | |
"cfg": _obj["extend"](), | |
"init": function (h) { | |
this["cfg"] = this["cfg"]["extend"](h), this["reset"](); | |
}, | |
"reset": function () { | |
aH["reset"]["call"](this), this["_doReset"](); | |
}, | |
"update": function (h) { | |
return this["_append"](h), this["_process"](), this; | |
}, | |
"finalize": function (h) { | |
return h && this["_append"](h), this["_doFinalize"](); | |
}, | |
"blockSize": 16, | |
"_createHelper": function (u) { | |
return function (h, E) { | |
return new u["init"](E)["finalize"](h); | |
}; | |
}, | |
"_createHmacHelper": function (u) { | |
return function (h, E) { | |
return new df["init"](u, E)["finalize"](h); | |
}; | |
} | |
}), | |
dh = [], | |
cP = dg["extend"]({ | |
"_doReset": function () { | |
this["_hash"] = new aD["init"]([1732584193, 4023233417, 2562383102, 271733878, 3285377520]); | |
}, | |
"_doProcessBlock": function (h, E) { | |
for (var u = this["_hash"]["words"], R = u[0], g = u[1], e4 = u[2], f = u[3], p = u[4], i = 0; i < 80; i++) { | |
i < 16 ? dh[i] = 0 | h[E + i] : (d = dh[i - 3] ^ dh[i - 8] ^ dh[i - 14] ^ dh[i - 16], dh[i] = d << 1 | d >>> 31); | |
var d = (R << 5 | R >>> 27) + p + dh[i]; | |
d += i < 20 ? 1518500249 + (g & e4 | ~g & f) : i < 40 ? 1859775393 + (g ^ e4 ^ f) : i < 60 ? (g & e4 | g & f | e4 & f) - 1894007588 : (g ^ e4 ^ f) - 899497514, p = f, f = e4, e4 = g << 30 | g >>> 2, g = R, R = d; | |
} | |
u[0] = u[0] + R | 0, u[1] = u[1] + g | 0, u[2] = u[2] + e4 | 0, u[3] = u[3] + f | 0, u[4] = u[4] + p | 0; | |
}, | |
"_doFinalize": function () { | |
var h = this["_data"], | |
E = h["words"], | |
u = 8 * this["_nDataBytes"], | |
R = 8 * h["sigBytes"]; | |
return E[R >>> 5] |= 128 << 24 - R % 32, E[14 + (64 + R >>> 9 << 4)] = Math["floor"](u / 4294967296), E[15 + (64 + R >>> 9 << 4)] = u, h["sigBytes"] = 4 * E["length"], this["_process"](), this["_hash"]; | |
}, | |
"clone": function () { | |
var h; | |
return (h = dg["clone"]["call"](this))["_hash"] = this["_hash"]["clone"](), h; | |
} | |
}), | |
dj = []; | |
!function () { | |
for (var h = 0; h < 64; h++) dj[h] = 4294967296 * Math["abs"](Math["sin"](h + 1)) | 0; | |
}(); | |
var _crypto = dg["extend"]({ | |
"_doReset": function () { | |
this["_hash"] = new aD["init"]([1732584193, 4023233417, 2562383102, 271733878]); | |
}, | |
"_doProcessBlock": function (h, E) { | |
for (var u = 0; u < 16; u++) { | |
var R = E + u, | |
g = h[R]; | |
h[R] = 16711935 & (g << 8 | g >>> 24) | 4278255360 & (g << 24 | g >>> 8); | |
} | |
var el = this["_hash"]["words"], | |
f = h[E + 0], | |
p = h[E + 1], | |
i = h[E + 2], | |
d = h[E + 3], | |
e = h[E + 4], | |
j = h[E + 5], | |
k = h[E + 6], | |
c = h[E + 7], | |
eu = h[E + 8], | |
m = h[E + 9], | |
n = h[E + 10], | |
q = h[E + 11], | |
r = h[E + 12], | |
s = h[E + 13], | |
t = h[E + 14], | |
v = h[E + 15], | |
z = eR(z = el[0], N = el[1], M = el[2], I = el[3], f, 7, dj[0]), | |
I = eR(I, z, N, M, p, 12, dj[1]), | |
M = eR(M, I, z, N, i, 17, dj[2]), | |
N = eR(N, M, I, z, d, 22, dj[3]); | |
z = eR(z, N, M, I, e, 7, dj[4]), I = eR(I, z, N, M, j, 12, dj[5]), M = eR(M, I, z, N, k, 17, dj[6]), N = eR(N, M, I, z, c, 22, dj[7]), z = eR(z, N, M, I, eu, 7, dj[8]), I = eR(I, z, N, M, m, 12, dj[9]), M = eR(M, I, z, N, n, 17, dj[10]), N = eR(N, M, I, z, q, 22, dj[11]), z = eR(z, N, M, I, r, 7, dj[12]), I = eR(I, z, N, M, s, 12, dj[13]), M = eR(M, I, z, N, t, 17, dj[14]), z = eZ(z, N = eR(N, M, I, z, v, 22, dj[15]), M, I, p, 5, dj[16]), I = eZ(I, z, N, M, k, 9, dj[17]), M = eZ(M, I, z, N, q, 14, dj[18]), N = eZ(N, M, I, z, f, 20, dj[19]), z = eZ(z, N, M, I, j, 5, dj[20]), I = eZ(I, z, N, M, n, 9, dj[21]), M = eZ(M, I, z, N, v, 14, dj[22]), N = eZ(N, M, I, z, e, 20, dj[23]), z = eZ(z, N, M, I, m, 5, dj[24]), I = eZ(I, z, N, M, t, 9, dj[25]), M = eZ(M, I, z, N, d, 14, dj[26]), N = eZ(N, M, I, z, eu, 20, dj[27]), z = eZ(z, N, M, I, s, 5, dj[28]), I = eZ(I, z, N, M, i, 9, dj[29]), M = eZ(M, I, z, N, c, 14, dj[30]), z = f7(z, N = eZ(N, M, I, z, r, 20, dj[31]), M, I, j, 4, dj[32]), I = f7(I, z, N, M, eu, 11, dj[33]), M = f7(M, I, z, N, q, 16, dj[34]), N = f7(N, M, I, z, t, 23, dj[35]), z = f7(z, N, M, I, p, 4, dj[36]), I = f7(I, z, N, M, e, 11, dj[37]), M = f7(M, I, z, N, c, 16, dj[38]), N = f7(N, M, I, z, n, 23, dj[39]), z = f7(z, N, M, I, s, 4, dj[40]), I = f7(I, z, N, M, f, 11, dj[41]), M = f7(M, I, z, N, d, 16, dj[42]), N = f7(N, M, I, z, k, 23, dj[43]), z = f7(z, N, M, I, m, 4, dj[44]), I = f7(I, z, N, M, r, 11, dj[45]), M = f7(M, I, z, N, v, 16, dj[46]), z = ff(z, N = f7(N, M, I, z, i, 23, dj[47]), M, I, f, 6, dj[48]), I = ff(I, z, N, M, c, 10, dj[49]), M = ff(M, I, z, N, t, 15, dj[50]), N = ff(N, M, I, z, j, 21, dj[51]), z = ff(z, N, M, I, r, 6, dj[52]), I = ff(I, z, N, M, d, 10, dj[53]), M = ff(M, I, z, N, n, 15, dj[54]), N = ff(N, M, I, z, p, 21, dj[55]), z = ff(z, N, M, I, eu, 6, dj[56]), I = ff(I, z, N, M, v, 10, dj[57]), M = ff(M, I, z, N, k, 15, dj[58]), N = ff(N, M, I, z, s, 21, dj[59]), z = ff(z, N, M, I, e, 6, dj[60]), I = ff(I, z, N, M, q, 10, dj[61]), M = ff(M, I, z, N, i, 15, dj[62]), N = ff(N, M, I, z, m, 21, dj[63]), el[0] = el[0] + z | 0, el[1] = el[1] + N | 0, el[2] = el[2] + M | 0, el[3] = el[3] + I | 0; | |
}, | |
"_doFinalize": function () { | |
var h = this["_data"], | |
E = h["words"], | |
u = 8 * this["_nDataBytes"], | |
R = 8 * h["sigBytes"]; | |
E[R >>> 5] |= 128 << 24 - R % 32; | |
var g = Math["floor"](u / 4294967296), | |
u = u; | |
E[15 + (64 + R >>> 9 << 4)] = 16711935 & (g << 8 | g >>> 24) | 4278255360 & (g << 24 | g >>> 8), E[14 + (64 + R >>> 9 << 4)] = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), h["sigBytes"] = 4 * (E["length"] + 1), this["_process"](); | |
for (var E = this["_hash"], eN = E["words"], f = 0; f < 4; f++) { | |
var p = eN[f]; | |
eN[f] = 16711935 & (p << 8 | p >>> 24) | 4278255360 & (p << 24 | p >>> 8); | |
} | |
return E; | |
}, | |
"clone": function () { | |
var h; | |
return (h = dg["clone"]["call"](this))["_hash"] = this["_hash"]["clone"](), h; | |
} | |
}); | |
function eR(h, E, u, R, g, eX, f) { | |
f = h + (E & u | ~E & R) + g + f; | |
return (f << eX | f >>> 32 - eX) + E; | |
} | |
function eZ(h, E, u, R, g, f5, f) { | |
f = h + (E & R | u & ~R) + g + f; | |
return (f << f5 | f >>> 32 - f5) + E; | |
} | |
function f7(h, E, u, R, g, fd, f) { | |
f = h + (E ^ u ^ R) + g + f; | |
return (f << fd | f >>> 32 - fd) + E; | |
} | |
function ff(h, E, u, R, g, fl, f) { | |
f = h + (u ^ (E | ~R)) + g + f; | |
return (f << fl | f >>> 32 - fl) + E; | |
} | |
var _crypto = dg["_createHelper"](_crypto), | |
fo = (_obj["extend"]({ | |
"cfg": _obj["extend"]({ | |
"keySize": 4, | |
"hasher": _crypto, | |
"iterations": 1 | |
}), | |
"init": function (h) { | |
this["cfg"] = this["cfg"]["extend"](h); | |
}, | |
"compute": function (h, E) { | |
for (var u, R = this["cfg"], g = R["hasher"]["create"](), fE = aD["create"](), f = fE["words"], p = R["keySize"], i = R["iterations"]; f["length"] < p;) { | |
u && g["update"](u), u = g["update"](h)["finalize"](E), g["reset"](); | |
for (var d = 1; d < i; d++) u = g["finalize"](u), g["reset"](); | |
fE["concat"](u); | |
} | |
return fE["sigBytes"] = 4 * p, fE; | |
} | |
}), []), | |
fp = [], | |
fq = [], | |
fr = [], | |
fs = [], | |
ft = [], | |
fu = [], | |
fv = [], | |
fw = [], | |
fx = []; | |
!function () { | |
for (var h = [], E = 0; E < 256; E++) h[E] = E < 128 ? E << 1 : E << 1 ^ 283; | |
for (var u = 0, R = 0, E = 0; E < 256; E++) { | |
var g = R ^ R << 1 ^ R << 2 ^ R << 3 ^ R << 4; | |
fo[u] = g = g >>> 8 ^ 255 & g ^ 99; | |
var fP = h[fp[g] = u], | |
f = h[fP], | |
p = h[f], | |
i = 257 * h[g] ^ 16843008 * g; | |
fq[u] = i << 24 | i >>> 8, fr[u] = i << 16 | i >>> 16, fs[u] = i << 8 | i >>> 24, ft[u] = i, fu[g] = (i = 16843009 * p ^ 65537 * f ^ 257 * fP ^ 16843008 * u) << 24 | i >>> 8, fv[g] = i << 16 | i >>> 16, fw[g] = i << 8 | i >>> 24, fx[g] = i, u ? (u = fP ^ h[h[h[p ^ fP]]], R ^= h[h[R]]) : u = R = 1; | |
} | |
}(); | |
var fT = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], | |
_crypto = S__abbaidu_["extend"]({ | |
"_doReset": function () { | |
if (!this["_nRounds"] || this["_keyPriorReset"] !== this["_key"]) { | |
for (var h = this["_keyPriorReset"] = this["_key"], E = h["words"], u = h["sigBytes"] / 4, R = 4 * (1 + (this["_nRounds"] = 6 + u)), g = this["_keySchedule"] = [], g2 = 0; g2 < R; g2++) g2 < u ? g[g2] = E[g2] : (i = g[g2 - 1], g2 % u ? 6 < u && g2 % u == 4 && (i = fo[i >>> 24] << 24 | fo[i >>> 16 & 255] << 16 | fo[i >>> 8 & 255] << 8 | fo[255 & i]) : (i = fo[(i = i << 8 | i >>> 24) >>> 24] << 24 | fo[i >>> 16 & 255] << 16 | fo[i >>> 8 & 255] << 8 | fo[255 & i], i ^= fT[g2 / u | 0] << 24), g[g2] = g[g2 - u] ^ i); | |
for (var f = this["_invKeySchedule"] = [], p = 0; p < R; p++) { | |
var i, | |
g2 = R - p; | |
i = p % 4 ? g[g2] : g[g2 - 4], f[p] = p < 4 || g2 <= 4 ? i : fu[fo[i >>> 24]] ^ fv[fo[i >>> 16 & 255]] ^ fw[fo[i >>> 8 & 255]] ^ fx[fo[255 & i]]; | |
} | |
} | |
}, | |
"encryptBlock": function (h, E) { | |
this["_doCryptBlock"](h, E, this["_keySchedule"], fq, fr, fs, ft, fo); | |
}, | |
"decryptBlock": function (h, E) { | |
var u = h[E + 1]; | |
h[E + 1] = h[E + 3], h[E + 3] = u, this["_doCryptBlock"](h, E, this["_invKeySchedule"], fu, fv, fw, fx, fp); | |
u = h[E + 1]; | |
h[E + 1] = h[E + 3], h[E + 3] = u; | |
}, | |
"_doCryptBlock": function (h, E, u, R, g, gh, f, p) { | |
for (var i = this["_nRounds"], d = h[E] ^ u[0], e = h[E + 1] ^ u[1], j = h[E + 2] ^ u[2], k = h[E + 3] ^ u[3], c = 4, gq = 1; gq < i; gq++) var m = R[d >>> 24] ^ g[e >>> 16 & 255] ^ gh[j >>> 8 & 255] ^ f[255 & k] ^ u[c++], n = R[e >>> 24] ^ g[j >>> 16 & 255] ^ gh[k >>> 8 & 255] ^ f[255 & d] ^ u[c++], q = R[j >>> 24] ^ g[k >>> 16 & 255] ^ gh[d >>> 8 & 255] ^ f[255 & e] ^ u[c++], r = R[k >>> 24] ^ g[d >>> 16 & 255] ^ gh[e >>> 8 & 255] ^ f[255 & j] ^ u[c++], d = m, e = n, j = q, k = r; | |
m = (p[d >>> 24] << 24 | p[e >>> 16 & 255] << 16 | p[j >>> 8 & 255] << 8 | p[255 & k]) ^ u[c++], n = (p[e >>> 24] << 24 | p[j >>> 16 & 255] << 16 | p[k >>> 8 & 255] << 8 | p[255 & d]) ^ u[c++], q = (p[j >>> 24] << 24 | p[k >>> 16 & 255] << 16 | p[d >>> 8 & 255] << 8 | p[255 & e]) ^ u[c++], r = (p[k >>> 24] << 24 | p[d >>> 16 & 255] << 16 | p[e >>> 8 & 255] << 8 | p[255 & j]) ^ u[c++]; | |
h[E] = m, h[E + 1] = n, h[E + 2] = q, h[E + 3] = r; | |
}, | |
"keySize": 8 | |
}), | |
fV = dg["_createHelper"](cP), | |
fW = S__abbaidu_["_createHelper"](_crypto); | |
function _aes_encrypt(h, E, u) { | |
return "object" == typeof h && (h = JSON["stringify"](h)), fW["encrypt"](h, aG["parse"](E), { | |
"iv": aG["parse"](u) | |
})["ciphertext"]["toString"](); | |
} | |
function _aes_decrypt(h, E, u) { | |
u = fW["decrypt"](aI["create"]({ | |
"ciphertext": aC["parse"](h) | |
}), aG["parse"](E), { | |
"iv": aG["parse"](u), | |
"mode": cQ, | |
"padding": dd | |
}); | |
return aG["stringify"](u); | |
} | |
_window["__aes_encrypt"] = _aes_encrypt, _window["__aes_decrypt"] = _aes_decrypt; | |
var R1 = {}, | |
R2 = {}; | |
function r1Set(h, E) { | |
R1[h] = E; | |
} | |
function r2Set(h, E) { | |
R2[h] = E; | |
} | |
function gP() { | |
for ( | |
var h = [F1_table["F1_3"], F1_table["F1_8"], F1_table["F1_19"], F1_table["F1_25"], F1_table["F1_34"]]["concat"](function () { | |
var h, | |
E = []; | |
for (h in R2) E["push"](h); | |
return [gZ(E), gZ(E)]; | |
}()), | |
E = [], u = [], R = h["length"], g = 0; g < R; g++ | |
) | |
{ | |
var gX = gZ(h), | |
f = R1[f = gX] || R2[f] || ""; | |
u["push"](f), E["push"](gX); | |
} | |
return fV(u["join"](","))["toString"]() + "_" + _aes_encrypt(E["join"](","), S_7D33FCD55FE3447C, S_636014d173e04409); | |
} | |
function gZ(h) { | |
var E = parseInt(Math["random"]() * h["length"]), | |
u = h[E]; | |
return h["splice"](E, 1), u; | |
} | |
// 开始数据搜集 | |
/** | |
* 通过RTC搜集客户端IP | |
* | |
* @param {*} callback | |
*/ | |
function rtc(callback) { | |
var _catch = "catch"; | |
try { | |
new Promise(function (resolve, reject) { | |
try { | |
function ipMatch(x) { | |
x = ipRe["exec"](x); | |
!x | |
|| "0.0.0.0" !== (x = x[1]) | |
&& (void 0 === hc[x] && g["push"](x), hc[x] = true); | |
} | |
var _RTCPeerConnection = _window["RTCPeerConnection"] || _window["mozRTCPeerConnection"] || _window["webkitRTCPeerConnection"]; | |
if (!_RTCPeerConnection) return void resolve(""); | |
var g = [], | |
hc = {}, | |
// Chrome Remove WebRTC RTP data channels | |
// https://www.chromestatus.com/feature/6485681910054912 | |
connect = new _RTCPeerConnection( | |
{ | |
"iceServers": [{ | |
"urls": "stun:stun.services.mozilla.com" | |
}] | |
}, | |
{ | |
"optional": [{ | |
"RtpDataChannels": true | |
}] | |
} | |
), | |
ipRe = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/; | |
connect["onicecandidate"] = function (x) { | |
x["candidate"] && ipMatch(x["candidate"]["candidate"]); | |
}, | |
connect["createDataChannel"](""); | |
function i() {} | |
windowCall(function () { | |
connect["createOffer"]()["then"](function (h) { | |
connect["setLocalDescription"](h, i, i); | |
}, i)[_catch](function (h) { | |
0; | |
}); | |
}), | |
windowCall(function () { | |
connect["createOffer"](function (h) { | |
connect["setLocalDescription"](h, i, i); | |
}, i)[_catch](function (h) { | |
0; | |
}); | |
}); | |
var d = 0, | |
e = setInterval(function () { | |
try { | |
// https://developer.mozilla.org/en-US/docs/Glossary/SDP | |
connect["localDescription"]["sdp"]["split"]("\n")["forEach"]( | |
function (h) { | |
0 !== h["indexOf"]("a=candidate:") | |
&& 0 !== h["indexOf"]("c=IN") || ipMatch(h); | |
}), | |
(0 < g["length"] || 2 < ++d) | |
&& (resolve(g["join"](",")), | |
clearInterval(e)); | |
} catch (ho) { | |
resolve(g["join"](",")), clearInterval(e); | |
} | |
}, 1000); | |
} catch (hp) { | |
0, callback(""); | |
} | |
})["then"](function (data) { | |
callback(data); | |
})[_catch](function (h) { | |
0; | |
}); | |
} catch (hs) { | |
callback(null); | |
} | |
} | |
/** | |
* | |
* | |
* @param {*} obj | |
* @param {*} property | |
* @return {*} | |
*/ | |
function objPropertyConcat(obj, property) { | |
for (var u = "", | |
i = 0; i < obj.length; i++) { | |
u += "," + encodeURIComponent(obj[i][property]); | |
} | |
return u["substr"](1); | |
} | |
/** | |
* 搜集浏览器 userAgent | |
* | |
* @return {*} | |
*/ | |
function UA() { | |
var h = _navigator["userAgent"] || ""; | |
return r2Set(F1_table["F1_27"], h), h; | |
} | |
/** | |
* 搜集 referrer | |
* | |
* @return {*} | |
*/ | |
function referrer() { | |
return _document["referrer"]; | |
} | |
/** | |
* 搜集浏览器语言 | |
* | |
* @return {*} | |
*/ | |
function languages() { | |
var h, | |
_languages = _navigator["languages"]; | |
return h = _languages, | |
"[object String]" === Object["prototype"]["toString"]["apply"](h) ? "-1" : _languages | |
&& _languages["join"](",") || ""; | |
} | |
/** | |
* 检测某对象是否包含某属性 | |
* | |
* @param {Array} properties | |
* @param {object} obj | |
* @param {string} u | |
* @return {string} | |
*/ | |
function isInObj(properties, obj, u) { | |
var R, g; | |
void 0 === properties && (properties = []), | |
void 0 === u && (u = ""), | |
"object" == typeof obj ? | |
R = function (h) { | |
return h in obj; | |
} : ( | |
g = obj, | |
"[object Function]" === Object["prototype"]["toString"]["apply"](g) | |
&& (R = obj)); | |
for (var i = 0; i < properties.length; i++) { | |
var p = properties[i]; | |
if (R(p)) { | |
return u + p; | |
} | |
} | |
return ""; | |
} | |
var _RegExp = _window["RegExp"]; | |
/** | |
* 搜集浏览器插件情况 | |
* | |
* @return {*} | |
*/ | |
function plugins() { | |
var h = (h = getToStringLength(navigator, "plugins")) || function (h, E) { | |
for (var u = 0, R = h["length"], g = 0; g < R; g++) u += getToStringLength(h[g], E); | |
return u; | |
}(navigator["plugins"], "name"), | |
E = getToStringLength(_screen, "availWidth") + getToStringLength(_screen, "availHeight"), | |
u = getToStringLength(_screen, "width") + getToStringLength(_screen, "height"); | |
return [h, E, getToStringLength(navigator, "hardwareConcurrency"), getToStringLength(navigator, "platform"), u]["join"](","); | |
} | |
/** | |
* 浏览器检测 | |
* | |
* @return {*} | |
*/ | |
function browserTest() { | |
function objTest(obj, property) { | |
if (!obj) return false; | |
var u = new _RegExp("^\\n?function " + property + "\\(\\) \\{\\n?\\s+\\[native code\\]\\s+\\n?\\}\\n?$"), | |
property = obj[property] || {}; | |
return !property["toString"] || property["toString"] && !u["test"](property["toString"]()); | |
} | |
// canvas 测试 | |
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement | |
var canvasElem = _document["createElement"]("canvas"), | |
// 是否支持 canvas.toDataURL | |
h = false; | |
windowCall(function () { | |
h = objTest(canvasElem, "toDataURL"); | |
}); | |
// 是否支持 canvas.getContext | |
var g = false; | |
windowCall(function () { | |
var h, E; | |
canvasElem | |
&& canvasElem["getContext"] | |
&& (h = objTest(canvasElem, "getContext"), | |
g = !!h | |
|| (h = objTest(E = canvasElem["getContext"]("webgl") || canvasElem["getContext"]("experimental-webgl"), "getSupportedExtensions"), | |
E = objTest(E, "getParameter"), h || E)); | |
}); | |
// 是否支持 video | |
var E = false; | |
windowCall(function () { | |
var h = _document["createElement"]("video"); | |
E = h["canPlayType"] && objTest(h, "canPlayType"); | |
}); | |
// 是否支持 Document.createEvent() | |
// https://developer.mozilla.org/en-US/docs/Web/API/Document/createEvent | |
var ic = false; | |
windowCall(function () { | |
ic = _document["createEvent"] && objTest(_document, "createEvent"); | |
}); | |
// 获取设备触控信息 | |
// https://developer.mozilla.org/en-US/docs/Web/API/Navigator/maxTouchPoints | |
var f = getToStringLength(_navigator, "maxTouchPoints"), | |
p = getToStringLength(_navigator, "msMaxTouchPoints"), | |
f = ic || f || p, | |
// 是否支持 Navigator.getBattery() | |
// https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getBattery | |
i = false; | |
windowCall(function () { | |
i = _navigator["getBattery"] && objTest(_navigator, "getBattery"); | |
}); | |
p = function (h) { | |
return h ? 1 : 0; | |
}; | |
return [p(h), p(g), p(E), p(f), p(i)]["join"](","); | |
} | |
var CF_table = { | |
"CF_101": 101, | |
"CF_103": 103, | |
"CF_106": 106, | |
"CF_107": 107, | |
"CF_108": 108, | |
"CF_109": 109, | |
"CF_200": 200 | |
}, | |
R4 = {}; | |
function r4Set(h, E) { | |
R4[h] = E; | |
} | |
var ip, | |
iq, | |
_crypto = _window["crypto"], | |
_TextEncoder = _window["TextEncoder"], | |
_Uint8Array = _window["Uint8Array"], | |
iu = !!(_TextEncoder && _crypto && _crypto["subtle"] && _crypto["subtle"]["decrypt"]); | |
function _sha1sum(E) { | |
var h = new _TextEncoder()["encode"](E); | |
return _window["crypto"]["subtle"]["digest"]("SHA-1", h)["then"](function (h) { | |
for (var E = Array["from"](new _Uint8Array(h)), u = "", R = E["length"], g = 0; g < R; g++) { | |
var iD = E[g]["toString"](16); | |
u += iD = 1 === iD["length"] ? "0" + iD : iD; | |
} | |
return u; | |
})["catch"](function (h) { | |
return fV(E)["toString"](); | |
}); | |
} | |
function getSelf() { | |
var E; | |
try { | |
E = _uzxr; // _uzxr 为最外层函数 | |
} catch (iH) { | |
E = function () {}; | |
} | |
return E["toString"](); | |
} | |
function abSelf() { | |
return function (h, E) { | |
void 0 === E && (E = 100); | |
for (var u = "", | |
// 替换汉字并计数 | |
// https://unicode-table.com/en/blocks/cjk-unified-ideographs/ | |
R = (h = h["replace"](/[\u4e00-\u9fa5]/g, ""))["length"], | |
i = 0; i < R; i += E) { | |
u += h[i] | |
}; | |
return u; | |
}(getSelf()); | |
} | |
var canvasPromise, | |
canvasHash, | |
_Promise = _window["Promise"]; | |
/** | |
* 搜集canvas指纹 | |
* | |
*/ | |
function canvasFingerprints() { | |
canvasPromise = function () { | |
tiems_["start"](aq["CANVAS"]); | |
var _canvasFingerprint = canvasDraw(); | |
return tiems_["start"](aq["CANVAS_SHA1"]), | |
_sha1sum(_canvasFingerprint)["then"](function (hash) { | |
return r1Set(F1_table["F1_3"], hash), | |
tiems_["end"](aq["CANVAS_SHA1"]), // 记录 canvas hash 耗时 | |
tiems_["end"](aq["CANVAS"]), // 记录 canvas 总耗时 | |
canvasHash = hash; | |
}); | |
}(); | |
} | |
function canvasDraw() { | |
tiems_["start"](aq["CANVAS_NATIVE"]); | |
var text = "antifraud", | |
out = [], | |
canvasElem = _document["createElement"]("canvas"); | |
canvasElem["width"] = 2000, canvasElem["height"] = 200, canvasElem["style"]["display"] = "inline"; | |
var R = canvasElem["getContext"]("2d"), | |
PI_2 = 2 * Math["PI"]; | |
// 一系列绘图操作 | |
return R["rect"](0, 0, 10, 10), | |
R["rect"](2, 2, 6, 6), | |
R["isPointInPath"] && out["push"]("canvas winding:" + (false === R["isPointInPath"](5, 5, "evenodd") ? "yes" : "no")), | |
R["textBaseline"] = "alphabetic", | |
R["fillStyle"] = "#f60", | |
R["fillRect"](125, 1, 62, 20), | |
R["fillStyle"] = "#069", | |
R["font"] = "11pt Arial", | |
R["fillText"](text, 2, 15), | |
R["fillStyle"] = "rgba(102, 204, 0, 0.2)", | |
R["font"] = "18pt Arial", | |
R["fillText"](text, 4, 45), | |
R["globalCompositeOperation"] = "multiply", | |
R["fillStyle"] = "rgb(255,0,255)", | |
R["beginPath"](), | |
R["arc"](50, 50, 50, 0, PI_2, true), | |
R["closePath"](), | |
R["fill"](), | |
R["fillStyle"] = "rgb(0,255,255)", | |
R["beginPath"](), | |
R["arc"](100, 50, 50, 0, PI_2, true), | |
R["closePath"](), | |
R["fill"](), | |
R["fillStyle"] = "rgb(255,255,0)", | |
R["beginPath"](), R["arc"](75, 100, 50, 0, PI_2, true), | |
R["closePath"](), R["fill"](), | |
R["fillStyle"] = "rgb(255,0,255)", | |
R["arc"](75, 75, 75, 0, PI_2, true), | |
R["arc"](75, 75, 25, 0, PI_2, true), | |
R["fill"]("evenodd"), | |
out["push"]("canvas fp:" + canvasElem["toDataURL"]()), | |
tiems_["end"](aq["CANVAS_NATIVE"]), // 记录 canvas 绘图耗时 | |
out["join"]("~"); | |
} | |
var j0 = 0; | |
var j1, | |
j2, | |
j3, | |
_getBatteryBoolean = !!_navigator["getBattery"], | |
_Promise2 = _window["Promise"]; | |
var R3 = {}; | |
/** | |
* 搜集浏览器指纹 | |
* | |
*/ | |
function getFingerPrints() { | |
var h, | |
E, | |
u, | |
R, | |
// 是否支持 canvas | |
t = function () { | |
var canvasElem = _document["createElement"]("canvas"); | |
try { | |
return +!(!canvasElem["getContext"] || !canvasElem["getContext"]("2d")); | |
} catch (error) { | |
return 0; | |
} | |
}(); | |
/** | |
* 视频格式检测 | |
* | |
* @param {Element} videoElem | |
* @param {string} Type | |
* @return {0|1} | |
*/ | |
function videoTest(videoElem, Type) { | |
return videoElem["canPlayType"](Type)["replace"](/^no$/, "0")["replace"](/^probably$/, "1")["replace"](/^maybe$/, "1"); | |
} | |
copyToR3( | |
( | |
// 是否支持 canvas | |
(h = {})[F1_table["F1_1"]] = t + "", | |
// 搜集屏幕的颜色深度(color depth) | |
// https://developer.mozilla.org/en-US/docs/Web/API/Screen/colorDepth | |
h[F1_table["F1_4"]] = (_screen["colorDepth"] || "") + "", | |
// 搜集屏幕宽高 | |
// https://developer.mozilla.org/en-US/docs/Web/API/Screen/width | |
// https://developer.mozilla.org/en-US/docs/Web/API/Screen/height | |
h[F1_table["F1_5"]] = (R = _screen["width"] + "x" + _screen["height"], r2Set(F1_table["F1_5"], R), R), | |
// 搜集 availWidth、availHeight | |
// https://developer.mozilla.org/en-US/docs/Web/API/Screen/availWidth | |
// https://developer.mozilla.org/en-US/docs/Web/API/Screen/availHeight | |
h[F1_table["F1_6"]] = (t = _screen["availWidth"] + "x" + _screen["availHeight"], r2Set(F1_table["F1_6"], t), t), | |
// 搜集 deviceXDPI、deviceYDPI | |
// http://help.dottoro.com/ljuxiphf.php | |
// Deprecated | |
h[F1_table["F1_7"]] = [_screen["deviceXDPI"] || "", _screen["deviceYDPI"] || ""]["join"](","), | |
// 搜集浏览器安装的插件名称 | |
// https://developer.mozilla.org/en-US/docs/Web/API/Navigator/plugins | |
// Deprecated | |
h[F1_table["F1_8"]] = (R = objPropertyConcat(_navigator["plugins"], "name"), r1Set(F1_table["F1_8"], R), R), | |
// https://developer.mozilla.org/en-US/docs/Web/API/Navigator/mimeTypes | |
// Deprecated | |
h[F1_table["F1_9"]] = ( | |
t = objPropertyConcat(_navigator["mimeTypes"], "description"), | |
r2Set(F1_table["F1_9"], t), | |
t | |
), | |
// 是否支持 localStorage | |
// https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage | |
h[F1_table["F1_11"]] = function () { | |
try { | |
return +!!_window["localStorage"]; | |
} catch (ji) { | |
return 1; | |
} | |
}() + "", | |
// 是否支持 sessionStorage | |
// https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage | |
h[F1_table["F1_12"]] = function () { | |
try { | |
return +!!_window["sessionStorage"]; | |
} catch (jj) { | |
return 1; | |
} | |
}() + "", | |
// 是否支持Cookie | |
// https://developer.mozilla.org/en-US/docs/Web/API/Navigator/cookieEnabled | |
h[F1_table["F1_13"]] = (_navigator["cookieEnabled"] || "") + "", | |
// 时区偏移数 | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset | |
h[F1_table["F1_14"]] = (R = new Date()["getTimezoneOffset"](), r2Set(F1_table["F1_14"], R), R + ""), | |
// 浏览器语言 | |
// https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language | |
h[F1_table["F1_15"]] = (t = _navigator["language"] || "", r2Set(F1_table["F1_15"], t), t), | |
// 浏览器语言 | |
// https://gist.github.com/ksol/62b489572944ca70b4ba | |
// Deprecated | |
h[F1_table["F1_16"]] = _navigator["systemLanguage"] || "", | |
// 浏览器所支持视频格式种类 | |
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType | |
h[F1_table["F1_17"]] = ( | |
E = _document["createElement"]("video"), | |
u = false, | |
windowCall(function () { | |
(u = !!E["canPlayType"]) | |
&& ((u = new Boolean(u))["ogg"] = videoTest(E, "video/ogg; codecs=\"theora\""), | |
u["h264"] = videoTest(E, "video/mp4; codecs=\"avc1.42E01E\""), | |
u["webm"] = videoTest(E, "video/webm; codecs=\"vp8, vorbis\""), | |
u["vp9"] = videoTest(E, "video/webm; codecs=\"vp9\""), | |
u["hls"] = videoTest(E, "application/x-mpegURL; codecs=\"avc1.42E01E\"")); | |
}), | |
[+!!u, u["ogg"] || "0", u["h264"] || "0", u["webm"] || "0", u["vp9"] || "0", u["hls"] || "0"]["join"](",") | |
), | |
// 实际像素与CSS像素映射比 | |
// https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio | |
h[F1_table["F1_18"]] = (_window["devicePixelRatio"] || "") + "", | |
// CPU核心数 | |
// https://developer.mozilla.org/en-US/docs/Web/API/Navigator/hardwareConcurrency | |
h[F1_table["F1_19"]] = (R = _navigator["hardwareConcurrency"] || "", r1Set(F1_table["F1_19"], R), R + ""), | |
// 探测广告屏蔽器 | |
// 当元素被设为 display: none; 后 offsetHeight 为 0 | |
h[F1_table["F1_20"]] = function () { | |
var h = _document["createElement"]("div"); | |
h["innerHTML"] = " "; | |
var E = !(h["className"] = "adsbox"); | |
try { | |
var u = _document["body"]; | |
u["appendChild"](h), | |
E = +(0 === _document["getElementsByClassName"]("adsbox")[0]["offsetHeight"]), | |
u["removeChild"](h); | |
} catch (jn) { | |
E = false; | |
} | |
return E; | |
}() + "", | |
// 是否启用 doNotTrack | |
h[F1_table["F1_21"]] = _navigator["doNotTrack"] || _navigator["msDoNotTrack"] || _window["window"]["doNotTrack"] || "", | |
// 搜集浏览器详细信息 | |
h[F1_table["F1_22"]] = [_navigator["product"], _navigator["productSub"], _navigator["vendor"], _navigator["vendorSub"], _navigator["appCodeName"], _navigator["appName"], _navigator["platform"]]["join"](","), | |
// 是否支持触控 | |
h[F1_table["F1_23"]] = function () { | |
var h = 0, | |
E = 0; | |
void 0 !== _navigator["maxTouchPoints"] ? h = _navigator["maxTouchPoints"] : void 0 !== _navigator["msMaxTouchPoints"] && (h = _navigator["msMaxTouchPoints"]), | |
windowCall(function () { | |
_document["createEvent"] && _document["createEvent"]("TouchEvent"), E = 1; | |
}); | |
var u = +("ontouchstart" in _window); | |
return [h, E, u]["join"](","); | |
}(), | |
// 是否支持 indexedDB | |
// https://developer.mozilla.org/en-US/docs/Web/API/indexedDB | |
h[F1_table["F1_24"]] = function () { | |
try { | |
return +!!_window["indexedDB"]; | |
} catch (jr) { | |
return 1; | |
} | |
}() + "", | |
// 是否支持 WEBGL | |
// https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext | |
h[F1_table["F1_25"]] = function () { | |
var E; | |
try { | |
tiems_["start"](aq["WEBGL"]); | |
var h, | |
u, | |
R, | |
canvas = _document["createElement"]("canvas"), | |
gl = canvas["getContext"]("webgl") || canvas["getContext"]("experimental-webgl"), | |
text = "WEBGL_debug_renderer_info"; | |
R = 0 <= gl["getSupportedExtensions"]()["indexOf"](text) ? (h = gl["getExtension"](text), | |
u = gl["getParameter"](h["UNMASKED_VENDOR_WEBGL"]), | |
gl["getParameter"](h["UNMASKED_RENDERER_WEBGL"])) | |
: u = "Not supported", | |
tiems_["end"](aq["WEBGL"]), | |
E = [u, R]["join"](","); | |
} catch (jz) { | |
E = ","; | |
} | |
return r1Set(F1_table["F1_25"], E), E; | |
}(), | |
// 浏览器UA | |
h[F1_table["F1_27"]] = UA(), | |
// https://developer.mozilla.org/en-US/docs/Web/API/Document/getBoxObjectFor | |
// http://help.dottoro.com/ljmqvpgc.php | |
// Deprecated | |
h[F1_table["F1_28"]] = [!!_document["getBoxObjectFor"], !!_window["opera"]]["join"](","), | |
// 检测 eval 函数是否被 hook | |
h[F1_table["F1_29"]] = [void 0 === (t = _window["eval"])["prototype"], "eval" === t["name"], -1 != t["toString"]()["indexOf"]("native")]["join"](","), | |
// 是否支持 document.addBehavior | |
// https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms535922(v=vs.85) | |
// 也许只有IE支持 | |
h[F1_table["F1_30"]] = _document["body"]["addBehavior"] ? 1 : 0, | |
// 设备内存 | |
// https://developer.mozilla.org/en-US/docs/Web/API/Navigator/deviceMemory | |
// Experimental | |
// Secure context | |
h[F1_table["F1_31"]] = _navigator["deviceMemory"] || "", | |
// 设备运行平台 | |
// https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform | |
// Deprecated | |
h[F1_table["F1_34"]] = (R = _navigator["platform"] || "", r1Set(F1_table["F1_34"], R), R), | |
// 设备电池情况 | |
// https://developer.mozilla.org/en-US/docs/Web/API/Navigator/battery | |
// Deprecated | |
h[F1_table["F1_35"]] = [!!(_navigator["battery"] || _navigator["mozBattery"] || _navigator["webkitBattery"]), _getBatteryBoolean]["join"](","), | |
h[F1_table["F1_72"]] = languages(), | |
// 检测本文件是否被格式化 | |
h[F1_table["F1_81"]] = (t = { | |
"getCookie": function () { | |
return document["cookie"]; | |
} | |
}, R = new _RegExp("function\\s?\\(\\)\\{return\\sdocument"), t = t["getCookie"] + "", R["test"](t) ? "0" : "1"), | |
h[CF_table["CF_103"]] = j0 + "", | |
h[CF_table["CF_107"]] = S_2_9_1, | |
// 当前页URL | |
h[CF_table["CF_108"]] = _document["URL"], | |
// 当前页 Refer | |
h[CF_table["CF_109"]] = referrer(), | |
// Firefox 37, Chromium 33 | |
h[F1_table["F1_198"]] = eval["toString"]()["length"], | |
// CPU种类 | |
// http://help.dottoro.com/ljjsison.php | |
// https://developer.mozilla.org/en-US/docs/Web/API/Navigator/oscpu | |
// Deprecated | |
h[F1_table["F1_199"]] = _navigator["cpuClass"] || "", | |
h[CF_table["CF_200"]] = "1", | |
h)); | |
} | |
function copyToR3(h) { | |
!function (h, E) { | |
for (var u in E) { | |
h[u] = E[u]; | |
} | |
}(R3, h); | |
} | |
function jF() { | |
var h, | |
E = function () { | |
for (var h = [F1_table["F1_78"], CF_table["CF_101"], CF_table["CF_103"], F1_table["F1_82"]], | |
E = [], | |
u = h["length"], | |
i = 0; i < u; i++) { | |
E["push"](R4[h[i]] || ""); | |
} | |
var g = E["join"]("_"); | |
return fV(g)["toString"](); | |
}(); | |
copyToR3(( | |
(h = {})[F1_table["F1_85"]] = E, | |
h) | |
); | |
} | |
function jN(u) { | |
// 检测 phantom | |
// https://phantomjs.org/ | |
var R = function () { | |
var h = isInObj(["callPhantom", "_phantom", "phantom"], _window, "phantomjs:window."); | |
if (h) return h; | |
try { | |
null[0](); | |
} catch (jT) { | |
if (jT["stack"] && -1 < jT["stack"]["toString"]()["indexOf"]("phantomjs")) return "phantomjs:phantomjs_err"; | |
} | |
return ""; | |
}(), | |
// 检测 nightmare | |
// https://github.com/segmentio/nightmare | |
g = isInObj(["__nightmare"], _window, "nightmare:window."), | |
// 检测 Selenium | |
jR = function () { | |
var h = isInObj(["webdriver", "_Selenium_IDE_Recorder", "callSelenium", "_selenium"], _window, "selenium:window."); | |
if (h) return h; | |
var E, | |
u = "selenium:document."; | |
if (h = isInObj(["__webdriver_script_fn", "__driver_evaluate", "__webdriver_evaluate", "__selenium_evaluate", "__fxdriver_evaluate", "__driver_unwrapped", "__webdriver_unwrapped", "__selenium_unwrapped", "__fxdriver_unwrapped", "__webdriver_script_func", "__webdriver_script_function"], _document, u)) return h; | |
for (E in _document) if (E["match"](/\$[a-z]dc_/) && _document[E]["cache_"]) return u + E; | |
var R = _document["documentElement"]; | |
return (h = isInObj(["selenium", "webdriver", "driver"], function (h) { | |
return null !== R["getAttribute"](h); | |
}, "selenium:html_attr_")) || ""; | |
}(); | |
// 检测 puppeteer | |
!function (E) { | |
var iframeElem = _document["createElement"]("iframe"); | |
iframeElem["srcdoc"] = "page intentionally left blank", | |
iframeElem["style"]["width"] = "0", | |
iframeElem["style"]["height"] = "0", | |
iframeElem["style"]["opacity"] = "0", | |
_document["body"]["appendChild"](iframeElem); | |
var u = iframeElem["contentWindow"] === _window; | |
if (_document["body"]["removeChild"](iframeElem), u) { | |
return E("puppeteer:iframe_window_reuse"); | |
} | |
_navigator["permissions"] | |
&& _navigator["permissions"]["query"] ? navigator["permissions"]["query"]({ | |
"name": "notifications" | |
})["then"](function (h) { | |
h = "denied" === Notification["permission"] && "prompt" === h["state"]; | |
E(h ? "puppeteer:permissions_contradiction" : ""); | |
})["catch"](function (h) { | |
E(""); | |
}) : E(""); | |
}( | |
function (h) { | |
var E = R || g || jR || h; | |
copyToR3( | |
((h = {})[F1_table["F1_60"]] = !!R, // phantom | |
h[F1_table["F1_61"]] = !!g, // nightmare | |
h[F1_table["F1_62"]] = !!jR, // Selenium | |
h[F1_table["F1_63"]] = "webdriver" in _navigator, | |
h[F1_table["F1_64"]] = !!_navigator["webdriver"], | |
h[F1_table["F1_65"]] = !!_window["chrome"], | |
h[F1_table["F1_69"]] = getToStringLength(_navigator, "webdriver"), | |
h[F1_table["F1_70"]] = E ? 1 : 0, // puppeteer | |
h[F1_table["F1_71"]] = _btoa(E), h)), u(); // puppeteer | |
} | |
); | |
} | |
/** | |
* 搜集电池信息 | |
* | |
*/ | |
function battery() { | |
var h; | |
iu && ( | |
canvasFingerprints(), | |
h = abSelf(), | |
tiems_["start"](aq["CODE_S"]), | |
ip = _sha1sum(h)["then"](function (h) { | |
return iq = h, r4Set(F1_table["F1_82"], h), tiems_["end"](aq["CODE_S"]), h; | |
})), | |
_getBatteryBoolean && _getBatteryBoolean && (tiems_["start"](aq["BATTERY_INFO_EVENT_LOOP"]), | |
j1 = new _Promise2(function (E) { | |
setTimeout(function () { | |
j3 || (j3 = true, E(j2 = { | |
"charging": "-1", | |
"chargingTime": "-1", | |
"dischargingTime": "-1", | |
"level": "-1" | |
})); | |
}, 110), | |
_navigator["getBattery"]()["then"](function (h) { | |
j3 || (j3 = true, E(j2 = h)); | |
}); | |
})["then"](function (h) { | |
return tiems_["end"](aq["BATTERY_INFO_EVENT_LOOP"]), h; | |
})); | |
} | |
/** | |
* 搜集 canvas 指纹 | |
* | |
* @param {*} u | |
*/ | |
function canvas(u) { | |
var h, E; | |
iu ? (canvasHash ? _Promise["resolve"](canvasHash) : canvasPromise)["then"](function (h) { | |
var E; | |
copyToR3(((E = {})[F1_table["F1_3"]] = h, E)), u(); | |
}) : (E = R3[F1_table["F1_1"]], copyToR3(((h = {})[F1_table["F1_3"]] = "0" !== E ? function () { | |
tiems_["start"](aq["CANVAS"]); | |
var h = canvasDraw(); | |
return tiems_["start"](aq["CANVAS_SHA1"]), h = fV(h)["toString"](), tiems_["end"](aq["CANVAS_SHA1"]), r1Set(F1_table["F1_3"], h), tiems_["end"](aq["CANVAS"]), h; | |
}() : "", h)), u()); | |
} | |
/** | |
* 检测文件自身 | |
* | |
* @param {*} u | |
*/ | |
function selfTest(u) { | |
var h, E; | |
iu ? (iq ? Promise["resolve"](iq) : ip || Promise["resolve"](""))["then"](function (h) { | |
var E; | |
copyToR3(((E = {})[F1_table["F1_82"]] = h, E)), u(); | |
}) : (E = function () { | |
tiems_["start"](aq["CODE_S"]); | |
var h = abSelf(), | |
h = fV(h)["toString"](); | |
return r4Set(F1_table["F1_82"], h), tiems_["end"](aq["CODE_S"]), h; | |
}(), copyToR3(((h = {})[F1_table["F1_82"]] = E, h)), u()); | |
} | |
/** | |
* 开始搜集电池信息 | |
* | |
* @param {*} ks | |
*/ | |
function runBattery(ks) { | |
_getBatteryBoolean ? (j2 ? _Promise2["resolve"](j2) : j1 || _Promise2["resolve"]())["then"](function (h) { | |
var E, u, R, g; | |
h && (E = h["charging"], u = h["chargingTime"], R = h["dischargingTime"], g = h["level"], copyToR3(((h = {})[F1_table["F1_41"]] = E, h[F1_table["F1_42"]] = u, h[F1_table["F1_43"]] = R, h[F1_table["F1_44"]] = g, h))), ks(); | |
}) : ks(); | |
} | |
var ky = ""; | |
var kz = 0, | |
kA = ""; | |
function eventObjTemlp() { | |
return { | |
"gotTime": kz, | |
"lastIp": kA | |
}; | |
} | |
var F2_table = { | |
"F2_1": 1, | |
"F2_2": 2, | |
"F2_3": 3, | |
"F2_4": 4, | |
"F2_5": 5, | |
"F2_6": 6, | |
"F2_7": 7, | |
"F2_8": 8, | |
"F2_9": 9, | |
"F2_10": 10, | |
"F2_11": 11, | |
"F2_13": 13, | |
"F2_14": 14, | |
"F2_15": 15, | |
"F2_16": 16, | |
"F2_17": 17, | |
"F2_18": 18, | |
"F2_19": 19, | |
"F2_20": 20, | |
"F2_110": 110 | |
}, | |
F3_table = { | |
"F3_1": 1, | |
"F3_2": 2, | |
"F3_3": 3, | |
"F3_4": 4, | |
"F3_5": 5, | |
"F3_6": 6, | |
"F3_7": 7, | |
"F3_8": 8, | |
"F3_9": 9, | |
"F3_10": 10, | |
"F3_11": 11, | |
"F3_12": 12, | |
"F3_110": 110, | |
"F3_300": 300, | |
"F3_302": 302 | |
}, | |
agX = 0, | |
agY = 0, | |
agZ = 0, | |
kH = 0, | |
aY = 0, | |
aZ = 0, | |
rA = 0, | |
rB = 0, | |
rG = 0, | |
kN = 0, | |
kO = false, | |
S_Click = "click", | |
S_Devicemotion = "devicemotion"; | |
/** | |
* 搜集设备运动信息 | |
* | |
* @param {*} eventTarget | |
*/ | |
function devicemotionListener(eventTarget) { | |
// 监听 accelerationIncludingGravity 事件 | |
// 返回设备的加速度的记录,单位为米每秒平方(m / s2)。 | |
// 与已移除重力加速度的DeviceMotionEvent.acceleration不同,此值是由用户引起的设备的加速度和由重力加速度的总和。 | |
// https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/accelerationIncludingGravity | |
var event = eventTarget["accelerationIncludingGravity"]; | |
event && | |
( | |
agX = event["x"] || 0, | |
agY = event["y"] || 0, | |
agZ = event["z"] || 0 | |
), | |
// 监听 acceleration 事件 | |
// 返回设备的加速度记录(单位:m / s2) | |
// https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/acceleration | |
( | |
event = eventTarget["acceleration"]) && (kH = event["x"] || 0, | |
aY = event["y"] || 0, | |
aZ = event["z"] || 0 | |
); | |
// 监听 rotationRate 事件 | |
// 返回设备围绕其每个轴(x、y、z)旋转的速率(单位:度/秒)。 | |
// https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/rotationRate | |
eventTarget = eventTarget["rotationRate"]; | |
eventTarget && | |
( | |
rA = eventTarget["alpha"] || 0, | |
rB = eventTarget["beta"] || 0, | |
rG = eventTarget["gamma"] || 0 | |
), | |
0 !== kN || 0 === kH && 0 === aY && 0 === aZ || (kN = getTime()), | |
reportEvent(false); | |
} | |
/** | |
* 点击事件回调函数 | |
* 搜集点击信息 | |
* https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event | |
* | |
* @param {*} event | |
* @return {*} | |
*/ | |
function clickCallback(event) { | |
var E = ky, | |
u = j0, | |
R = getTime(), | |
g = R - u + "", | |
l0 = R + "", | |
u = referrer(); | |
return (R = {})[F2_table["F2_1"]] = event["type"], | |
R[F2_table["F2_2"]] = event["clientX"] + "", | |
R[F2_table["F2_3"]] = event["clientY"] + "", | |
R[F2_table["F2_4"]] = event["pageX"] + "", | |
R[F2_table["F2_5"]] = event["pageY"] + "", | |
R[F2_table["F2_6"]] = function (h) { | |
for (var E = []; h && 1 === h["nodeType"]; h = h["parentNode"]) { | |
if (h["hasAttribute"]("id")) return E["unshift"]("id(\"" + h["getAttribute"]("id") + "\")"), E["join"]("/"); | |
if (h["hasAttribute"]("class")) E["unshift"](h["localName"]["toLowerCase"]() + "[@class=\"" + h["getAttribute"]("class") + "\"]");else { | |
for (var u = 1, R = h["previousSibling"]; R; R = R["previousSibling"]) R["localName"] === h["localName"] && u++; | |
E["unshift"](h["localName"]["toLowerCase"]() + "[" + u + "]"); | |
} | |
} | |
return E["length"] ? "/" + E["join"]("/") : null; | |
}(event["target"]), | |
R[F2_table["F2_7"]] = l0, | |
R[F2_table["F2_8"]] = kH + "", | |
R[F2_table["F2_9"]] = aY + "", | |
R[F2_table["F2_10"]] = aZ + "", | |
R[F2_table["F2_11"]] = void 0 === event["isTrusted"] ? "2" : event["isTrusted"] ? "1" : "0", | |
R[F2_table["F2_13"]] = agX + "", | |
R[F2_table["F2_14"]] = agY + "", | |
R[F2_table["F2_15"]] = agZ + "", | |
R[F2_table["F2_16"]] = rA + "", | |
R[F2_table["F2_17"]] = rB + "", | |
R[F2_table["F2_18"]] = rG + "", | |
R[F2_table["F2_19"]] = ( | |
_window["innerWidth"] || _document["documentElement"]["clientWidth"] || _document["body"]["clientWidth"]) | |
+ "x" | |
+ (_window["innerHeight"] || _document["documentElement"]["clientHeight"] || _document["body"]["clientHeight"]), | |
R[F2_table["F2_20"]] = g, | |
R[F2_table["F2_110"]] = UA(), | |
R[CF_table["CF_101"]] = E, | |
R[CF_table["CF_103"]] = l0, | |
R[CF_table["CF_106"]] = I_2020, | |
R[CF_table["CF_107"]] = S_2_9_1, | |
R[CF_table["CF_109"]] = u["length"] > I_2500 ? "-1" : u, | |
R[CF_table["CF_200"]] = "2", | |
R; | |
} | |
function reportEvent(h) { | |
var E, u, R, g, lc, f, p; | |
kO || | |
(p = eventObjTemlp()["gotTime"], | |
(h || !h && 0 !== p && 0 !== kN) | |
&& (_removeEventListener(_window, S_Devicemotion, devicemotionListener), | |
kO = true, | |
report( | |
( | |
E = eventObjTemlp(), | |
u = E["gotTime"], | |
R = E["lastIp"], | |
g = ky, | |
lc = j0, | |
f = tiems_["getTime"](aq["TOTAL"]), | |
h = tiems_["getData"](), | |
p = referrer(), | |
(E = {})[F3_table["F3_1"]] = kH + "", | |
E[F3_table["F3_2"]] = aY + "", | |
E[F3_table["F3_3"]] = aZ + "", | |
E[F3_table["F3_4"]] = agX + "", | |
E[F3_table["F3_5"]] = agY + "", | |
E[F3_table["F3_6"]] = agZ + "", | |
E[F3_table["F3_7"]] = rA + "", | |
E[F3_table["F3_8"]] = rB + "", | |
E[F3_table["F3_9"]] = rG + "", | |
E[F3_table["F3_10"]] = 0 !== kN ? kN - lc + "" : "-1", | |
E[F3_table["F3_11"]] = R, | |
E[F3_table["F3_12"]] = 0 !== u ? u - lc + "" : "-1", | |
E[CF_table["CF_101"]] = g, | |
E[CF_table["CF_103"]] = getTime() + "", | |
E[CF_table["CF_106"]] = I_2020, | |
E[CF_table["CF_107"]] = S_2_9_1, | |
E[CF_table["CF_109"]] = p["length"] > I_2500 ? "-1" : p, | |
E[F3_table["F3_110"]] = UA(), | |
E[CF_table["CF_200"]] = "3", | |
E[F3_table["F3_300"]] = f, | |
E[F3_table["F3_302"]] = h, | |
E | |
) | |
) | |
)); | |
} | |
function clickListener(h) { | |
h = clickCallback(h); | |
_removeEventListener(_document, S_Click, clickListener), | |
report(h); | |
} | |
function report(h) { | |
appendLogData(h); | |
h = encodeURIComponent(_btoa(JSON["stringify"]({ | |
"data": _aes_encrypt(h, S_7D33FCD55FE3447C, S_636014d173e04409), | |
"key_id": S_3a159c9c204845c9 | |
}))); | |
!function (h, E) { | |
E = h + "?data=" + E + "&_=" + Math["random"](); | |
U_8000 < E || (new Image()["src"] = E); | |
}(g, h); | |
} | |
function mainObj() { | |
this["initReport"] = false, this["reportQueue"] = []; | |
} | |
function main() { | |
var h = R3; | |
Math["random"]() < 0.001 && (main["R"] = true, | |
xhr({ | |
"url": "https:zhitong.baidu.com/castor/gateway/rr/jtcr", | |
"headers": { | |
"Content-Type": "text/plain;charset=UTF-8" | |
}, | |
"withCredentials": !(h = { | |
"sid": h[CF_table["CF_106"]], | |
"c": h[F1_table["F1_3"]], | |
"s": h[F1_table["F1_82"]], | |
"v": h[CF_table["CF_107"]], | |
"co": getSelf(), | |
"u": h[CF_table["CF_108"]] | |
}), | |
"data": _btoa(JSON["stringify"](h)) | |
})); | |
} | |
mainObj["prototype"]["pushReportQueue"] = function (h) { | |
this["reportQueue"]["push"](h); | |
}, | |
mainObj["prototype"]["executeReportQueue"] = function () { | |
this["initReport"] = true, | |
this["reportQueue"]["length"] && | |
(this["reportQueue"]["forEach"](function (h) { | |
h(); | |
}), | |
this["reportQueue"] = []); | |
}, | |
mainObj["prototype"]["init"] = function () { | |
tiems_["start"](aq["TOTAL"]); | |
var h = getTime(); | |
j0 = h, r4Set(CF_table["CF_103"], h + ""); | |
}, | |
mainObj["prototype"]["preparePropertyReport"] = function (u) { | |
var h, | |
R = this; | |
battery(), | |
getFingerPrints(), | |
h = windowCall(_window[S__abbaidu_2020_zidgetf]), | |
g = windowCall(_window[S__abbaidu_2020_bidgetf]), | |
p = windowCall(_window[S__abbaidu_2020_subidgetf]) | |
|| windowCall(_window["__abbaidu_20180315_subidgetf"]), | |
f = windowCall(_window[S__abbaidu_2020_extra_datagetf]), | |
copyToR3(( | |
(E = {})[F1_table["F1_112"]] = h, | |
E[F1_table["F1_113"]] = g, | |
E[F1_table["F1_114"]] = p, | |
E[F1_table["F1_115"]] = f, | |
E) | |
), | |
copyToR3(( | |
(g = {})[F1_table["F1_79"]] = plugins(), | |
g[F1_table["F1_80"]] = browserTest(), | |
g) | |
); | |
var E, | |
g, | |
lw, | |
f, | |
p = I_2020, | |
f = ( | |
f = true, | |
ky && !f | |
|| ( | |
lw = j0, | |
E = R3[CF_table["CF_108"]], | |
g = R3[CF_table["CF_109"]], | |
f = R3[F1_table["F1_27"]], | |
tiems_["start"](aq["CID"]), | |
lw = "anti-bot-df" + Math["random"]() + E + g + f + lw, | |
ky = fV(lw)["toString"](), | |
tiems_["end"](aq["CID"])), | |
windowCall(_window["__abbaidu_20180315_cidcb"], [ky]), | |
ky | |
); | |
r4Set(CF_table["CF_101"], f), | |
lw = p, | |
p = f, | |
copyToR3(( | |
(f = {})[CF_table["CF_106"]] = lw, | |
f[CF_table["CF_101"]] = p, f)), | |
jN(function () { | |
var h; | |
h = function () { | |
var h; | |
!function () { | |
var h; | |
tiems_["start"](aq["FIELD_S"]); | |
var E = gP(); | |
tiems_["end"](aq["FIELD_S"]), | |
r4Set(F1_table["F1_78"], E), | |
copyToR3(((h = {})[F1_table["F1_78"]] = E, h)); | |
}(), | |
h = getTime(), | |
copyToR3(((E = {})[F1_table["F1_32"]] = h - j0 + "", E)), | |
jF(); | |
var E = R3; | |
u(E), | |
R["executeReportQueue"](), | |
"1" === E[F1_table["F1_81"]] && | |
main(); | |
}, | |
runBattery(function () { | |
selfTest(function () { | |
canvas(function () { | |
h(); | |
}); | |
}); | |
}); | |
} | |
); | |
}, | |
mainObj["prototype"]["prepareEventReport"] = function () { | |
rtc(function (h) { | |
var E; | |
h && (E = h, h = getTime(), E && (kA = E), h && (kz = h), reportEvent(false)); | |
}), | |
_addEventListener(_window, S_Devicemotion, devicemotionListener), | |
_addEventListener(_document, S_Click, clickListener), | |
setTimeout(function () { | |
reportEvent(true); | |
}, 2000); | |
}, | |
mainObj["prototype"]["report"] = function (h) { | |
var E = h["data"], | |
u = h["success"], | |
R = h["error"], | |
h = u || this["handleResponse"], | |
u = R || function (h) { | |
return windowCall(_window[S__abbaidu_2020_onerror], [h]); | |
}, | |
R = E || R3, | |
E = function (h) { | |
h = { | |
"data": _aes_encrypt(h, S_7D33FCD55FE3447C, S_636014d173e04409), | |
"key_id": S_3a159c9c204845c9 + "" | |
}; | |
return _btoa(JSON["stringify"](h)); | |
}(R); | |
tiems_["end"](aq["TOTAL"]), appendLogData(R), xhr({ | |
"url": g, | |
"data": E, | |
"success": h, | |
"error": u | |
}); | |
}, | |
mainObj["prototype"]["handleResponse"] = function (E, h) { | |
try { | |
_window[S__abbaidu_2020_cb] ? windowCall(_window[S__abbaidu_2020_cb], [E]) : windowCall(_window["__abbaidu_20181211_cb"], [E]); | |
} catch (lT) { | |
var u, | |
R = E, | |
g = null; | |
-1 !== E["indexOf"]("|") && (R = (u = E["split"]("|"))[0], g = u[1]), windowCall(_window["__abbaidu_20180306_idcb"], [R]), windowCall(_window["__abbaidu_20180315_scorecb"], [g]), windowCall(_window["__abbaidu_20180315_lid_score_cb"], [R, g]), windowCall(_window["__abbaidu_20190124_cb"], [E]); | |
} | |
if (h) { | |
var E = h["getResponseHeader"]("Authentication"), | |
h = E["substr"](-16), | |
lZ = _aes_decrypt(E["substr"](0, E["length"] - 16), h, S_636014d173e04409)["split"]("|"), | |
f = lZ["length"]; | |
if (0 < f && f % 2 == 0) { | |
for (var p = {}, i = 0; i < f; i += 2) { | |
var d = lZ[i], | |
e = lZ[i + 1]; | |
p[d] = e; | |
} | |
-1 < [p[F1_table["F1_83"]], p[F1_table["F1_86"]]]["indexOf"]("1") && !main["R"] && this instanceof mainObj && main(); | |
} | |
} | |
}; | |
function m5(h) { | |
"interactive" !== _document["readyState"] && "complete" !== _document["readyState"] || m9 || (m9 = 1, ma["init"](), ma["preparePropertyReport"](function () { | |
ma["report"]({ | |
"success": function (h, E) { | |
ma["handleResponse"](h, E), ma["prepareEventReport"](); | |
} | |
}); | |
})); | |
} | |
var m9, | |
ma = new mainObj(); | |
_addEventListener(_window, "load", function (h) { | |
windowCall(m5); | |
}), | |
_addEventListener(_document, "readystatechange", function (h) { | |
windowCall(m5); | |
}), | |
windowCall(m5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment