mirror of https://github.com/6dylan6/jdpro.git
8 lines
46 KiB
JavaScript
8 lines
46 KiB
JavaScript
|
/*
|
||
|
18 19 * * 2,5 jd_ppdt_.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('超级品牌殿堂');
|
||
|
var version_='jsjiami.com.v7';const lillllI=illi1il;function illi1il(_0x1b2518,_0x44b468){const _0xf05422=lIIlI1lI();return illi1il=function(_0x2ea3c7,_0x51ba3c){_0x2ea3c7=_0x2ea3c7-0x1a8;let _0x1cfe41=_0xf05422[_0x2ea3c7];if(illi1il['wEtkCF']===undefined){var _0x2efccd=function(_0x553269){const _0x49d576='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3e74b3='',_0x415812='',_0x5927ac=_0x3e74b3+_0x2efccd;for(let _0x547dcb=0x0,_0x1a743e,_0x8801b8,_0x935f89=0x0;_0x8801b8=_0x553269['charAt'](_0x935f89++);~_0x8801b8&&(_0x1a743e=_0x547dcb%0x4?_0x1a743e*0x40+_0x8801b8:_0x8801b8,_0x547dcb++%0x4)?_0x3e74b3+=_0x5927ac['charCodeAt'](_0x935f89+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x1a743e>>(-0x2*_0x547dcb&0x6)):_0x547dcb:0x0){_0x8801b8=_0x49d576['indexOf'](_0x8801b8);}for(let _0x34084e=0x0,_0x1125ff=_0x3e74b3['length'];_0x34084e<_0x1125ff;_0x34084e++){_0x415812+='%'+('00'+_0x3e74b3['charCodeAt'](_0x34084e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x415812);};const _0x1ea48e=function(_0x5211bf,_0x1cb059){let _0x963f6b=[],_0x57eff5=0x0,_0x214802,_0xd51cd4='';_0x5211bf=_0x2efccd(_0x5211bf);let _0x220c69;for(_0x220c69=0x0;_0x220c69<0x100;_0x220c69++){_0x963f6b[_0x220c69]=_0x220c69;}for(_0x220c69=0x0;_0x220c69<0x100;_0x220c69++){_0x57eff5=(_0x57eff5+_0x963f6b[_0x220c69]+_0x1cb059['charCodeAt'](_0x220c69%_0x1cb059['length']))%0x100,_0x214802=_0x963f6b[_0x220c69],_0x963f6b[_0x220c69]=_0x963f6b[_0x57eff5],_0x963f6b[_0x57eff5]=_0x214802;}_0x220c69=0x0,_0x57eff5=0x0;for(let _0x2d0998=0x0;_0x2d0998<_0x5211bf['length'];_0x2d0998++){_0x220c69=(_0x220c69+0x1)%0x100,_0x57eff5=(_0x57eff5+_0x963f6b[_0x220c69])%0x100,_0x214802=_0x963f6b[_0x220c69],_0x963f6b[_0x220c69]=_0x963f6b[_0x57eff5],_0x963f6b[_0x57eff5]=_0x214802,_0xd51cd4+=String['fromCharCode'](_0x5211bf['charCodeAt'](_0x2d0998)^_0x963f6b[(_0x963f6b[_0x220c69]+_0x963f6b[_0x57eff5])%0x100]);}return _0xd51cd4;};illi1il['srRgnh']=_0x1ea48e,_0x1b2518=arguments,illi1il['wEtkCF']=!![];}const _0x52ad18=_0xf05422[0x0],_0x3503d9=_0x2ea3c7+_0x52ad18,_0x185245=_0x1b2518[_0x3503d9];if(!_0x185245){if(illi1il['ZdZcnK']===undefined){const _0x32397a=function(_0xa9bebf){this['jvuxsB']=_0xa9bebf,this['MkVuGX']=[0x1,0x0,0x0],this['cBElzC']=function(){return'newState';},this['mNJPsh']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['YtPOuO']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x32397a['prototype']['KvWjOh']=function(){const _0x224bca=new RegExp(this['mNJPsh']+this['YtPOuO']),_0x5cbe21=_0x224bca['test'](this['cBElzC']['toString']())?--this['MkVuGX'][0x1]:--this['MkVuGX'][0x0];return this['QWnMsc'](_0x5cbe21);},_0x32397a['prototype']['QWnMsc']=function(_0xd892e9){if(!Boolean(~_0xd892e9))return _0xd892e9;return this['ihWitm'](this['jvuxsB']);},_0x32397a['prototype']['ihWitm']=function(_0x291464){for(let _0x2e6a6f=0x0,_0x357694=this['MkVuGX']['length'];_0x2e6a6f<_0x357694;_0x2e6a6f++){this['MkVuGX']['push'](Math['round'](Math['random']())),_0x357694=this['MkVuGX']['length'];}return _0x291464(this['MkVuGX'][0x0]);},new _0x32397a(illi1il)['KvWjOh'](),illi1il['ZdZcnK']=!![];}_0x1cfe41=illi1il['srRgnh'](_0x1cfe41,_0x51ba3c),_0x1b2518[_0x3503d9]=_0x1cfe41;}else _0x1cfe41=_0x185245;return _0x1cfe41;},illi1il(_0x1b2518,_0x44b468);}function lIIlI1lI(){const ii1llI1i=(function(){return[...[version_,'PeHjVsYrqjiahwmOei.HcOoCHXmS.qKvFE7MqGQF==','WP/dL8k7ACki','EqGTgXy','WQlcRMW9W6e','bSo6bxLJmq','W7hcHa3dRCovWPVdOW','W6/cLmkfu8oU','WP3dMCowbmo7','jv3cKSkkWR0AW7zE','WOdcT1GhW7e','W6/dMZTLBcRcHSkO','n8kInG','kSo+WQq','WOBdSCkxxSkQW6tcI8orW4BdVmkJeYLzWPCcW4iDF0ZcP8oFW6/dJSo7n8ksWOWlWQv0lJRdVCkvqmktmJXHdmoaxKBcPNRcPSkrW7/dIvuvW5JdHSkBWR4xnmkRW71ozgj3WQtcSSkcW4NcPSkDa8ktib9WEaNdI2/dL8kbWQvFy8ocn8omWOLoWRzjnSkVjSoMCItcRmoFuCkPchibW7X1WPFcJSokW4/dMCkBeSo3it3cH8kCoSkktgpcNSomzSknW4GjuHD/xhlcKGXgW7tdJ8owW5uLWOJdIMP3WOm5WPjJDaBcRKBdSCo2W6RcS8kfcafVBeiIW6m','sSoFWPVcKwG','W4ZcJcb1aSkq','W5RdGmoVySo+W4WloMJdQ3tcNZC','WOFdTSkTqCk9WRS','W7ZdNZXQytFcLa','WR4iza','W6pcM8oDjYxdHG8PWQtcNZm+hmkCgazriSkrWORdVGRdRq','eHHhDCoU','WP7dOSobha','W6JdJJPNBItcNmk6WQq','u3pdRSou','uW1Xh3pcNmof','WO
|
||
|
// prettier-ignore
|
||
|
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
|