mirror of https://github.com/6dylan6/jdpro.git
5 lines
140 KiB
JavaScript
5 lines
140 KiB
JavaScript
|
|
||
|
|
||
|
const $ = new Env("大牌浏览店铺");
|
||
|
var _0xod4='jsjiami.com.v7';const _0x3a8953=_0x4d17;(function(_0x3aa079,_0x5205fb,_0x5ad15d,_0x2da518,_0x4aa980,_0x57fe04,_0x19a7b4){return _0x3aa079=_0x3aa079>>0x4,_0x57fe04='hs',_0x19a7b4='hs',function(_0x584519,_0x3a6048,_0x25373b,_0x43c95c,_0x319a38){const _0x24c703=_0x4d17;_0x43c95c='tfi',_0x57fe04=_0x43c95c+_0x57fe04,_0x319a38='up',_0x19a7b4+=_0x319a38,_0x57fe04=_0x25373b(_0x57fe04),_0x19a7b4=_0x25373b(_0x19a7b4),_0x25373b=0x0;const _0x47e0de=_0x584519();while(!![]&&--_0x2da518+_0x3a6048){try{_0x43c95c=-parseInt(_0x24c703(0x5fb,'[PB@'))/0x1+-parseInt(_0x24c703(0x5f9,'afS('))/0x2*(parseInt(_0x24c703(0x759,'4*vd'))/0x3)+parseInt(_0x24c703(0x746,'@W*w'))/0x4+parseInt(_0x24c703(0x12a,'#ucb'))/0x5*(-parseInt(_0x24c703(0x611,'(&Di'))/0x6)+-parseInt(_0x24c703(0x6f7,'B5C)'))/0x7*(-parseInt(_0x24c703(0x2c1,'W(fq'))/0x8)+-parseInt(_0x24c703(0x317,'1eFa'))/0x9*(parseInt(_0x24c703(0x2c5,'4#JH'))/0xa)+parseInt(_0x24c703(0x6fb,'Y%0x'))/0xb*(parseInt(_0x24c703(0x684,')u)r'))/0xc);}catch(_0x4152c7){_0x43c95c=_0x25373b;}finally{_0x319a38=_0x47e0de[_0x57fe04]();if(_0x3aa079<=_0x2da518)_0x25373b?_0x4aa980?_0x43c95c=_0x319a38:_0x4aa980=_0x319a38:_0x25373b=_0x319a38;else{if(_0x25373b==_0x4aa980['replace'](/[YeyCIVdKGStngxRMLEUh=]/g,'')){if(_0x43c95c===_0x3a6048){_0x47e0de['un'+_0x57fe04](_0x319a38);break;}_0x47e0de[_0x19a7b4](_0x319a38);}}}}}(_0x5ad15d,_0x5205fb,function(_0x527bba,_0x1ed8b5,_0x4c3d8e,_0x50f748,_0x405b0a,_0x18165e,_0x5d44c3){return _0x1ed8b5='\x73\x70\x6c\x69\x74',_0x527bba=arguments[0x0],_0x527bba=_0x527bba[_0x1ed8b5](''),_0x4c3d8e=`\x72\x65\x76\x65\x72\x73\x65`,_0x527bba=_0x527bba[_0x4c3d8e]('\x76'),_0x50f748=`\x6a\x6f\x69\x6e`,(0x173c6c,_0x527bba[_0x50f748](''));});}(0xbc0,0x8c7ee,_0x3ed6,0xbe),_0x3ed6)&&(_0xod4=0x30a0);function _0x4d17(_0x51e445,_0xa003d0){const _0x1a8d7b=_0x3ed6();return _0x4d17=function(_0x21aac1,_0xc155d){_0x21aac1=_0x21aac1-0x10a;let _0x3ed66c=_0x1a8d7b[_0x21aac1];if(_0x4d17['EYHCPx']===undefined){var _0x4d174d=function(_0x465297){const _0xabefdb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x587786='',_0x369488='',_0x143717=_0x587786+_0x4d174d;for(let _0xba26c1=0x0,_0x5e62a1,_0x114a62,_0x1d96b7=0x0;_0x114a62=_0x465297['charAt'](_0x1d96b7++);~_0x114a62&&(_0x5e62a1=_0xba26c1%0x4?_0x5e62a1*0x40+_0x114a62:_0x114a62,_0xba26c1++%0x4)?_0x587786+=_0x143717['charCodeAt'](_0x1d96b7+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x5e62a1>>(-0x2*_0xba26c1&0x6)):_0xba26c1:0x0){_0x114a62=_0xabefdb['indexOf'](_0x114a62);}for(let _0x1f9a0c=0x0,_0x5c60d6=_0x587786['length'];_0x1f9a0c<_0x5c60d6;_0x1f9a0c++){_0x369488+='%'+('00'+_0x587786['charCodeAt'](_0x1f9a0c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x369488);};const _0x2904c2=function(_0x34934a,_0x47d4e3){let _0x2146d9=[],_0x3457a4=0x0,_0x258e5e,_0x131d8e='';_0x34934a=_0x4d174d(_0x34934a);let _0x13582f;for(_0x13582f=0x0;_0x13582f<0x100;_0x13582f++){_0x2146d9[_0x13582f]=_0x13582f;}for(_0x13582f=0x0;_0x13582f<0x100;_0x13582f++){_0x3457a4=(_0x3457a4+_0x2146d9[_0x13582f]+_0x47d4e3['charCodeAt'](_0x13582f%_0x47d4e3['length']))%0x100,_0x258e5e=_0x2146d9[_0x13582f],_0x2146d9[_0x13582f]=_0x2146d9[_0x3457a4],_0x2146d9[_0x3457a4]=_0x258e5e;}_0x13582f=0x0,_0x3457a4=0x0;for(let _0xffa0b3=0x0;_0xffa0b3<_0x34934a['length'];_0xffa0b3++){_0x13582f=(_0x13582f+0x1)%0x100,_0x3457a4=(_0x3457a4+_0x2146d9[_0x13582f])%0x100,_0x258e5e=_0x2146d9[_0x13582f],_0x2146d9[_0x13582f]=_0x2146d9[_0x3457a4],_0x2146d9[_0x3457a4]=_0x258e5e,_0x131d8e+=String['fromCharCode'](_0x34934a['charCodeAt'](_0xffa0b3)^_0x2146d9[(_0x2146d9[_0x13582f]+_0x2146d9[_0x3457a4])%0x100]);}return _0x131d8e;};_0x4d17['yrbWae']=_0x2904c2,_0x51e445=arguments,_0x4d17['EYHCPx']=!![];}const _0x746451=_0x1a8d7b[0x0],_0x87c9dc=_0x21aac1+_0x746451,_0xdc5627=_0x51e445[_0x87c9dc];if(!_0xdc5627){if(_0x4d17['sigskx']===undefined){const _0xdf7a93=function(_0x506d14){this['IgjmjP']=_0x506d14,this['OiXLRK']=[0x1,0x0,0x0],this['LGLKKk']=function(){return'newState';},this['Pkssqi']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['VIzHvv']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0xdf7a93['pr
|
||
|
function Env(o, t) { 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((r, i) => { s.call(this, t, (t, e, s) => { t ? i(t) : r(e) }) }) } 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.logLevels = { debug: 0, info: 1, warn: 2, error: 3 }, this.logLevelPrefixs = { debug: "[DEBUG] ", info: "[INFO] ", warn: "[WARN] ", error: "[ERROR] " }, this.logLevel = "info", 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.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } getEnv() { return "undefined" != typeof $environment && $environment["surge-version"] ? "Surge" : "undefined" != typeof $environment && $environment["stash-version"] ? "Stash" : "undefined" != typeof module && module.exports ? "Node.js" : "undefined" != typeof $task ? "Quantumult X" : "undefined" != typeof $loon ? "Loon" : "undefined" != typeof $rocket ? "Shadowrocket" : void 0 } isNode() { return "Node.js" === this.getEnv() } isQuanX() { return "Quantumult X" === this.getEnv() } isSurge() { return "Surge" === this.getEnv() } isLoon() { return "Loon" === this.getEnv() } isShadowrocket() { return "Shadowrocket" === this.getEnv() } isStash() { return "Stash" === this.getEnv() } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null, ...s) { try { return JSON.stringify(t, ...s) } catch { return e } } getjson(t, e) { let s = e; if (this.getdata(t)) 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(r => { this.get({ url: t }, (t, e, s) => r(s)) }) } runScript(a, o) { return new Promise(r => { let t = this.getdata("@chavy_boxjs_userCfgs.httpapi"); t = t && t.replace(/\n/g, "").trim(); var e = (e = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +e : 20, [s, i] = (e = o && o.timeout ? o.timeout : e, t.split("@")); this.post({ url: `http://${i}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: e }, headers: { "X-Key": s, Accept: "*/*" }, timeout: e }, (t, e, s) => r(s)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), r = !s && this.fs.existsSync(e); if (!s && !r) return {}; r = s ? t : e; try { return JSON.parse(this.fs.readFileSync(r)) } catch (t) { return {} } } writedata() { var t, e, s, r, i; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), r = !(s = this.fs.existsSync(t)) && this.fs.existsSync(e), i = JSON.stringify(this.data), !s && r ? this.fs.writeFileSync(e, i) : this.fs.writeFileSync(t, i)) } lodash_get(t, e, s) { let r = t; for (const t of e.replace(/\[(\d+)\]/g, ".$1").split(".")) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, r, e) { return Object(t) === t && ((r = Array.isArray(r) ? r : r.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((t, e, s) => Object(t[e]) === t[e] ? t[e] : t[e] = Math.abs(r[s + 1]) >> 0 == +r[s + 1] ? [] : {}, t)[r[r.length - 1]] = e), t } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { var [, s, r] = /^@(.*?)\.(.*?)$/.exec(t); if (s = s ? this.getval(s) : "") try { const t = JSON.parse(s); e = t ? this.lodash_get(t, r, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { var [, r, i] = /^@(.*?)\.(.*?)$/.exec(e), a = this.getval(r), a = r ? "null" === a ? null : a || "{}" : "{}"; tr
|