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-08-09 23:53:04 +00:00
var _0xod6='jsjiami.com.v7';const _0x29ceae=_0x9ecb;(function(_0x4ee884,_0x33082b,_0x5cf872,_0x5e07c0,_0x27ddec,_0x45b0ad,_0x376072){return _0x4ee884=_0x4ee884>>0x6,_0x45b0ad='hs',_0x376072='hs',function(_0x18bf11,_0x171ae3,_0x5595c0,_0x3711dc,_0x447d87){const _0x2be809=_0x9ecb;_0x3711dc='tfi',_0x45b0ad=_0x3711dc+_0x45b0ad,_0x447d87='up',_0x376072+=_0x447d87,_0x45b0ad=_0x5595c0(_0x45b0ad),_0x376072=_0x5595c0(_0x376072),_0x5595c0=0x0;const _0x20de5c=_0x18bf11();while(!![]&&--_0x5e07c0+_0x171ae3){try{_0x3711dc=-parseInt(_0x2be809(0x254,'e3Xg'))/0x1+-parseInt(_0x2be809(0x6da,'V6^X'))/0x2*(parseInt(_0x2be809(0x731,'oTHP'))/0x3)+parseInt(_0x2be809(0x431,'0aZ2'))/0x4+parseInt(_0x2be809(0x251,'7ln3'))/0x5*(parseInt(_0x2be809(0x360,'rbaM'))/0x6)+parseInt(_0x2be809(0x22b,'^zJB'))/0x7*(parseInt(_0x2be809(0x789,'HDgm'))/0x8)+parseInt(_0x2be809(0x29b,'^zJB'))/0x9*(-parseInt(_0x2be809(0x5b6,'9Lrq'))/0xa)+parseInt(_0x2be809(0x64f,'9Lrq'))/0xb;}catch(_0x625d1e){_0x3711dc=_0x5595c0;}finally{_0x447d87=_0x20de5c[_0x45b0ad]();if(_0x4ee884<=_0x5e07c0)_0x5595c0?_0x27ddec?_0x3711dc=_0x447d87:_0x27ddec=_0x447d87:_0x5595c0=_0x447d87;else{if(_0x5595c0==_0x27ddec['replace'](/[xRNLepyngdXSMCVtAkID=]/g,'')){if(_0x3711dc===_0x171ae3){_0x20de5c['un'+_0x45b0ad](_0x447d87);break;}_0x20de5c[_0x376072](_0x447d87);}}}}}(_0x5cf872,_0x33082b,function(_0x517ed5,_0x35739b,_0x165d78,_0x550cbe,_0x4910d7,_0x5e17a6,_0xe1373c){return _0x35739b='\x73\x70\x6c\x69\x74',_0x517ed5=arguments[0x0],_0x517ed5=_0x517ed5[_0x35739b](''),_0x165d78=`\x72\x65\x76\x65\x72\x73\x65`,_0x517ed5=_0x517ed5[_0x165d78]('\x76'),_0x550cbe=`\x6a\x6f\x69\x6e`,(0x17d27e,_0x517ed5[_0x550cbe](''));});}(0x32c0,0xbdba6,_0x28a1,0xcd),_0x28a1)&&(_0xod6=0x16b4);const _0x33db22=$[_0x29ceae(0x67d,'a6lW')]()?require(_0x29ceae(0x6b4,'^zJB')):'',_0x4a95f6=$[_0x29ceae(0x5a9,'e3Xg')]()?require(_0x29ceae(0x6ab,'%xAt')):'',_0x374d9f=require(_0x29ceae(0x561,'!iu%')),_0x3d4c95=require(_0x29ceae(0x1de,'9Lrq')),_0x1ab155=require(_0x29ceae(0x1f2,'@2T%')),_0x5624a2=require(_0x29ceae(0x653,'!fFc'));let _0x33b31d=[],_0x22ccd2='',_0x2807f9='',_0x499c1d='',_0x86fba4='3';if(process[_0x29ceae(0x6b3,'OkUN')][_0x29ceae(0x286,'k1jc')]){const _0x5e87b4=require(_0x29ceae(0x655,'##M5'));$[_0x29ceae(0x688,'9Lrq')]=_0x5e87b4[_0x29ceae(0x2c2,'Uip(')]($[_0x29ceae(0x416,'e3Xg')][_0x29ceae(0x753,'wWTO')]($)),$[_0x29ceae(0x301,'g79p')]=_0x5e87b4[_0x29ceae(0x7ae,'!iu%')]($[_0x29ceae(0x74c,'%Coz')][_0x29ceae(0x2fa,'&Cm9')]($));}if($[_0x29ceae(0x4f2,'er2H')]()){Object[_0x29ceae(0x7c3,'OkUN')](_0x33db22)[_0x29ceae(0x4ec,'m%DS')](_0x14986c=>{const _0x44cb1a=_0x29ceae;_0x33b31d[_0x44cb1a(0x5be,'#wc0')](_0x33db22[_0x14986c]);});if(process[_0x29ceae(0x6c1,'Uip(')][_0x29ceae(0x302,'ruU[')]&&process[_0x29ceae(0x369,'ruU[')][_0x29ceae(0x62c,'wAM9')]===_0x29ceae(0x716,'OkUN'))console[_0x29ceae(0x3c5,'oh&X')]=()=>{};}else _0x33b31d=[$[_0x29ceae(0x2c8,'3Lr^')](_0x29ceae(0x77e,'7ln3')),$[_0x29ceae(0x2c8,'3Lr^')](_0x29ceae(0x727,'a6lW')),...jsonfomat($[_0x29ceae(0x2c8,'3Lr^')](_0x29ceae(0x5ef,'utbk'))||'[]')[_0x29ceae(0x23b,'J4Si')](_0x265174=>_0x265174[_0x29ceae(0x5aa,'utbk')])][_0x29ceae(0x1ec,'m%DS')](_0x1b9fac=>!!_0x1b9fac);let _0x31b45d=process[_0x29ceae(0x7cd,'wWTO')][_0x29ceae(0x7d6,'wWTO')]||_0x29ceae(0x465,'!iu%'),_0x3528df=process[_0x29ceae(0x5ba,'&Cm9')][_0x29ceae(0x778,'##M5')]||_0x29ceae(0x494,'g79p'),_0x2eb570=process[_0x29ceae(0x6c1,'Uip(')][_0x29ceae(0x6dd,'a6lW')]||'',_0x48425c=_0x29ceae(0x3a9,'VQf$');$[_0x29ceae(0x2d1,'hfHL')]=_0x29ceae(0x2e7,'HDgm'),$[_0x29ceae(0x5b1,'0aZ2')]=$[_0x29ceae(0x1c3,'##M5')][_0x29ceae(0x221,'!fFc')](/oC[0-9a-z]+/)[0x0],$[_0x29ceae(0x6b9,'AwP)')]=[_0x29ceae(0x293,'iL[8'),_0x29ceae(0x4a9,'g79p'),_0x29ceae(0x40e,'ruU[')];_0x2eb570!=''&&($[_0x29ceae(0x6eb,'%xAt')]=_0x2eb570[_0x29ceae(0x1f8,'wAM9')]('&'));$[_0x29ceae(0x6e9,'V6^X')]=_0x29ceae(0x424,'0tTJ'),$[_0x29ceae(0x274,'e3Xg')]=_0x29ceae(0x2bb,'OkUN'),$[_0x29ceae(0x21d,']ql9')]=![];function _0x9ecb(_0x494082,_0x5ebb8d){const _0x257046=_0x28a1();return _0x9ecb=function(_0x1e9235,_0x4f49da){_0x1e9235=_0x1e9235-0x1c0;let _0x28a1a3=_0x257046[_0x1e9235];if(
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