jdpro/jd_dplhbshop.js

5 lines
130 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
const $ = new Env("大牌浏览店铺");
2024-07-25 00:59:49 +00:00
var _0xodL='jsjiami.com.v7';const _0x5aa13f=_0x2011;(function(_0x18d052,_0x470a7b,_0x261909,_0x233556,_0x148157,_0x3e7a0c,_0x3d06a6){return _0x18d052=_0x18d052>>0x4,_0x3e7a0c='hs',_0x3d06a6='hs',function(_0x12cb93,_0xc2bc92,_0x29e342,_0x78f868,_0x17652f){const _0x5ce0d5=_0x2011;_0x78f868='tfi',_0x3e7a0c=_0x78f868+_0x3e7a0c,_0x17652f='up',_0x3d06a6+=_0x17652f,_0x3e7a0c=_0x29e342(_0x3e7a0c),_0x3d06a6=_0x29e342(_0x3d06a6),_0x29e342=0x0;const _0x57cc00=_0x12cb93();while(!![]&&--_0x233556+_0xc2bc92){try{_0x78f868=-parseInt(_0x5ce0d5(0x179,'Ihb*'))/0x1+parseInt(_0x5ce0d5(0x24a,'[JC['))/0x2+-parseInt(_0x5ce0d5(0x5fc,'rPaI'))/0x3+parseInt(_0x5ce0d5(0x345,'MZ!%'))/0x4*(parseInt(_0x5ce0d5(0x510,'$@5W'))/0x5)+parseInt(_0x5ce0d5(0x650,'!sot'))/0x6+-parseInt(_0x5ce0d5(0x46f,'Mm0Z'))/0x7*(-parseInt(_0x5ce0d5(0x41c,'q%C%'))/0x8)+parseInt(_0x5ce0d5(0x1cd,'Jwj#'))/0x9*(-parseInt(_0x5ce0d5(0x4e2,'2MjR'))/0xa);}catch(_0x159439){_0x78f868=_0x29e342;}finally{_0x17652f=_0x57cc00[_0x3e7a0c]();if(_0x18d052<=_0x233556)_0x29e342?_0x148157?_0x78f868=_0x17652f:_0x148157=_0x17652f:_0x29e342=_0x17652f;else{if(_0x29e342==_0x148157['replace'](/[LVQUAdeTgMkDEqFnSfYl=]/g,'')){if(_0x78f868===_0xc2bc92){_0x57cc00['un'+_0x3e7a0c](_0x17652f);break;}_0x57cc00[_0x3d06a6](_0x17652f);}}}}}(_0x261909,_0x470a7b,function(_0x444326,_0x1f2f46,_0x10d19d,_0x3cbefc,_0x5d1a02,_0x2bb3df,_0xbd717a){return _0x1f2f46='\x73\x70\x6c\x69\x74',_0x444326=arguments[0x0],_0x444326=_0x444326[_0x1f2f46](''),_0x10d19d=`\x72\x65\x76\x65\x72\x73\x65`,_0x444326=_0x444326[_0x10d19d]('\x76'),_0x3cbefc=`\x6a\x6f\x69\x6e`,(0x17aa58,_0x444326[_0x3cbefc](''));});}(0xc00,0xd4082,_0x25f0,0xc2),_0x25f0)&&(_0xodL=_0x25f0);const _0x3f78bb=$[_0x5aa13f(0x289,'Mm0Z')]()?require(_0x5aa13f(0x393,'Ihb*')):'',_0x3839ee=$[_0x5aa13f(0x2f4,'PnB)')]()?require(_0x5aa13f(0x35d,'MZ!%')):'',_0x4ad302=require(_0x5aa13f(0x121,')PFG')),_0x2f8c5f=require(_0x5aa13f(0x171,'TwwX')),_0x4ea229=require(_0x5aa13f(0x165,'cT[a')),_0x489b10=require(_0x5aa13f(0x628,'r3VC'));let _0x3647e4=[],_0x1e9b2a='',_0xcbd28e='',_0x43f77c='',_0x1fbe5d='3';if(process[_0x5aa13f(0x5fb,'[JC[')][_0x5aa13f(0x25d,'r3VC')]){const _0x1a3d33=require(_0x5aa13f(0xde,'nI[D'));$[_0x5aa13f(0x677,'B4[t')]=_0x1a3d33[_0x5aa13f(0x6cf,'kQZo')]($[_0x5aa13f(0x133,'QTfn')][_0x5aa13f(0x311,'Lq2@')]($)),$[_0x5aa13f(0xdc,'PnB)')]=_0x1a3d33[_0x5aa13f(0x539,'s]gx')]($[_0x5aa13f(0x5a0,'QTfn')][_0x5aa13f(0x3c8,'&NLa')]($));}if($[_0x5aa13f(0x32d,'r3VC')]()){Object[_0x5aa13f(0x50f,'l5qo')](_0x3f78bb)[_0x5aa13f(0x5dc,'bpqJ')](_0x371a07=>{const _0x4e526c=_0x5aa13f;_0x3647e4[_0x4e526c(0x5d7,'Sz5A')](_0x3f78bb[_0x371a07]);});if(process[_0x5aa13f(0x2a0,'Mm0Z')][_0x5aa13f(0x33c,'!JT&')]&&process[_0x5aa13f(0x606,'CEBM')][_0x5aa13f(0x605,'1LFw')]===_0x5aa13f(0x663,'kQZo'))console[_0x5aa13f(0x430,'fGvr')]=()=>{};}else _0x3647e4=[$[_0x5aa13f(0x112,'x3(M')](_0x5aa13f(0x6a2,'J9VH')),$[_0x5aa13f(0x278,'kQZo')](_0x5aa13f(0x587,'cT[a')),...jsonfomat($[_0x5aa13f(0x5b8,'TY2L')](_0x5aa13f(0x588,'q%C%'))||'[]')[_0x5aa13f(0x314,'b]Db')](_0x2dce68=>_0x2dce68[_0x5aa13f(0x527,')Wi3')])][_0x5aa13f(0x16a,'$@5W')](_0x1423b0=>!!_0x1423b0);let _0xf11a89=process[_0x5aa13f(0x2a3,'J9VH')][_0x5aa13f(0x580,'PnB)')]||_0x5aa13f(0x52a,'fL3o'),_0x24709d=process[_0x5aa13f(0x5fb,'[JC[')][_0x5aa13f(0x63c,'@ZrJ')]||_0x5aa13f(0x57a,'Sx@0'),_0x4aa8e3=process[_0x5aa13f(0x14b,'HTi0')][_0x5aa13f(0x256,'Lq2@')]||'',_0x18ce93=_0x5aa13f(0x3b9,'Jwj#');$[_0x5aa13f(0x471,'&NLa')]=_0x5aa13f(0x45b,'E#Rw'),$[_0x5aa13f(0x2d7,'&NLa')]=$[_0x5aa13f(0x3dc,'!sot')][_0x5aa13f(0x404,'TwwX')](/oC[0-9a-z]+/)[0x0],$[_0x5aa13f(0x218,'$Gjr')]=[_0x5aa13f(0x37a,'l5qo'),_0x5aa13f(0x44e,'s]gx')];_0x4aa8e3!=''&&($[_0x5aa13f(0x660,'YSjm')]=_0x4aa8e3[_0x5aa13f(0x68b,'E#Rw')]('&'));$[_0x5aa13f(0x6cd,'B4[t')]=_0x5aa13f(0x480,'GSk@'),$[_0x5aa13f(0x49c,'Sx@0')]=_0x5aa13f(0x66e,'TwwX'),$[_0x5aa13f(0x30f,'PnB)')]=![];let _0x52fa72=[_0x5aa13f(0x13d,'t4^P')];$[_0x5aa13f(0x54c,'sapE')]=_0x52fa72[_0x313186(0x0,_0x52fa72[_0x5aa13f(0x267,'Lq2@')])],$[_0x5aa13f(0x6bd,'B4[t')]=process[_0x5aa13f(0x596,'0ubV')][_0x5aa13f(0x348,'J9VH')]||'',$[_0x5aa13f(0x557,'Q
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