jdpro/jd_rmvcart.js

6 lines
76 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
1 1 1 1 * jd_rmvcart.js
*/
const $ = new Env('清空购物车');
const bdy_0x42700d=bdy_0x1aff;(function(_0x59434a,_0x1da91c){const bdy_0x3f2ba7={_0x110449:'0x20b',_0x513394:'TwN[',_0x46cf67:'0x247',_0x2c5a5d:'QN0*',_0x922dfd:'0x2ac',_0x57c2b0:'wO]2',_0x28b1b4:'0x361',_0x5243a6:'XQ!W',_0x4e393d:'0x2b9',_0x31445d:'%)dx',_0x3acf66:'0x1c9',_0x35da11:'c#K1',_0x298281:'0x27c',_0xbe32a8:'XQ!W',_0x425762:'0x2e5',_0x329de5:'K]F5',_0x2c4534:'0x28b',_0x359c7f:'Z&AF',_0x1506c6:'0x300',_0x434fc1:'0x2e6',_0x1defa8:'Ptyu',_0x5f1786:'0x295'},_0x1a2c70=bdy_0x1aff,_0x2c0e65=_0x59434a();while(!![]){try{const _0x482060=-parseInt(_0x1a2c70(bdy_0x3f2ba7._0x110449,bdy_0x3f2ba7._0x513394))/(-0x25f+-0x828+0xa88)*(-parseInt(_0x1a2c70(bdy_0x3f2ba7._0x46cf67,bdy_0x3f2ba7._0x2c5a5d))/(0x9ad+-0x2*-0x1bb+-0xd21))+parseInt(_0x1a2c70(bdy_0x3f2ba7._0x922dfd,bdy_0x3f2ba7._0x57c2b0))/(0x3*0x295+-0x4d*-0x79+0x8f*-0x4f)*(parseInt(_0x1a2c70(bdy_0x3f2ba7._0x28b1b4,bdy_0x3f2ba7._0x5243a6))/(0xa2*-0xd+0x2002+0x24*-0xa9))+-parseInt(_0x1a2c70(bdy_0x3f2ba7._0x4e393d,bdy_0x3f2ba7._0x31445d))/(-0xed*0x5+0x1b6a+-0x16c4*0x1)*(parseInt(_0x1a2c70(bdy_0x3f2ba7._0x3acf66,bdy_0x3f2ba7._0x35da11))/(-0x210c+-0x2423+0x4535))+parseInt(_0x1a2c70(bdy_0x3f2ba7._0x298281,bdy_0x3f2ba7._0xbe32a8))/(0x95*0x1a+0x67f*-0x6+-0x3*-0x7f5)+-parseInt(_0x1a2c70(bdy_0x3f2ba7._0x425762,bdy_0x3f2ba7._0x329de5))/(0x12*0x1fc+0xc3*-0xb+0x1b4f*-0x1)*(parseInt(_0x1a2c70(bdy_0x3f2ba7._0x2c4534,bdy_0x3f2ba7._0x359c7f))/(-0xf27*-0x2+-0x1*0xba1+-0x2*0x952))+-parseInt(_0x1a2c70(bdy_0x3f2ba7._0x1506c6,bdy_0x3f2ba7._0x329de5))/(-0x1*0x2239+-0x1509+-0x1ba6*-0x2)*(-parseInt(_0x1a2c70(bdy_0x3f2ba7._0x434fc1,bdy_0x3f2ba7._0x1defa8))/(-0x1c65*0x1+-0x30f*0x3+0x259d))+parseInt(_0x1a2c70(bdy_0x3f2ba7._0x5f1786,bdy_0x3f2ba7._0x35da11))/(0x14e7+0x1*0xa28+-0x1f03);if(_0x482060===_0x1da91c)break;else _0x2c0e65['push'](_0x2c0e65['shift']());}catch(_0x56e038){_0x2c0e65['push'](_0x2c0e65['shift']());}}}(bdy_0x18ad,-0x2d50b+-0x7*-0x2353+0x42574*0x1));const bdy_0x11d73d=$[bdy_0x42700d('0x1e1','@HmA')]()?require(bdy_0x42700d('0x23f','CSJ1')):'',bdy_0x1f7cab=$[bdy_0x42700d('0x1e1','@HmA')]()?require(bdy_0x42700d('0x302','awHu')):'',bdy_0x4f9815=require(bdy_0x42700d('0x26e','(&0S')),bdy_0x3205a6=require(bdy_0x42700d('0x29e','@5R*')),bdy_0x1f413d=process[bdy_0x42700d('0x2a1','G)nt')][bdy_0x42700d('0x277','Ptyu')]||bdy_0x42700d('0x30d','LzTk');let bdy_0x43735f=!![],bdy_0x2b9309=[],bdy_0x33c04a='',bdy_0xbc82b0='';if($[bdy_0x42700d('0x350','QN0*')]()){Object[bdy_0x42700d('0x259','i8b6')](bdy_0x1f7cab)[bdy_0x42700d('0x203','#LZF')](_0x5987ae=>{const bdy_0x30bbb1={_0x5b17bb:'0x245',_0x4d8269:'q)ug'},_0x1d6e7c=bdy_0x1aff;bdy_0x2b9309[_0x1d6e7c(bdy_0x30bbb1._0x5b17bb,bdy_0x30bbb1._0x4d8269)](bdy_0x1f7cab[_0x5987ae]);});if(process[bdy_0x42700d('0x275','A]s*')][bdy_0x42700d('0x37a','$WrB')]&&process[bdy_0x42700d('0x2a9','Hmp^')][bdy_0x42700d('0x373','@5R*')]===bdy_0x42700d('0x228','fDTi'))console[bdy_0x42700d('0x2ae','CSJ1')]=()=>{};}else bdy_0x2b9309=[$[bdy_0x42700d('0x211','wO]2')](bdy_0x42700d('0x272','Ptyu')),$[bdy_0x42700d('0x220','5&uA')](bdy_0x42700d('0x331','A]s*')),...bdy_0x59ab3c($[bdy_0x42700d('0x1fe','QN0*')](bdy_0x42700d('0x24b','hgia'))||'[]')[bdy_0x42700d('0x2db','QN0*')](_0x43ad68=>_0x43ad68[bdy_0x42700d('0x267','Yv1D')])][bdy_0x42700d('0x31a','gXat')](_0x292556=>!!_0x292556);function bdy_0x18ad(){const _0x4fd7c1=['W7bGWP1meG','W5u1E8kGWQhcVG','WQf+WP95','WPvfW5LGuK3dLa','W6DlWPGulG','W6BcV3rHASks','W5S/CCk+','W57dHSocW6pcQmoUW7yAWPRcL8ovW47cJmonbv3dSuJcIv5IWO3dS8o6W4z/iCkxqSoPWRPHESoOW6tdQadcScaCx8k1t8kEWPGLgqBdJmkHyCktW7WzW47cUCkHWRxcRSowmthcJCoVyLpdOhtdPmo+W43cLqjukmkRWR4UW5lcN8k5oSkEW7nfWQyDeSknW6egCCkyW48+WQ9rW4VcVL5dg8oVWR8wqexcSmoSuwi9WQDyA3ldMSodFw3dV385W5qVuaaVWRtcRmkJh8oPWPKYWRJdG8oLlmobWOxcNKChWQDEWPX9W59wn8krWRfXWR3dL3yKW5yXWPxcSSoslsdcLhqIf2NdVmo5WPhcT8oqhwzPW7m3wrhdLw7cLXJcGGxdUeRcTCohWO0tWQ7cHCoCDfZcSCo0ssXMW5n+jCo/oZpdLmkoi8oGWQitEbGjdmkWWPDdWOHQW67dJKVdLmoiW4ZdQILtW53cRmkhWRe/W6pdUKVdLeq0W6bIxmoNbmk3i1RdScHZvY3cIuVdPfLgzSoLW57dP8klhJFcPCoAWP0mnmkSW5ZdIKddUc3cQxvfwYJdLNFcOeCCWO0Wk29EsYlcU0lcUCkiWOWKW5anWOPZWPhdN3BdTL7dUg5vFSovuW','WQvgW7pdLsDuqq','WRq1k8oMW78','CwJcTN
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); 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((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } 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.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.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) 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(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.d