52pojieSignIn.js 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. /*
  2. 52破解签到
  3. [Script]
  4. # > 52破解签到
  5. ^https?:\/\/www\.52pojie\.cn\/home\.php\?mod=space url script-request-body https://git.jojo21.top/shawenguan/Quantumult-X/raw/master/Scripts/52pojie/52pojieSignIn.js
  6. [MITM]
  7. hostname = www.52pojie.cn
  8. */
  9. const scriptName = `52破解签到`;
  10. const magicJS = MagicJS(scriptName, "INFO");
  11. const gCommonHeaders = {
  12. 'Accept': `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8`,
  13. 'Accept-Encoding': `gzip, deflate, br`,
  14. 'Cookie': `htVC_2132_connect_is_bind=0; htVC_2132_lastact=1721353586%09forum.php%09; htVC_2132_sid=0; htVC_2132_checkfollow=1; htVC_2132_checkpm=1; htVC_2132_lastcheckfeed=801689%7C1721353579; htVC_2132_ulastactivity=1721353578%7C0; wzws_cid=0a5aa05289bba7906a7eb95f405891529879c5fdfe57b38442ad11f13491ddf11b1c72e3b99876ea4beb39fa6f7617542b31c5dc9f08ed0ba337c29ef8851f3cd4f76b58833dd6a6c0ea65b2a8448fc4; wzws_sessionid=gTBjNGVkNoJkYjFjYWGAMTQuMTQ1LjIwNy4yNKBmmcVt; htVC_2132_nofavfid=1; htVC_2132_noticonf=801689D1D3_3_1; htVC_2132_ttask=801689%7C20240718; htVC_2132_auth=d08fcFOga0naDTeBuUeQqpDaztLMilJQHvzMWs3wWfp7TKhLoxl8w2sH77o%2FFYUb13saSH%2BaAUnPZ82Y2nNCI8NRmGI; htVC_2132_lastvisit=1721206759; htVC_2132_saltkey=bSP0xluU`,
  15. 'Connection': `keep-alive`,
  16. 'Sec-Fetch-Mode': `navigate`,
  17. 'Host': `www.52pojie.cn`,
  18. 'User-Agent': `Mozilla/5.0 (iPhone; CPU iPhone OS 16_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1`,
  19. 'Sec-Fetch-Site': `same-origin`,
  20. 'Referer': `https://www.52pojie.cn/`,
  21. 'Sec-Fetch-Dest': `document`,
  22. 'Accept-Language': `zh-CN,zh-Hans;q=0.9`
  23. };
  24. let gRetBody;
  25. async function Main() {
  26. if (magicJS.isStrictRequest) {
  27. magicJS.checkRecordRequestBody();
  28. }
  29. if (magicJS.isRequest) {
  30. checkHandleRequest();
  31. } else {
  32. gCommonHeaders[`Cookie`] = magicJS.data.read('52pojie_cookie');
  33. // await signIn();
  34. // await taskDraw();
  35. await proxyTaskDraw();
  36. }
  37. magicJS.notification.msg('');
  38. if (gRetBody) {
  39. magicJS.done({
  40. body: JSON.stringify(gRetBody)
  41. });
  42. } else {
  43. magicJS.done();
  44. }
  45. }
  46. function checkHandleRequest() {
  47. const url = $request.url;
  48. const path = $request.path;
  49. magicJS.log(`请求url=${url}#${$request.method}`);
  50. if ($request && $request.method != 'OPTIONS') {
  51. let cookieStr = $request.headers['Cookie'];
  52. if (cookieStr) {
  53. let oldCookieStr = magicJS.data.read('52pojie_cookie');
  54. magicJS.logger.info(`oldCookieStr=${oldCookieStr}`);
  55. magicJS.logger.info(`cookieStr=${cookieStr}`);
  56. if (compareCookieStr(cookieStr, oldCookieStr) != 0) {
  57. magicJS.data.write('52pojie_cookie', cookieStr);
  58. magicJS.notification.appendNotifyInfo(`🎉吾爱破解Cookie更新成功!`);
  59. } else {
  60. magicJS.data.write('52pojie_cookie', cookieStr);
  61. magicJS.logger.info(`当前Cookie已经是最新无需更新`);
  62. }
  63. }
  64. }
  65. }
  66. function compareCookieStr(cookieStr1, cookieStr2) {
  67. let cookieDict1 = magicJS.parseCookies(cookieStr1);
  68. let cookieDict2 = magicJS.parseCookies(cookieStr2);
  69. let skipKeys = ['htVC_2132_lastact', 'htVC_2132_lastcheckfeed', 'htVC_2132_ulastactivity', 'htVC_2132_lastvisit', 'htVC_2132_st_p'];
  70. let retCode = 0;
  71. for (let key in cookieDict1) {
  72. if (!skipKeys.includes(key)) {
  73. if (cookieDict1[key] != void 0 && cookieDict2[key] != void 0 && cookieDict1[key] != cookieDict2[key]) {
  74. magicJS.logger.info(`${key}`);
  75. retCode = -1;
  76. break;
  77. }
  78. }
  79. }
  80. return retCode;
  81. }
  82. async function signIn() {
  83. let url = `https://www.52pojie.cn/home.php?mod=task&do=apply&id=2&referer=%2F`;
  84. let options = {
  85. url: url,
  86. headers: gCommonHeaders,
  87. body: ``,
  88. };
  89. let result = await magicJS.http.get(options).then(response => {
  90. try {
  91. let rspData = response.body;
  92. magicJS.logger.info(`rspData=${JSON.stringify(rspData)}`);
  93. return rspData;
  94. } catch (e) {
  95. magicJS.logger.error(e);
  96. }
  97. }).catch(err => {
  98. const msg = `请求签到异常\n${JSON.stringify(err)}`;
  99. magicJS.logger.error(msg);
  100. });
  101. if (!result) {
  102. return;
  103. }
  104. if (result.match(/恭喜您/)) {//恭喜您
  105. magicJS.notification.appendNotifyInfo(`🎉恭喜你今日签到成功!`);
  106. } else {
  107. if (result.match(/抱歉,本期您已申请过此任务,请下期再来/)) {//下期再来
  108. magicJS.notification.appendNotifyInfo(`⚠️抱歉,本期您已申请过此任务,请下期再来`);
  109. } else {
  110. if (result.match(/您需要先登录才能继续本操作/)) {//需要先登录
  111. // magicJS.notification.appendNotifyInfo(`❌请先登录获取最新Cookie!!!`);
  112. magicJS.notification.post(scriptName, "", `❌请先登录获取最新Cookie!!!`, 'https://www.52pojie.cn/home.php?mod=task&do=apply&id=2&referer=%2F');
  113. } else {
  114. // magicJS.notification.appendNotifyInfo(`❌信息未正常处理,请更新脚本!!!`);
  115. magicJS.notification.post(scriptName, "", `❌信息未正常处理,请更新脚本!!!`, 'https://www.52pojie.cn/home.php?mod=task&do=apply&id=2&referer=%2F');
  116. }
  117. }
  118. }
  119. }
  120. async function taskDraw() {
  121. let url = `https://www.52pojie.cn/home.php?mod=task&do=draw&id=2&referer=https%3A%2F%2Fwww.52pojie.cn%2F.%2F%2F`;
  122. let options = {
  123. url: url,
  124. headers: gCommonHeaders,
  125. body: ``,
  126. };
  127. let result = await magicJS.http.get(options).then(response => {
  128. try {
  129. let rspData = response.body;
  130. magicJS.logger.info(`rspData=${JSON.stringify(rspData)}`);
  131. return rspData;
  132. } catch (e) {
  133. magicJS.logger.error(e);
  134. }
  135. }).catch(err => {
  136. const msg = `请求任务异常\n${JSON.stringify(err)}`;
  137. magicJS.logger.error(msg);
  138. });
  139. if (!result) {
  140. return;
  141. }
  142. if (result.match(/恭喜您/)) {//恭喜您
  143. magicJS.notification.appendNotifyInfo(`🎉恭喜您,任务已完成,关注论坛微信“吾爱破解论坛”,一键签到送论坛币。`);
  144. } else {
  145. if (result.match(/不是进行中的任务/)) {//下期再来
  146. magicJS.notification.appendNotifyInfo(`⚠️不是进行中的任务!`);
  147. } else {
  148. if (result.match(/您需要先登录才能继续本操作/)) {//需要先登录
  149. // magicJS.notification.appendNotifyInfo(`❌请先登录获取最新Cookie!!!`);
  150. magicJS.notification.post(scriptName, "", `❌请先登录获取最新Cookie!!!`, 'https://www.52pojie.cn/home.php?mod=task&do=draw&id=2&referer=https%3A%2F%2Fwww.52pojie.cn%2F.%2F%2F');
  151. } else {
  152. // magicJS.notification.appendNotifyInfo(`❌信息未正常处理,请更新脚本!!!`);
  153. magicJS.notification.post(scriptName, "", `❌信息未正常处理,请更新脚本!!!`, 'https://www.52pojie.cn/home.php?mod=task&do=draw&id=2&referer=https%3A%2F%2Fwww.52pojie.cn%2F.%2F%2F');
  154. }
  155. }
  156. }
  157. }
  158. async function proxyTaskDraw() {
  159. let data = {
  160. url: encodeURIComponent(`https://www.52pojie.cn/home.php?mod=task&do=draw&id=2&referer=https%3A%2F%2Fwww.52pojie.cn%2F.%2F%2F`),
  161. headers: gCommonHeaders,
  162. body: ``,
  163. };
  164. let options = {
  165. url: 'http://192.168.0.137/RemoteBrowser/index.php',
  166. body: JSON.stringify(data),
  167. headers: {
  168. "content-type": "application/json; charset=utf-8"
  169. }
  170. };
  171. let result = await magicJS.http.post(options).then(response => {
  172. try {
  173. let rspData = response.body;
  174. magicJS.logger.info(`rspData=${JSON.stringify(rspData)}`);
  175. return rspData;
  176. } catch (e) {
  177. magicJS.logger.error(e);
  178. }
  179. }).catch(err => {
  180. const msg = `请求任务异常\n${JSON.stringify(err)}`;
  181. magicJS.logger.error(msg);
  182. });
  183. if (!result) {
  184. return;
  185. }
  186. if (result.match(/恭喜您/)) {//恭喜您
  187. magicJS.notification.appendNotifyInfo(`🎉恭喜您,任务已完成,关注论坛微信“吾爱破解论坛”,一键签到送论坛币。`);
  188. } else {
  189. if (result.match(/不是进行中的任务/)) {//下期再来
  190. magicJS.notification.appendNotifyInfo(`⚠️不是进行中的任务!`);
  191. } else {
  192. if (result.match(/您需要先登录才能继续本操作/)) {//需要先登录
  193. // magicJS.notification.appendNotifyInfo(`❌请先登录获取最新Cookie!!!`);
  194. magicJS.notification.post(scriptName, "", `❌请先登录获取最新Cookie!!!`, 'https://www.52pojie.cn/home.php?mod=task&do=draw&id=2&referer=https%3A%2F%2Fwww.52pojie.cn%2F.%2F%2F');
  195. } else {
  196. // magicJS.notification.appendNotifyInfo(`❌信息未正常处理,请更新脚本!!!`);
  197. magicJS.notification.post(scriptName, "", `❌信息未正常处理,请更新脚本!!!`, 'https://www.52pojie.cn/home.php?mod=task&do=draw&id=2&referer=https%3A%2F%2Fwww.52pojie.cn%2F.%2F%2F');
  198. }
  199. }
  200. }
  201. }
  202. Main().catch((e) => magicJS.logger.log(`-\n ${e}`)).finally(() => magicJS.done());
  203. //---SyncByPyScript---MagicJS3-start
  204. function MagicJS(e = "MagicJS", t = "INFO") { const r = () => { const e = "undefined" != typeof $loon, t = "undefined" != typeof $task, n = "undefined" != typeof module, r = "undefined" != typeof $httpClient && !e, o = "undefined" != typeof $storm, i = "undefined" != typeof $environment && void 0 !== $environment["stash-build"]; var s = r || e || o || i; const a = "undefined" != typeof importModule; return { isLoon: e, isQuanX: t, isNode: n, isSurge: r, isStorm: o, isStash: i, isSurgeLike: s, isScriptable: a, get name() { return e ? "Loon" : t ? "QuantumultX" : n ? "NodeJS" : r ? "Surge" : a ? "Scriptable" : "unknown" }, get build() { return r ? $environment["surge-build"] : i ? $environment["stash-build"] : o ? $storm.buildVersion : void 0 }, get language() { if (r || i) return $environment.language }, get version() { return r ? $environment["surge-version"] : i ? $environment["stash-version"] : o ? $storm.appVersion : n ? process.version : void 0 }, get system() { return r ? $environment.system : n ? process.platform : void 0 }, get systemVersion() { if (o) return $storm.systemVersion }, get deviceName() { if (o) return $storm.deviceName } } }, o = (n, e = "INFO") => { let r = e, t = "\n"; const o = { SNIFFER: 6, DEBUG: 5, INFO: 4, NOTIFY: 3, WARNING: 2, ERROR: 1, CRITICAL: 0, NONE: -1 }, i = { SNIFFER: "", DEBUG: "", INFO: "", NOTIFY: "", WARNING: "❗ ", ERROR: "❌ ", CRITICAL: "❌ ", NONE: "" }, s = (e, t = "INFO") => { o[r] < o[t.toUpperCase()] || console.log(`██[${n}][${t}]` + i[t.toUpperCase()] + e + "\n") }; return { getLevel: () => r, setLevel: e => { r = e }, sniffer: (...e) => { e = e.join(t); s(e, "SNIFFER") }, log: (...e) => { e = e.join(t); console.log(`██[${n}]` + e + "\n") }, debug: (...e) => { e = e.join(t); s(e, "DEBUG") }, info: (...e) => { e = e.join(t); s(e, "INFO") }, notify: (...e) => { e = e.join(t); s(e, "NOTIFY") }, warning: (...e) => { e = e.join(t); s(e, "WARNING") }, error: (...e) => { e = e.join(t); s(e, "ERROR") }, retry: (...e) => { e = e.join(t); s(e, "RETRY") } } }; return new class { constructor(e, t) { var n; this._startTime = Date.now(), this.version = "3.0.0", this.scriptName = e, this.env = r(), this.logger = o(e, t), this.http = "function" == typeof MagicHttp ? MagicHttp(this.env, this.logger) : void 0, this.data = "function" == typeof MagicData ? MagicData(this.env, this.logger) : void 0, this.notification = "function" == typeof MagicNotification ? MagicNotification(this.scriptName, this.env, this.logger, this.http) : void 0, this.utils = "function" == typeof MagicUtils ? MagicUtils(this.env, this.logger) : void 0, this.qinglong = "function" == typeof MagicQingLong ? MagicQingLong(this.env, this.data, this.logger) : void 0, void 0 !== this.data && (t = this.data.read("magic_loglevel"), n = this.data.read("magic_bark_url"), t && this.logger.setLevel(t.toUpperCase()), n) && this.notification.setBark(n), this.logger.info(e + ", 开始执行!") } get isRequest() { return "undefined" != typeof $request } get isStrictRequest() { return "undefined" != typeof $request && "undefined" == typeof $response } get isResponse() { return "undefined" != typeof $response } get isDebug() { return "DEBUG" === this.logger.level } get request() { return "undefined" != typeof $request ? $request : void 0 } get response() { if ("undefined" != typeof $response) return $response.hasOwnProperty("status") && ($response.statusCode = $response.status), $response.hasOwnProperty("statusCode") && ($response.status = $response.statusCode), $response } log(...e) { this.logger.log(e) } toStr(e, t = null) { try { return JSON.stringify(e) } catch { return t } } toObj(e, t = null) { try { return JSON.parse(e) } catch { return t } } checkRecordRequestBody() { if (this.isRequest) { var t = $request.body; if (t) { var n = this.env, r = $request.path; let e = this.scriptName + "#" + r.replace("/", "_"); e = e.replace("?", "#"), n.isQuanX && $prefs.setValueForKey(t, e), (n.isLoon || n.isSurge) && $persistentStore.write(t, e), n.isNode && require("fs").writeFileSync(e + ".json", t, { flag: "w" }, e => console.log(e)) } } } getRequestBody() { var e = this.env, t = $request.path; let n = this.scriptName + "#" + t.replace("/", "_"); if (n = n.replace("?", "#"), e.isSurge || e.isLoon) return $persistentStore.read(n); if (e.isQuanX) return $prefs.valueForKey(n); if (e.isNode) { t = n + ".json", e = require("fs"); if (!e.existsSync(t)) return JSON.parse(e.readFileSync(t)) } } getResponseBody() { if ($response) return $response.body } parseCookies(e) { let t = {}; return e && e.split(";").forEach(function (e) { e = e.split("="); t[e.shift().trim()] = decodeURI(e.join("=")) }), t } serializeCookies(e) { var t, n = []; for (t in e) { var r = e[t], r = encodeURIComponent(t) + "=" + encodeURIComponent(r); n.push(r) } return n.join("; ") } parseSetCookies(e) { const o = ["Expires", "Max-Age", "Domain", "Path", "HttpOnly", "SameSite"]; e = e.split(";"); let i = null; const s = {}, a = []; return e.forEach(e => { var t, e = e.trim(); let n = null, r = !0; if (e.includes("=") ? (t = e.split("="), n = t[0].trim(), r = t[1].trim()) : n = e, o.includes(n)) s[i] && (s[i][n] = r, s[i].attribs[n] = r); else { i = n; let t = {}; i.includes(",") && i.split(",").forEach(e => { e = e.trim(); o.includes(e) ? t[e] = !0 : i = e }), s[i] = { name: i, value: r, attribs: t }, a.push(s[i]) } }), a } objToQueryStr(t, n) { let r = ""; for (const o in t) { let e = t[o]; null != e && "" !== e && ("object" == typeof e ? e = JSON.stringify(e) : n && (e = encodeURIComponent(e)), r += `${o}=${e}&`) } return r = r.substring(0, r.length - 1) } parseQueryStr(e) { var t = {}, n = (e = -1 < e.indexOf("?") ? e.split("?")[1] : e).split("&"); for (let e = 0; e < n.length; e++) { var r = n[e].split("="); t[r[0]] = r[1] } return t } deepClone(e, t) { for (var n in t = t || {}, e) "object" == typeof e[n] ? (t[n] = e[n].constructor === Array ? [] : {}, this.deepClone(e[n], t[n])) : t[n] = e[n]; return t } formatDate(e, t) { var n, r = { "M+": e.getMonth() + 1, "d+": e.getDate(), "H+": e.getHours(), "m+": e.getMinutes(), "s+": e.getSeconds(), "q+": Math.floor((e.getMonth() + 3) / 3), S: e.getMilliseconds() }; for (n in /(y+)/.test(t) && (t = t.replace(RegExp.$1, (e.getFullYear() + "").substr(4 - RegExp.$1.length))), r) new RegExp("(" + n + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? r[n] : ("00" + r[n]).substr(("" + r[n]).length))); return t } parseDate(a, e) { let l = { y: 0, M: 1, d: 0, H: 0, h: 0, m: 0, s: 0, S: 0 }; (e = e || "yyyy-MM-dd").replace(/([^yMdHmsS]*?)(([yMdHmsS])\3*)([^yMdHmsS]*?)/g, function (e, t, n, r, o, i, s) { return a = a.replace(new RegExp(t + "(\\d{" + n.length + "})" + o), function (e, t) { return l[r] = parseInt(t), "" }), "" }), l.M--; e = new Date(l.y, l.M, l.d, l.H, l.m, l.s); return 0 !== l.S && e.setMilliseconds(l.S), e } costTime() { var e = this.scriptName + "执行完毕!", t = (this._endTime = (new Date).getTime(), this._endTime - this._startTime); this.logger.info(e + `耗时【${t / 1e3}】秒`) } done = (e = {}) => { this.costTime(), "undefined" != typeof $done && $done(e) } }(e, t) } function MagicHttp(d, g) { var e; let p; d.isNode && (e = require("axios"), p = e.create()); class t { constructor(e = !0) { this.handlers = [], this.isRequest = e } use(e, t, n) { return "function" == typeof e && g.debug("Register fulfilled " + e.name), "function" == typeof t && g.debug("Register rejected " + t.name), this.handlers.push({ fulfilled: e, rejected: t, synchronous: !(!n || "boolean" != typeof n.synchronous) && n.synchronous, runWhen: n ? n.runWhen : null }), this.handlers.length - 1 } eject(e) { this.handlers[e] && (this.handlers[e] = null) } forEach(t) { this.handlers.forEach(e => { null !== e && t(e) }) } } function f(e) { let n = { ...e }; return n.params && !d.isNode && (e = Object.keys(n.params).map(e => { var t = encodeURIComponent(e); return n.url = n.url.replace(new RegExp(e + "=[^&]*", "ig"), ""), n.url = n.url.replace(new RegExp(t + "=[^&]*", "ig"), ""), t + "=" + encodeURIComponent(n.params[e]) }).join("&"), n.url.indexOf("?") < 0 && (n.url += "?"), /(&|\?)$/g.test(n.url) || (n.url += "&"), n.url += e, delete n.params, g.debug("Params to QueryString: " + n.url)), n } const y = (e, t = null) => { if (e) { t = { ...e, config: e.config || t, status: e.statusCode || e.status, body: e.body || e.data, headers: e.headers || e.header }; if ("string" == typeof t.body) try { t.body = JSON.parse(t.body) } catch { } return delete t.data, t } return e }; const h = (e, t = null) => { if (e && 400 <= e.status) return g.debug("Raise exception when status code is " + e.status), { name: "RequestException", message: "Request failed with status code " + e.status, config: t || e.config, response: e } }, m = { request: new t, response: new t(!1) }; let v = [], b = [], S = !0; function N(e) { return e = f(e), g.debug(`HTTP ${e.method.toUpperCase()}:` + "\n" + JSON.stringify(e)), e } function E(t) { try { t = t && y(t), g.sniffer(`HTTP ${t.config.method.toUpperCase()}:` + "\n" + JSON.stringify(t.config) + "\nSTATUS CODE:\n" + t.status + "\nRESPONSE:\n" + ("object" == typeof t.body ? JSON.stringify(t.body) : t.body)); var e = h(t); return e ? Promise.reject(e) : t } catch (e) { return g.error(e), t } } const n = (e, n) => { let r; n = ((e, t) => { let n = "object" == typeof t ? { headers: {}, ...t } : { url: t, headers: {} }; return n.method || (n.method = e), !0 === (n = f(n)).rewrite && (d.isSurge ? (n.headers["X-Surge-Skip-Scripting"] = !1, delete n.rewrite) : d.isQuanX && (n.hints = !1, delete n.rewrite)), d.isSurgeLike ? (t = n.headers["content-type"] || n.headers["Content-Type"], "GET" !== n.method && t && 0 <= t.indexOf("application/json") && n.body instanceof Array && (n.body = JSON.stringify(n.body), g.debug("Convert Array object to String: " + n.body))) : d.isQuanX ? (n.hasOwnProperty("body") && "string" != typeof n.body && (n.body = JSON.stringify(n.body)), n.method = e) : d.isNode && ("POST" === e || "PUT" === e || "PATCH" === e || "DELETE" === e ? n.data = n.data || n.body : "GET" === e && (n.params = n.params || n.body), delete n.body), n })(e.toUpperCase(), n), r = d.isNode ? p : d.isSurgeLike ? i => new Promise((r, o) => { $httpClient[e.toLowerCase()](i, (e, t, n) => { e ? (e = { name: e.name || e, message: e.message || e, stack: e.stack || e, config: i, response: y(t) }, o(e)) : (t.config = i, t.body = n, r(t)) }) }) : r => new Promise((n, t) => { $task.fetch(r).then(e => { e = y(e, r); var t = h(e, r); if (t) return Promise.reject(t); n(e) }).catch(e => { e = { name: e.message || e.error, message: e.message || e.error, stack: e.error, config: r, response: e.response ? y(e.response) : null }; t(e) }) }); let o; var t = n; try { v = [], b = [], m.request.forEach(e => { "function" == typeof e.runWhen && !1 === e.runWhen(t) || (S = S && e.synchronous, v.unshift(e.fulfilled, e.rejected)) }), m.response.forEach(e => { b.push(e.fulfilled, e.rejected) }) } catch (e) { g.error(`Failed to register interceptors: ${e}.`) } var i = [N, void 0], s = [E, void 0]; if (S) { for (g.debug("Interceptors are executed in synchronous mode"), Array.prototype.unshift.apply(v, i), v = v.concat([N, void 0]); v.length;) { var a = v.shift(), l = v.shift(); try { "function" == typeof a && g.debug("Executing request fulfilled " + a.name), n = a(n) } catch (e) { "function" == typeof l && g.debug("Executing request rejected " + l.name), l(e); break } } try { o = (!d.isNode && n.timeout ? c : r)(n) } catch (e) { return Promise.reject(e) } for (Array.prototype.unshift.apply(b, s); b.length;)o = o.then(b.shift(), b.shift()); return o } { g.debug("Interceptors are executed in asynchronous mode"); let t = [r, void 0]; for (Array.prototype.unshift.apply(t, i), Array.prototype.unshift.apply(t, v), t = (t = t.concat(s)).concat(b), o = Promise.resolve(n); t.length;)try { let e = t.shift(); var u = t.shift(); "function" == typeof (e = !d.isNode && n.timeout && e === r ? c : e) && g.debug("Executing request fulfilled " + e.name), "function" == typeof u && g.debug("Executing request rejected " + u.name), o = o.then(e, u) } catch (e) { g.error("request exception: " + e) } return o } function c(n) { try { var e = new Promise((e, t) => { setTimeout(() => { var e = { message: `timeout of ${n.timeout}ms exceeded.`, config: n }; t(e) }, n.timeout) }); return Promise.race([r(n), e]) } catch (e) { g.error(`Request Timeout exception: ${e}.`) } } }; return { request: n, interceptors: m, convertHeadersToLowerCase: n => Object.keys(n).reduce((e, t) => (e[t.toLowerCase()] = n[t], e), {}), convertHeadersToCamelCase: n => Object.keys(n).reduce((e, t) => { return e[t.split("-").map(e => e[0].toUpperCase() + e.slice(1)).join("-")] = n[t], e }, {}), modifyResponse: y, get: e => n("GET", e), post: e => n("POST", e), put: e => n("PUT", e), patch: e => n("PATCH", e), delete: e => n("DELETE", e), head: e => n("HEAD", e), options: e => n("OPTIONS", e) } } function MagicData(d, g) { let p = { fs: void 0, data: {} }; if (d.isNode) { p.fs = require("fs"); try { p.fs.accessSync("./magic.json", p.fs.constants.R_OK | p.fs.constants.W_OK) } catch (e) { p.fs.writeFileSync("./magic.json", "{}", { encoding: "utf8" }) } p.data = require("./magic.json") } const s = (e, t) => "object" != typeof t && e === t, a = e => "true" === e || "false" !== e && (void 0 === e ? null : e), l = (e, t, n, r) => { if (n) try { e = !0 === (e = "string" == typeof e ? JSON.parse(e) : e).magic_session ? e[n] : null } catch { e = null } if ("string" == typeof e && "null" !== e) try { e = JSON.parse(e) } catch { } return null == (e = !1 === r && e && !0 === e.magic_session ? null : e) && null != t && (e = t), e = a(e) }, f = t => { if ("string" != typeof t) return t instanceof Array || null == t || t != t || "boolean" == typeof t ? {} : t; { let e = {}; try { var n = typeof (e = JSON.parse(t)); ("object" != n || e instanceof Array || "bool" == n || null === e) && (e = {}) } catch { } return e } }, u = (e, t = null, n = "", r = !1, o = null) => { let i = ""; return i = o || d.isNode ? ((e, t = null, n = "", r = !1, o = null) => { o = o || p.data; return val = o && void 0 !== o[e] && null !== o[e] ? o[e] : n ? {} : null, val = l(val, t, n, r) })(e, t, n, r, o) : (d.isSurgeLike ? i = $persistentStore.read(e) : d.isQuanX && (i = $prefs.valueForKey(e)), l(i, t, n, r)), g.debug(`READ DATA [${e}]${n ? `[${n}]` : ""} <${typeof i}>` + "\n" + JSON.stringify(i)), i }, c = (e, t, n = "", r = null) => { if (void 0 === t || t != t) return !1; d.isNode || "boolean" != typeof t && "number" != typeof t || (t = String(t)); let o = ""; var i, s, a, l, u, c; if (r || d.isNode ? o = ([i, s, a = "", l = null] = [e, t, n, r], c = l || p.data, c = f(c), a ? ((u = f(c[i])).magic_session = !0, u[a] = s, c[i] = u) : c[i] = s, null !== l && (l = c), c) : n ? (d.isSurgeLike ? o = $persistentStore.read(e) ? $persistentStore.read(e) : o : d.isQuanX && (o = $prefs.valueForKey(e) ? $prefs.valueForKey(e) : o), (o = f(o)).magic_session = !0, o[n] = t) : o = t, o && "object" == typeof o && (o = JSON.stringify(o, null, 4)), g.debug(`WRITE DATA [${e}]${n ? `[${n}]` : ""} <${typeof t}>` + "\n" + JSON.stringify(t)), !r) { if (d.isSurgeLike) return $persistentStore.write(o, e); if (d.isQuanX) return $prefs.setValueForKey(o, e); if (d.isNode) try { p.fs.writeFileSync("./magic.json", o) } catch (e) { return g.error(e), !1 } } return !0 }; return { read: u, write: c, del: (e, t = "", n = null) => { let r = {}; if (n || d.isNode) r = (o = e, i = t, s = n || p.data, s = f(s), i ? (delete (obj = f(s[o]))[i], s[o] = obj) : delete s[o], s), n ? n = r : p.fs.writeFileSync("./magic.json", JSON.stringify(r, null, 4)); else if (t) { d.isSurgeLike ? r = $persistentStore.read(e) : d.isQuanX && (r = $prefs.valueForKey(e)), delete (r = f(r))[t]; i = JSON.stringify(r, null, 4); c(e, i) } else { if (d.isStorm) return $persistentStore.remove(e); if (d.isSurgeLike) return $persistentStore.write(null, e); if (d.isQuanX) return $prefs.removeValueForKey(e) } var o, i, s; g.debug(`DELETE KEY [${e}]` + (t ? `[${t}]` : "")) }, update: (e, t, n, r = s, o = null) => { var i; return t = a(t), !0 !== r(u(e, null, n, !1, o), t) && (i = c(e, t, n, o), e = u(e, null, n, !1, o), r === s && "object" == typeof e ? i : r(t, e)) }, allSessions: (e, t = null) => { let n = {}; t = u(e, null, null, !0, t); return !0 === (t = f(t)).magic_session && delete (n = { ...t }).magic_session, g.debug(`READ ALL SESSIONS [${e}] <${typeof n}>` + "\n" + JSON.stringify(n, null, 4)), n }, allSessionNames: (e, t = null) => { let n = []; t = u(e, null, null, !0, t), t = f(t); return n = !0 !== t.magic_session ? [] : Object.keys(t).filter(e => "magic_session" !== e), g.debug(`READ ALL SESSIONS [${e}] <${typeof n}>` + "\n" + JSON.stringify(n, null, 4)), n }, defaultValueComparator: s, convertToObject: f } } function MagicNotification(i, o, s, a) { let l = null, u = null, c = []; function d(e = i, t = "", n = "", r = "") { r = (t => { try { let e = {}; var n; return "string" == typeof t ? 0 < t.length && (o.isLoon ? e = { openUrl: t } : o.isQuanX ? e = { "open-url": t } : o.isSurge && (e = { url: t })) : "object" == typeof t && (o.isLoon ? (e.openUrl = t["open-url"] || "", e.mediaUrl = t["media-url"] || "") : o.isQuanX ? e = t["open-url"] || t["media-url"] ? t : {} : o.isSurge && (n = t["open-url"] || t.openUrl, e = n ? { url: n } : {})), e } catch (e) { s.error("通知选项转换失败" + e) } return t })(r), 1 === arguments.length && (e = i, t = "", n = arguments[0]), s.notify("\ntitle:" + e + "\nsubTitle:" + t + "\nbody:" + n + "\noptions:" + ("object" == typeof r ? JSON.stringify(r) : r)), o.isSurge ? $notification.post(e, t, n, r) : o.isLoon ? r ? $notification.post(e, t, n, r) : $notification.post(e, t, n) : o.isQuanX && $notify(e, t, n, r), l && u && g(e, t, n) } function g(e = i, t = "", n = "", r) { if (void 0 === a || void 0 === a.post) throw "Bark notification needs to import MagicHttp module."; e = { url: l, headers: { "content-type": "application/json; charset=utf-8" }, body: { title: e, body: t ? t + "\n" + n : n, device_key: u } }; a.post(e).catch(e => { s.error("Bark notify error: " + e) }) } return { post: d, debug: function (e = i, t = "", n = "", r = "") { "DEBUG" === s.getLevel() && (1 === arguments.length && (e = i, t = "", n = arguments[0]), this.post(e, t, n, r)) }, bark: g, setBark: e => { try { var t = e.replace(/\/+$/g, ""); l = /^https?:\/\/([^/]*)/.exec(t)[0] + "/push", u = /\/([^\/]+)\/?$/.exec(t)[1] } catch (e) { s.error(`Bark url error: ${e}.`) } }, appendNotifyInfo: function (e, t) { 1 == t ? c = e : c.push(e) }, prependNotifyInfo: function (e) { c.splice(0, 0, e) }, msg: function (e, t, n, r) { var o = {}; n && (o["open-url"] = n), r && (o["media-url"] = r), (t = t && 0 != t.length ? t : Array.isArray(c) ? c.join("\n") : c) && 0 < t.length && d(i, "", t, o) } } } function MagicUtils(r, u) { const e = (e, t = "yyyy-MM-dd hh:mm:ss") => { var n, r = { "M+": e.getMonth() + 1, "d+": e.getDate(), "h+": e.getHours(), "m+": e.getMinutes(), "s+": e.getSeconds(), "q+": Math.floor((e.getMonth() + 3) / 3), S: e.getMilliseconds() }; for (n in /(y+)/.test(t) && (t = t.replace(RegExp.$1, (e.getFullYear() + "").substr(4 - RegExp.$1.length))), r) new RegExp("(" + n + ")").test(t) && (t = t.replace(RegExp.$1, 1 === RegExp.$1.length ? r[n] : ("00" + r[n]).substr(("" + r[n]).length))); return t }; return { retry: (i, s = 5, a = 0, l = null) => (...e) => new Promise((n, r) => { function o(...t) { Promise.resolve().then(() => i.apply(this, t)).then(e => { "function" == typeof l ? Promise.resolve().then(() => l(e)).then(() => { n(e) }).catch(e => { 1 <= s ? 0 < a ? setTimeout(() => o.apply(this, t), a) : o.apply(this, t) : r(e), s-- }) : n(e) }).catch(e => { u.error(e), 1 <= s && 0 < a ? setTimeout(() => o.apply(this, t), a) : 1 <= s ? o.apply(this, t) : r(e), s-- }) } o.apply(this, e) }), formatTime: e, now: () => e(new Date, "yyyy-MM-dd hh:mm:ss"), today: () => e(new Date, "yyyy-MM-dd"), sleep: t => new Promise(e => setTimeout(e, t)), assert: (e, t = null) => { var n; r.isNode ? (n = require("assert"), t ? n(e, t) : n(e)) : !0 !== e && u.error("AssertionError: " + (t || "The expression evaluated to a falsy value.")) } } } function MagicQingLong(e, a, o) { let i = "", s = "", l = "", u = "", c = "", t = ""; const d = "magic.json", g = MagicHttp(e, o); async function n() { return l = l || a.read("magic_qlclient"), u = u || a.read("magic_qlsecrt"), s = s || a.read("magic_qlname"), c = c || a.read("magic_qlpwd"), i && l && u ? (o.info("Get token from QingLong Panel"), await g.get({ url: "/open/auth/token", headers: { "content-type": "application/json" }, params: { client_id: l, client_secret: u } }).then(e => { if (!(0 < Object.keys(e.body).length && e.body.data && e.body.data.token)) throw new Error("Get QingLong Panel token failed."); o.info("Successfully logged in to QingLong Panel"), t = e.body.data.token, a.write("magic_qltoken", t) }).catch(e => { o.error("Error logging in to QingLong Panel.\n" + (e.message || e)) })) : i && s && c && await g.post({ url: "/api/user/login", headers: { "content-type": "application/json" }, body: { username: s, password: c } }).then(e => { o.info("Successfully logged in to QingLong Panel"), t = e.body.data.token, a.write("magic_qltoken", t) }).catch(e => { o.error("Error logging in to QingLong Panel.\n" + (e.message || e)) }), t } async function p(e) { let t = []; return await g.post({ url: "/api/envs", headers: { "content-type": "application/json" }, body: e }).then(e => { 200 === e.body.code ? e.body.data.forEach(e => { o.debug(`QINGLONG ADD ENV ${e.name} <${typeof e.value}> (${e.id})` + "\n" + JSON.stringify(e)), t.push(e.id) }) : o.error("Error adding environments variable from QingLong Panel.\n" + JSON.stringify(e)) }).catch(e => { o.error("Error adding environments variable from QingLong Panel.\n" + (e.message || e)) }), t } async function r(r = null, e = "", t) { let o = []; return await g.get({ url: "/api/envs", headers: { "content-type": "application/json" }, params: { searchValue: e } }).then(e => { if (200 !== e.body.code) throw new Error("Error reading environment variable from QingLong Panel.\n" + JSON.stringify(e)); e = e.body.data; if (r) { var t = []; for (const n of e) n.name === r && o.push(n); o = t } o = e }).catch(e => { throw new Error("Error reading environments variable from QingLong Panel.\n" + (e.message || e)) }), o } async function f(e, t = "") { let n = ""; return await g.get({ url: "/api/scripts/" + e, params: { path: t } }).then(e => { if (200 !== e.body.code) throw new Error("Error reading data from QingLong Panel.\n" + JSON.stringify(e)); n = e.body.data }).catch(e => { throw new Error("Error reading data from QingLong Panel.\n" + (e.message || e)) }), n } async function y(e, t = "", n = "") { let r = !1; return await g.put({ url: "/api/scripts", headers: { "content-type": "application/json" }, body: { filename: e, path: t, content: n } }).then(e => { 200 === e.body.code ? r = !0 : o.error("Error reading data from QingLong Panel.\n" + JSON.stringify(e)) }).catch(e => { o.error("Error reading data from QingLong Panel.\n" + (e.message || e)) }), r } return g.interceptors.request.use(function (e) { return i = i || a.read("magic_qlurl"), e.url.indexOf(i) < 0 && (e.url = "" + i + e.url), { ...e, timeout: 3e3 } }, void 0), g.interceptors.request.use(function (e) { return (l = l || a.read("magic_qlclient")) && (e.url = e.url.replace("/api/", "/open/")), e }, void 0, { runWhen: e => e.url.indexOf("api/user/login") < 0 && e.url.indexOf("open/auth/token") < 0 }), g.interceptors.request.use(async function (e) { return (t = t || a.read("magic_qltoken", "")) || await n(), e.headers.authorization = "Bearer " + t, e }, void 0, { runWhen: e => e.url.indexOf("api/user/login") < 0 && e.url.indexOf("open/auth/token") < 0 }), g.interceptors.request.use(function (e) { return e.params = { ...e.params, t: Date.now() }, e }, void 0, { runWhen: e => e.url.indexOf("open/auth/token") < 0 }), g.interceptors.request.use(function (e) { return i = i || a.read("magic_qlurl"), t = t || a.read("magic_qltoken"), o.debug("QingLong url: " + i + "\nQingLong token: " + t), e }, void 0), g.interceptors.response.use(void 0, async function (e) { try { var t = e.message || e.error || JSON.stringify(e); return (0 <= t.indexOf("NSURLErrorDomain") && 0 <= t.indexOf("-1012") || e.response && 401 === e.response.status) && e.config && !0 !== e.config.refreshToken ? (o.warning("QingLong Panel token has expired"), o.info("Refreshing the QingLong Panel token"), await n(), e.config.refreshToken = !0, o.info("Call the previous method again"), await g.request(e.config.method, e.config)) : Promise.reject(e) } catch (e) { return Promise.reject(e) } }), { url: i || a.read("magic_qlurl"), init: (e, t, n, r, o) => { i = e, l = t, u = n, s = r, c = o }, getToken: n, setEnv: async function (t, n, r = null) { if (i = i || a.read("magic_qlurl"), null === r) { var e = await p([{ name: t, value: n }]); if (e && 1 === e.length) return e[0] } else await g.put({ url: "/api/envs", headers: { "content-type": "application/json" }, body: { name: t, value: n, id: r } }).then(e => { if (200 === e.body.code) return o.debug(`QINGLONG UPDATE ENV ${t} <${typeof n}> (${r})` + "\n" + JSON.stringify(n)), !0; o.error("Error adding environment variable from QingLong Panel.\n" + JSON.stringify(e)) }).catch(e => (o.error("Error adding environment variable from QingLong Panel.\n" + (e.message || e)), !1)) }, setEnvs: p, getEnv: async function (e) { let t = null; for (const n of await r()) if (n.id === e) { t = n; break } return t }, getEnvs: r, delEnvs: async function (t) { return g.delete({ url: "/api/envs", headers: { accept: "application/json", "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", connection: "keep-alive", "content-type": "application/json;charset=UTF-8", "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36 Edg/102.0.1245.30" }, body: t }).then(e => 200 === e.body.code ? (o.debug("QINGLONG DELETE ENV IDS: " + t), !0) : (o.error("Error deleting environments variable from QingLong Panel.\n" + JSON.stringify(e)), !1)).catch(e => { o.error("Error deleting environments variable from QingLong Panel.\n" + (e.message || e)) }) }, disableEnvs: async function (t) { let n = !1; return await g.put({ url: "/api/envs/disable", headers: { accept: "application/json", "accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", connection: "keep-alive", "content-type": "application/json;charset=UTF-8", "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36 Edg/102.0.1245.30" }, body: t }).then(e => { 200 === e.body.code ? (o.debug("QINGLONG DISABLED ENV IDS: " + t), n = !0) : o.error("Error disabling environments variable from QingLong Panel.\n" + JSON.stringify(e)) }).catch(e => { o.error("Error disabling environments variable from QingLong Panel.\n" + (e.message || e)) }), n }, enableEnvs: async function (t) { let n = !1; return await g.put({ url: "/api/envs/enable", headers: { accept: "application/json", "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", connection: "keep-alive", "content-type": "application/json;charset=UTF-8", "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36 Edg/102.0.1245.30" }, body: t }).then(e => { 200 === e.body.code ? (o.debug("QINGLONG ENABLED ENV IDS: " + t), n = !0) : o.error("Error enabling environments variable from Qilong panel.\n" + JSON.stringify(e)) }).catch(e => { o.error("Error enabling environments variable from Qilong panel.\n" + (e.message || e)) }), n }, addScript: async function (e, t = "", n = "") { let r = !1; return await g.post({ url: "/api/scripts", headers: { "content-type": "application/json" }, body: { filename: e, path: t, content: n } }).then(e => { 200 === e.body.code ? r = !0 : o.error("Error reading data from QingLong Panel.\n" + JSON.stringify(e)) }).catch(e => { o.error("Error reading data from QingLong Panel.\n" + (e.message || e)) }), r }, getScript: f, editScript: y, delScript: async function (e, t = "") { let n = !1; return await g.delete({ url: "/api/scripts", headers: { "content-type": "application/json" }, body: { filename: e, path: t } }).then(e => { 200 === e.body.code ? n = !0 : o.error("Error reading data from QingLong Panel.\n" + JSON.stringify(e)) }).catch(e => { o.error("Error reading data from QingLong Panel.\n" + (e.message || e)) }), n }, write: async function (e, t, n = "") { var r = await f(d, ""), o = a.convertToObject(r), e = a.write(e, t, n, o), r = JSON.stringify(o, null, 4); return await y(d, "", r) && e }, read: async function (e, t, n = "", r = !1) { var o = await f(d, ""), o = a.convertToObject(o); return a.read(e, t, n, r, o) }, del: async function (e, t = "") { var n = await f(d, ""), r = a.convertToObject(n), e = a.del(e, t, r), n = JSON.stringify(r, null, 4), t = await y(d, "", n); return e && t }, update: async function (e, t, n, r = a.defaultValueComparator) { var o = await f(d, ""), i = a.convertToObject(o), e = a.update(e, t, n, r, i); let s = !1; return !0 === e && (o = JSON.stringify(i, null, 4), s = await y(d, "", o)), e && s }, batchWrite: async function (...e) { var t, n = await f(d, ""), r = a.convertToObject(n); for (t of e) a.write(t[0], t[1], void 0 !== t[2] ? t[2] : "", r); return n = JSON.stringify(r, null, 4), y(d, "", n) }, batchRead: async function (...e) { var t, n = await f(d, ""), r = a.convertToObject(n), o = []; for (t of e) { var i = a.read(t[0], t[1], void 0 !== t[2] ? t[2] : "", "boolean" == typeof t[3] && t[3], r); o.push(i) } return o }, batchUpdate: async function (...e) { var t, n = await f(d, ""), r = a.convertToObject(n); for (t of e) a.update(t[0], t[1], void 0 !== t[2] ? t[2] : "", void 0 !== t[3] ? t.comparator : a.defaultValueComparator, r); return n = JSON.stringify(r, null, 4), y(d, "", n) }, batchDel: async function (...e) { var t, n = await f(d, ""), r = a.convertToObject(n); for (t of e) a.del(t[0], void 0 !== t[1] ? t[1] : "", r); return n = JSON.stringify(r, null, 4), y(d, "", n) }, allSessions: async function (e) { var t = await f(d, ""), t = a.convertToObject(t); return a.allSessions(e, t) }, allSessionNames: async function (e) { var t = await f(d, ""), t = a.convertToObject(t); return a.allSessionNames(e, t) } } }
  205. //---SyncByPyScript---MagicJS3-end
  206. //---SyncByPyScript---w_md5-start
  207. function hex_md5(r, n) { function a(r, n) { return r << n | r >>> 32 - n } function i(r, n) { var t = 2147483648 & r, e = 2147483648 & n, o = 1073741824 & r, u = 1073741824 & n, r = (1073741823 & r) + (1073741823 & n); return o & u ? 2147483648 ^ r ^ t ^ e : o | u ? 1073741824 & r ? 3221225472 ^ r ^ t ^ e : 1073741824 ^ r ^ t ^ e : r ^ t ^ e } function t(r, n, t, e, o, u, f) { return r = i(r, i(i(n & t | ~n & e, o), f)), i(a(r, u), n) } function e(r, n, t, e, o, u, f) { return r = i(r, i(i(n & e | t & ~e, o), f)), i(a(r, u), n) } function o(r, n, t, e, o, u, f) { return r = i(r, i(i(n ^ t ^ e, o), f)), i(a(r, u), n) } function u(r, n, t, e, o, u, f) { return r = i(r, i(i(t ^ (n | ~e), o), f)), i(a(r, u), n) } function f(r) { for (var n = "", t = "", e = 0; e <= 3; e++)n += (t = "0" + (r >>> 8 * e & 255).toString(16)).substr(t.length - 2, 2); return n } Array(); for (var h, c, d, C, m = function (r) { for (var n, t = r.length, e = 16 * (1 + ((e = t + 8) - e % 64) / 64), o = Array(e - 1), u = 0, f = 0; f < t;)u = f % 4 * 8, o[n = (f - f % 4) / 4] = o[n] | r.charCodeAt(f) << u, f++; return o[n = (f - f % 4) / 4] = o[n] | 128 << (u = f % 4 * 8), o[e - 2] = t << 3, o[e - 1] = t >>> 29, o }(r = function (r) { r = r.replace(/\r\n/g, "\n"); for (var n = "", t = 0; t < r.length; t++) { var e = r.charCodeAt(t); e < 128 ? n += String.fromCharCode(e) : n = 127 < e && e < 2048 ? (n += String.fromCharCode(e >> 6 | 192)) + String.fromCharCode(63 & e | 128) : (n = (n += String.fromCharCode(e >> 12 | 224)) + String.fromCharCode(e >> 6 & 63 | 128)) + String.fromCharCode(63 & e | 128) } return n }(r)), _ = 1732584193, g = 4023233417, p = 2562383102, x = 271733878, v = 0; v < m.length; v += 16)_ = t(h = _, c = g, d = p, C = x, m[v + 0], 7, 3614090360), x = t(x, _, g, p, m[v + 1], 12, 3905402710), p = t(p, x, _, g, m[v + 2], 17, 606105819), g = t(g, p, x, _, m[v + 3], 22, 3250441966), _ = t(_, g, p, x, m[v + 4], 7, 4118548399), x = t(x, _, g, p, m[v + 5], 12, 1200080426), p = t(p, x, _, g, m[v + 6], 17, 2821735955), g = t(g, p, x, _, m[v + 7], 22, 4249261313), _ = t(_, g, p, x, m[v + 8], 7, 1770035416), x = t(x, _, g, p, m[v + 9], 12, 2336552879), p = t(p, x, _, g, m[v + 10], 17, 4294925233), g = t(g, p, x, _, m[v + 11], 22, 2304563134), _ = t(_, g, p, x, m[v + 12], 7, 1804603682), x = t(x, _, g, p, m[v + 13], 12, 4254626195), p = t(p, x, _, g, m[v + 14], 17, 2792965006), _ = e(_, g = t(g, p, x, _, m[v + 15], 22, 1236535329), p, x, m[v + 1], 5, 4129170786), x = e(x, _, g, p, m[v + 6], 9, 3225465664), p = e(p, x, _, g, m[v + 11], 14, 643717713), g = e(g, p, x, _, m[v + 0], 20, 3921069994), _ = e(_, g, p, x, m[v + 5], 5, 3593408605), x = e(x, _, g, p, m[v + 10], 9, 38016083), p = e(p, x, _, g, m[v + 15], 14, 3634488961), g = e(g, p, x, _, m[v + 4], 20, 3889429448), _ = e(_, g, p, x, m[v + 9], 5, 568446438), x = e(x, _, g, p, m[v + 14], 9, 3275163606), p = e(p, x, _, g, m[v + 3], 14, 4107603335), g = e(g, p, x, _, m[v + 8], 20, 1163531501), _ = e(_, g, p, x, m[v + 13], 5, 2850285829), x = e(x, _, g, p, m[v + 2], 9, 4243563512), p = e(p, x, _, g, m[v + 7], 14, 1735328473), _ = o(_, g = e(g, p, x, _, m[v + 12], 20, 2368359562), p, x, m[v + 5], 4, 4294588738), x = o(x, _, g, p, m[v + 8], 11, 2272392833), p = o(p, x, _, g, m[v + 11], 16, 1839030562), g = o(g, p, x, _, m[v + 14], 23, 4259657740), _ = o(_, g, p, x, m[v + 1], 4, 2763975236), x = o(x, _, g, p, m[v + 4], 11, 1272893353), p = o(p, x, _, g, m[v + 7], 16, 4139469664), g = o(g, p, x, _, m[v + 10], 23, 3200236656), _ = o(_, g, p, x, m[v + 13], 4, 681279174), x = o(x, _, g, p, m[v + 0], 11, 3936430074), p = o(p, x, _, g, m[v + 3], 16, 3572445317), g = o(g, p, x, _, m[v + 6], 23, 76029189), _ = o(_, g, p, x, m[v + 9], 4, 3654602809), x = o(x, _, g, p, m[v + 12], 11, 3873151461), p = o(p, x, _, g, m[v + 15], 16, 530742520), _ = u(_, g = o(g, p, x, _, m[v + 2], 23, 3299628645), p, x, m[v + 0], 6, 4096336452), x = u(x, _, g, p, m[v + 7], 10, 1126891415), p = u(p, x, _, g, m[v + 14], 15, 2878612391), g = u(g, p, x, _, m[v + 5], 21, 4237533241), _ = u(_, g, p, x, m[v + 12], 6, 1700485571), x = u(x, _, g, p, m[v + 3], 10, 2399980690), p = u(p, x, _, g, m[v + 10], 15, 4293915773), g = u(g, p, x, _, m[v + 1], 21, 2240044497), _ = u(_, g, p, x, m[v + 8], 6, 1873313359), x = u(x, _, g, p, m[v + 15], 10, 4264355552), p = u(p, x, _, g, m[v + 6], 15, 2734768916), g = u(g, p, x, _, m[v + 13], 21, 1309151649), _ = u(_, g, p, x, m[v + 4], 6, 4149444226), x = u(x, _, g, p, m[v + 11], 10, 3174756917), p = u(p, x, _, g, m[v + 2], 15, 718787259), g = u(g, p, x, _, m[v + 9], 21, 3951481745), _ = i(_, h), g = i(g, c), p = i(p, d), x = i(x, C); return (32 == n ? f(_) + f(g) + f(p) + f(x) : f(g) + f(p)).toLowerCase() } function createWMd5() { var r = { hex_md5_16: function (r) { return hex_md5(r, 16) }, hex_md5_16Upper: function (r) { return hex_md5(r, 16).toUpperCase() }, hex_md5_32: function (r) { return hex_md5(r, 32) }, hex_md5_32Upper: function (r) { return hex_md5(r, 32).toUpperCase() } }; return r }
  208. //---SyncByPyScript---w_md5-end