jdpro/jd_dplhbshop.js

5 lines
141 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
const $ = new Env("大牌浏览店铺");
2024-08-15 00:54:37 +00:00
var _0xodA='jsjiami.com.v7';const _0x5316d3=_0x1cf7;(function(_0x3d9616,_0x5b3fbb,_0x1e2d99,_0x37f45a,_0x677ffc,_0x48021d,_0x47a001){return _0x3d9616=_0x3d9616>>0x1,_0x48021d='hs',_0x47a001='hs',function(_0x47c34e,_0x5dd804,_0x40b919,_0xa993b,_0x241c2b){const _0x8c4706=_0x1cf7;_0xa993b='tfi',_0x48021d=_0xa993b+_0x48021d,_0x241c2b='up',_0x47a001+=_0x241c2b,_0x48021d=_0x40b919(_0x48021d),_0x47a001=_0x40b919(_0x47a001),_0x40b919=0x0;const _0x4ce48f=_0x47c34e();while(!![]&&--_0x37f45a+_0x5dd804){try{_0xa993b=parseInt(_0x8c4706(0x1bb,'[XEt'))/0x1+-parseInt(_0x8c4706(0x6f8,'&&iP'))/0x2*(-parseInt(_0x8c4706(0x376,'LR^7'))/0x3)+parseInt(_0x8c4706(0x1c6,'n$16'))/0x4+parseInt(_0x8c4706(0x58f,'r7tZ'))/0x5+-parseInt(_0x8c4706(0x29d,'bQe*'))/0x6*(-parseInt(_0x8c4706(0x18e,'Kic*'))/0x7)+-parseInt(_0x8c4706(0x52b,'eQuz'))/0x8*(-parseInt(_0x8c4706(0x717,'dVAL'))/0x9)+-parseInt(_0x8c4706(0x664,'vJXe'))/0xa;}catch(_0x1c4376){_0xa993b=_0x40b919;}finally{_0x241c2b=_0x4ce48f[_0x48021d]();if(_0x3d9616<=_0x37f45a)_0x40b919?_0x677ffc?_0xa993b=_0x241c2b:_0x677ffc=_0x241c2b:_0x40b919=_0x241c2b;else{if(_0x40b919==_0x677ffc['replace'](/[bhNuCfLRWpwPBdUEyAn=]/g,'')){if(_0xa993b===_0x5dd804){_0x4ce48f['un'+_0x48021d](_0x241c2b);break;}_0x4ce48f[_0x47a001](_0x241c2b);}}}}}(_0x1e2d99,_0x5b3fbb,function(_0x5be566,_0xdf56f5,_0x516e96,_0x2548fb,_0x2bedd4,_0x5bf0db,_0x236b68){return _0xdf56f5='\x73\x70\x6c\x69\x74',_0x5be566=arguments[0x0],_0x5be566=_0x5be566[_0xdf56f5](''),_0x516e96=`\x72\x65\x76\x65\x72\x73\x65`,_0x5be566=_0x5be566[_0x516e96]('\x76'),_0x2548fb=`\x6a\x6f\x69\x6e`,(0x17e2cc,_0x5be566[_0x2548fb](''));});}(0x198,0xe12b6,_0x499a,0xce),_0x499a)&&(_0xodA=0x3a83);const _0x151f64=$[_0x5316d3(0x16d,'r7tZ')]()?require(_0x5316d3(0x41e,'vJXe')):'',_0x4809ce=$[_0x5316d3(0x410,'we9M')]()?require(_0x5316d3(0x5c8,'LR^7')):'',_0x590269=require(_0x5316d3(0x772,'UUdo')),_0x52d9c8=require(_0x5316d3(0x33b,'gne4')),_0x34b622=require(_0x5316d3(0x1b0,'r7tZ')),_0x70848b=require(_0x5316d3(0x6d5,'UUdo'));let _0x407a6a=[],_0x199149='',_0xe04df='',_0x25ad37='',_0x5663bc='3';if(process[_0x5316d3(0x40a,'W!mC')][_0x5316d3(0x7e0,'JY(0')]){const _0x4b77fb=require(_0x5316d3(0x48b,'kI$z'));$[_0x5316d3(0x4b8,'Yq^^')]=_0x4b77fb[_0x5316d3(0x57b,'LXWy')]($[_0x5316d3(0x1cc,'vJXe')][_0x5316d3(0x7b1,'0BI1')]($)),$[_0x5316d3(0x597,'9wrh')]=_0x4b77fb[_0x5316d3(0x450,'F[IF')]($[_0x5316d3(0x6e6,'kI$z')][_0x5316d3(0x727,'6tyD')]($));}if($[_0x5316d3(0x793,'3*tP')]()){Object[_0x5316d3(0x161,'LR^7')](_0x151f64)[_0x5316d3(0x160,'uAEl')](_0x4d1b65=>{const _0xa7dba8=_0x5316d3;_0x407a6a[_0xa7dba8(0x2b3,'k624')](_0x151f64[_0x4d1b65]);});if(process[_0x5316d3(0x796,'UUdo')][_0x5316d3(0x757,'6*qG')]&&process[_0x5316d3(0x773,'2Nt^')][_0x5316d3(0x6e4,'k624')]===_0x5316d3(0x23e,'F[IF'))console[_0x5316d3(0x361,'0BI1')]=()=>{};}else _0x407a6a=[$[_0x5316d3(0x19f,'Njj5')](_0x5316d3(0x1bd,'kI$z')),$[_0x5316d3(0x4a4,'v4n$')](_0x5316d3(0x5fe,'6*qG')),...jsonfomat($[_0x5316d3(0x7d6,'R*jL')](_0x5316d3(0x25a,'WP3^'))||'[]')[_0x5316d3(0x187,'eQuz')](_0x211b36=>_0x211b36[_0x5316d3(0x609,'uAEl')])][_0x5316d3(0x1c3,'6tyD')](_0x374323=>!!_0x374323);let _0x416bd7=process[_0x5316d3(0x673,'n$kA')][_0x5316d3(0x4d1,'we9M')]||_0x5316d3(0x182,'W!mC'),_0x1fd03b=process[_0x5316d3(0x247,'bQe*')][_0x5316d3(0x260,'LXWy')]||_0x5316d3(0x5b1,'W!mC'),_0x4dbd8d=process[_0x5316d3(0x794,'ZH8R')][_0x5316d3(0x466,'rZq)')]||'',_0x240f51=_0x5316d3(0x6ed,'F[IF');$[_0x5316d3(0x7a1,'uAEl')]=_0x5316d3(0x291,'Qp1Y'),$[_0x5316d3(0x6f0,'k624')]=$[_0x5316d3(0x677,'mFNc')][_0x5316d3(0x287,'ZH8R')](/oC[0-9a-z]+/)[0x0],$[_0x5316d3(0x76a,'&&iP')]=[_0x5316d3(0x179,'6*qG'),_0x5316d3(0x4c1,'R*jL'),_0x5316d3(0x624,'F[IF')];_0x4dbd8d!=''&&($[_0x5316d3(0x2a2,'mFNc')]=_0x4dbd8d[_0x5316d3(0x5c9,'eQuz')]('&'));$[_0x5316d3(0x77d,'(PN2')]=_0x5316d3(0x477,'we9M'),$[_0x5316d3(0x598,'Njj5')]=_0x5316d3(0x295,'&&iP'),$[_0x5316d3(0x6eb,'R*jL')]=![];let _0x111b30=[_0x5316d3(0x1cb,'(PN2')];$[_0x5316d3(0x659,'WP3^')]=_0x111b30[_0x18203d(0x0,_0x111b30[_0x5316d3(0x6a9,'F[IF')])],$[_0x5316d3(0x7a6,'kwI6')]=process[_0x5316d3(0x517,'kI$z')][_0x5316d3(0x527,'3*tP')]||'',$[
2024-06-28 07:47:44 +00:00
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