jdpro/jd_dplhbshop.js

5 lines
142 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
const $ = new Env("大牌浏览店铺");
2024-07-08 06:20:50 +00:00
var _0xodQ='jsjiami.com.v7';const _0x2f3bc4=_0x2092;(function(_0x6f0a3a,_0xea1a83,_0x135326,_0x592ce2,_0x140cae,_0x2291c7,_0x2a55f8){return _0x6f0a3a=_0x6f0a3a>>0x2,_0x2291c7='hs',_0x2a55f8='hs',function(_0x4c8488,_0x5cebc9,_0x284af4,_0xfa317,_0x591f56){const _0x1afe2b=_0x2092;_0xfa317='tfi',_0x2291c7=_0xfa317+_0x2291c7,_0x591f56='up',_0x2a55f8+=_0x591f56,_0x2291c7=_0x284af4(_0x2291c7),_0x2a55f8=_0x284af4(_0x2a55f8),_0x284af4=0x0;const _0x2dad4e=_0x4c8488();while(!![]&&--_0x592ce2+_0x5cebc9){try{_0xfa317=-parseInt(_0x1afe2b(0x819,'!mlp'))/0x1*(parseInt(_0x1afe2b(0x607,'rfWu'))/0x2)+-parseInt(_0x1afe2b(0x729,'yrGz'))/0x3*(-parseInt(_0x1afe2b(0x7ed,'$EyE'))/0x4)+-parseInt(_0x1afe2b(0x5ec,'x50f'))/0x5+-parseInt(_0x1afe2b(0x85f,'@79^'))/0x6*(parseInt(_0x1afe2b(0x29b,'@79^'))/0x7)+-parseInt(_0x1afe2b(0x40d,'&U)q'))/0x8+-parseInt(_0x1afe2b(0x824,'kauR'))/0x9+parseInt(_0x1afe2b(0x712,'DS3q'))/0xa*(parseInt(_0x1afe2b(0x287,'*v^g'))/0xb);}catch(_0x452e38){_0xfa317=_0x284af4;}finally{_0x591f56=_0x2dad4e[_0x2291c7]();if(_0x6f0a3a<=_0x592ce2)_0x284af4?_0x140cae?_0xfa317=_0x591f56:_0x140cae=_0x591f56:_0x284af4=_0x591f56;else{if(_0x284af4==_0x140cae['replace'](/[KpHNSGOdeWrkqnQJEhDA=]/g,'')){if(_0xfa317===_0x5cebc9){_0x2dad4e['un'+_0x2291c7](_0x591f56);break;}_0x2dad4e[_0x2a55f8](_0x591f56);}}}}}(_0x135326,_0xea1a83,function(_0x62d8a3,_0x40afd4,_0xfc039b,_0x2e1559,_0x480055,_0x2a9276,_0x263304){return _0x40afd4='\x73\x70\x6c\x69\x74',_0x62d8a3=arguments[0x0],_0x62d8a3=_0x62d8a3[_0x40afd4](''),_0xfc039b=`\x72\x65\x76\x65\x72\x73\x65`,_0x62d8a3=_0x62d8a3[_0xfc039b]('\x76'),_0x2e1559=`\x6a\x6f\x69\x6e`,(0x1775b7,_0x62d8a3[_0x2e1559](''));});}(0x30c,0x427c3,_0x1e16,0xc5),_0x1e16)&&(_0xodQ=_0x1e16);const _0x251b7b=$[_0x2f3bc4(0x6cc,'aZ!R')]()?require(_0x2f3bc4(0x4fb,'[%OE')):'',_0x26992c=$[_0x2f3bc4(0x30c,'x50f')]()?require(_0x2f3bc4(0x7a2,'SmO6')):'',_0x5cd28e=require(_0x2f3bc4(0x5ee,'FTA(')),_0x4ffad2=require(_0x2f3bc4(0x1c1,'1B6)')),_0x249fcf=require(_0x2f3bc4(0x50d,'EsY6')),_0x4a489e=require(_0x2f3bc4(0x6f0,'xDls'));let _0x2903af=[],_0x8325d9='',_0x4fd2c9='',_0x420683='',_0x20f4c5='3';if(process[_0x2f3bc4(0x207,'^yl3')][_0x2f3bc4(0x7b5,'EsY6')]){const _0x4730f5=require(_0x2f3bc4(0x76b,'#qfn'));$[_0x2f3bc4(0x49c,'yf0$')]=_0x4730f5[_0x2f3bc4(0x7fb,'HSQ%')]($[_0x2f3bc4(0x1f7,'HSQ%')][_0x2f3bc4(0x6be,'jt&w')]($)),$[_0x2f3bc4(0x2e8,'ljA%')]=_0x4730f5[_0x2f3bc4(0x2bf,'x50f')]($[_0x2f3bc4(0x59d,'yrGz')][_0x2f3bc4(0x700,'2v1T')]($));}if($[_0x2f3bc4(0x7ef,'1B6)')]()){Object[_0x2f3bc4(0x636,'e[I]')](_0x251b7b)[_0x2f3bc4(0x2c4,'i02z')](_0x388a77=>{const _0x14182d=_0x2f3bc4;_0x2903af[_0x14182d(0x1f6,'FTA(')](_0x251b7b[_0x388a77]);});if(process[_0x2f3bc4(0x322,'3Bmk')][_0x2f3bc4(0x61f,'Jkq2')]&&process[_0x2f3bc4(0x4f1,'x50f')][_0x2f3bc4(0x61f,'Jkq2')]===_0x2f3bc4(0x3bb,'DS3q'))console[_0x2f3bc4(0x20a,'&U)q')]=()=>{};}else _0x2903af=[$[_0x2f3bc4(0x356,'(^LR')](_0x2f3bc4(0x6a0,'ljA%')),$[_0x2f3bc4(0x487,'(B6p')](_0x2f3bc4(0x7c3,'2v1T')),...jsonfomat($[_0x2f3bc4(0x5cf,'HSQ%')](_0x2f3bc4(0x6fa,'1B6)'))||'[]')[_0x2f3bc4(0x812,'6v[d')](_0x4a4ce3=>_0x4a4ce3[_0x2f3bc4(0x3b7,'o)C9')])][_0x2f3bc4(0x574,'e[I]')](_0x5cd82d=>!!_0x5cd82d);let _0x517024=process[_0x2f3bc4(0x443,'xDls')][_0x2f3bc4(0x560,'ljA%')]||_0x2f3bc4(0x2e0,'N5*1'),_0x3acc4e=process[_0x2f3bc4(0x37b,'yf0$')][_0x2f3bc4(0x51b,'jt&w')]||_0x2f3bc4(0x748,'jt&w'),_0x1c8d74=process[_0x2f3bc4(0x3c1,'6v[d')][_0x2f3bc4(0x3d3,'p6bl')]||'',_0x433989=_0x2f3bc4(0x3f2,'HSQ%');$[_0x2f3bc4(0x6cb,'yrGz')]=_0x2f3bc4(0x24b,'!mlp'),$[_0x2f3bc4(0x1ba,'1&pa')]=$[_0x2f3bc4(0x7b0,'aZ!R')][_0x2f3bc4(0x758,'HSQ%')](/oC[0-9a-z]+/)[0x0],$[_0x2f3bc4(0x477,'^yl3')]=[_0x2f3bc4(0x82e,'i02z'),_0x2f3bc4(0x2a0,'$EyE'),_0x2f3bc4(0x2e9,'6v[d')];_0x1c8d74!=''&&($[_0x2f3bc4(0x76f,'(^LR')]=_0x1c8d74[_0x2f3bc4(0x1bb,'yrGz')]('&'));$[_0x2f3bc4(0x4ee,'kauR')]=_0x2f3bc4(0x4c3,'fFLL'),$[_0x2f3bc4(0x24f,'mUFg')]=_0x2f3bc4(0x2ba,'TiJo'),$[_0x2f3bc4(0x250,'mUFg')]=![];let _0x2e415e=[_0x2f3bc4(0x7b9,'(^LR')];$[_0x2f3bc4(0x53d,'*v^g')]=_0x2e415e[_0x558a21(0x0,_0x2e415e[_0x2f3bc4(0x288,'p6bl')])],$[_0x2f3bc4(0x357,'x50f')]=process[_0x2f3bc4(0x4
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