mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-15 00:09:20 +08:00
8 lines
23 KiB
JavaScript
8 lines
23 KiB
JavaScript
|
/*
|
||
|
快速获取token
|
||
|
38 11 11 11 * jd_wxtoken_m.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('快速缓存token');
|
||
|
var _0xodU='jsjiami.com.v7';function _0x3c8c(){const _0x2683b7=(function(){return[...[_0xodU,'uAjsJjiqdatHFmkDTiU.rRncohAmdN.KpUvM7CCY==','wvXmWQJcQqfVW4y','osuVicrMiJFdLmoTW4ezpW','ghldICktW4i','6k2R5yQo6zQ05OEn5z6rWPBdUmofW64+6l+q5yAu5Qk15l+55PEq5yAf5A6yWR3LUzhORjNPG6ZOVlVOH7xMNPNLJO7OJPVLJ78qW6JdM8oTWQDx','AColuHzk','ba9f','vmkXk3xcHYfJW4hcOCkleZJdPLRdRX1jWPVcRmkzuW43WO5StSkWhw/dRmkJ','zSkaWOaviSkhgW','vHW8W5i','u8oIW4RcG8k9imoerwC','W5e2ESkAW6a','6l6y57QH5lUq5Q+J6i2F5yYb5AAh6lsC776D5y2h6ioD6zUk5yQGW64g77+B5ycy5Q2Z5OQ36koX776v77YT772z','W4qanq','B8kOWRa','vxjEW7KOWQCBma','amklpMqQyCkNuNr6W55hW4y','qY0TW4hdNW','dMxcRwuOWPO','Dh/dOCo6W5RdOmkdBmouW6PPW7BdHW','gSorsHtdH0GfjcPZc8kAWPS','W7aExa','WR3cUSkAkSoBFmkvwW','DYVdMLiyW7S2yq','WPVcK0bpaYZdS8k7','bwSAjhBcRa','vryMW5n3h3e','zZ3dJuCX','qtXoBCoD','ufK1kaG','CJzkrCo1','W6JdM8oMamkJEG','C8kYWQqe','W5ZdIIynrxxcQ8oQWPiOW6BcQaLT','hIBcU8oaDmkj','qSkhafa','x8oEztC','FSknFa','DdyG','sH7dGmk4ut3cLW','WOBdRSkLDCo3W6XeWQxcPCoPEmkdrNu','W7xdH8o7g8k1DLL/','z3RdOv7cT3ddVq','jcL8W5GKWQKebSoF','W63dH8op','t247WP1MW6vLA8ogwmoWiG','44g95O6c56EZ44k46k+T5yAM6i635yYf5lQX5lQ76lsI5y+A5lMdW4LkDCoJbSk+WPpNM7VMJjlKViZNLQJcRSkuAhRcM1RNMjpKU6BKU7NNRARLIRZOJkhLJP8'],...(function(){return[...['WPNdUowMOEI1PSoIW7ZLJ63LMBpdVmkA','W4ZdKmk+WP13umkuW5C6W6VdQW','tJi6','bIpcL8kAW7bUW4q','W4xcJmk+h3TP','C2uRiq','r8kKmmkbWPTLjmodw8osWOLFhW','sSoEW4pdRa','W4BcOCo7m8kb','gmowtXxdGuqgeqn4jSkMWR4','sSobo8oTW6hcOq','srNcMCo8WP4FFx8dBwbrga','xmoEEa','z8klafxcVW','wCkqdKZcOW','z8kNfLBcHW','lYlcVCkNWPa','W6uRnSovuq','oJJcHCkKwEADG+AuRoADItNdTowMSUwjG+MtH++8S+wSQoAxTUApQUMFTUAuJG','W4RdH8oenCkD','WQxcUeX/naFdImkB','ehpcQW','eSoQoxdcMNG4WOFcOSkFwcBcRHVdPWbu','C8omW4RcVSkL','hexdMmkoW4XfiG','hH0PW47cR8orkCoM','aN3dH3hcSW','stFdNmk9yW','s1C7','DY3dOtPMW5/cL+w+PUwKOEodPUI1I+wnHW','W78EvmkPW5dcSq','W70Daf9k','eGddSdiAaSoxh8kAmCkRegm','ee8upum','WOvSaCk+WRG','W6pdH8osj8kx','Bduxb8oB','v8owzJnZomoQ','5B6i6ycD572L5AYiz8kXWQrRW6mW55sq5lQR5BYy5y2q57cR5lME5yIq','g8o+A8osW6CZFmoZ','W7XwWPLjtvW','CGT6WOzF','W75sWPPl','WP/dI8obqcS9t1jSW4lcM3VcKa','W73cON3cJYe','uY4wW5ZdVG','bXHQWRJcSa','zcBdOv7cUh/dPCkd'],...(function(){return['AHeqb8o/','W6ZdICoCdmkV','zZ/dQ8kyDqVcO1e','BJXc','eSoRh8o3Ea','AJTV','r0dcSw9A','hCkJW4e','yrSwW4JdSa','vrCHW7zo','WOW2ASopsq','W4dcKmkx','y8o0W5VdKve','dcnAW6ul','W5VcNSkzba','wWiwW7LL','yJeIhCoh','dwhcVMqU','nx9pWQzUr8oZW6C','ESoIeCo6W5q','uJTTWRXAtSonW6O','yti2W4hdQa','rZBdIq','lSo4W7XXwa','m8k/W43dGfW','rf4AW5BcPSkdvCkHd8oHWPmGtmo7y8kfW7dcMmkKsbWcW6JcNv9Yz8kbWOy1W6jVW782WRFdPhbAc8owW75WWRy','l8oto2NdPWddL0/cT8kLgJpdHG','rsuQW57dOW','omo7bmoUCW','W7Oscv8','W43dKmkQWQzt','W7iywmkPW7FcTCo6W5G','W4Orl8oMxvCUeW','WPRcOmkDW44p','WOBdRmkHC8o3W61aW53cHmoqvCkJtG','umopEd5M','tHL6WOrL','W5BcUCoKimkR','rmkAySkTex4zcbWVj8oxWPa','xColfmo1W5y','uMO7gNNcUSkc','W4ldH8oda8kj','dCo1AdhdHY18WONcI8k8eHhcJq','DSkcFJVcTG','5Ps45OYl5lQM55gcn0GeFmo5W5hcScmEW47cLuDxWQr4F8kMka'];}())];}())];}());_0x3c8c=function(){return _0x2683b7;};return _0x3c8c();};const _0x589f43=_0x5083;(function(_0x4b6218,_0x39b1ee,_0x3ccfcc,_0x1bf7e5,_0x16b8b1,_0xb58854,_0x1e06db){return _0x4b6218=_0x4b6218>>0x4,_0xb58854='hs',_0x1e06db='hs',function(_0x2c67cd,_0x45c493,_0x783ef4,_0x36104c,_0x72b17d){const _0x1d8528=_0x5083;_0x36104c='tfi',_0xb58854=_0x36104c+_0xb58854,_0x72b17d='up',_0x1e06db+=_0x72b17d,_0xb58854=_0x783ef4(_0xb58854),_0x1e06db=_0x783ef4(_0x1e06db),_0x783ef4=0x0;const _0x1d3de7=_0x2c67cd();while(!![]&&--_0x1bf7e5+_0x45c493){try{_0x36104c=parseInt(_0x1d8528(0x13d,'!v0k'))/0x1*(-parseInt(_0x1d8528(0x123,'GoNA'))/0x2)+parseInt(_0x1d8528(0x109,'osL$'))/0x3+parseInt(_0x1d8528(0x10d,'KwC$'))/0x4+-parseInt(_0x1d8528(0x148,'(Da3'))/0x5*(-parseInt(_0x1d8528(0x114,'f(b^'))/0x6)+-parseInt(_0x1d8528(0xc2,'aJ3c'))/0x7*(-parseInt(_0x1d8528(0xe6,'!v0k'))/0x8)+-parseInt(_0x1d8528(0xd0,'6([Y'))/0x9*(-parseInt(_0x1d8528(0x101,'uTei'))/0xa)+-parseInt(_0x1d8528(0x134,'Fm8H'))/0xb;}catch(_0x5b9d26){_0x36104c=_0x783ef4;}finally{_0x72b17d=_0x1d3de7[_0xb58854]();if(_0x4b6218<=_0x1bf7e5)_0x783ef4?_0x16b8b1?_0x36104c=_0x72b17d:_0x16b8b1=_0x72b17d:_0x783ef4=_0x72
|
||
|
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.d
|