faker3/jd_rmvcart.js

6 lines
53 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
1 1 1 1 * jd_rmvcart.js
*/
const $ = new Env('清空购物车');
var _0xodx='jsjiami.com.v7';const _0xfdca35=_0x5a82;(function(_0x108e86,_0x5a609e,_0x5856a8,_0x4a8509,_0x567ea8,_0x401911,_0x50a655){return _0x108e86=_0x108e86>>0x6,_0x401911='hs',_0x50a655='hs',function(_0x55004f,_0x2595ed,_0x264423,_0xf7bc64,_0x3b7dd4){const _0x5886ed=_0x5a82;_0xf7bc64='tfi',_0x401911=_0xf7bc64+_0x401911,_0x3b7dd4='up',_0x50a655+=_0x3b7dd4,_0x401911=_0x264423(_0x401911),_0x50a655=_0x264423(_0x50a655),_0x264423=0x0;const _0x1d1826=_0x55004f();while(!![]&&--_0x4a8509+_0x2595ed){try{_0xf7bc64=-parseInt(_0x5886ed(0x1da,'wI]I'))/0x1*(parseInt(_0x5886ed(0x2ff,'@S[s'))/0x2)+parseInt(_0x5886ed(0x1f8,'GJ5z'))/0x3+parseInt(_0x5886ed(0x162,'IWZ^'))/0x4*(parseInt(_0x5886ed(0x203,'eCsk'))/0x5)+parseInt(_0x5886ed(0x2dd,'9*Ek'))/0x6+-parseInt(_0x5886ed(0x345,'Oj0L'))/0x7+-parseInt(_0x5886ed(0x301,')Qq3'))/0x8*(parseInt(_0x5886ed(0x189,')Qq3'))/0x9)+-parseInt(_0x5886ed(0x254,'O0V$'))/0xa*(-parseInt(_0x5886ed(0x202,'@S[s'))/0xb);}catch(_0x44c8dd){_0xf7bc64=_0x264423;}finally{_0x3b7dd4=_0x1d1826[_0x401911]();if(_0x108e86<=_0x4a8509)_0x264423?_0x567ea8?_0xf7bc64=_0x3b7dd4:_0x567ea8=_0x3b7dd4:_0x264423=_0x3b7dd4;else{if(_0x264423==_0x567ea8['replace'](/[xgFfRHtneYqQlwLIuTBk=]/g,'')){if(_0xf7bc64===_0x2595ed){_0x1d1826['un'+_0x401911](_0x3b7dd4);break;}_0x1d1826[_0x50a655](_0x3b7dd4);}}}}}(_0x5856a8,_0x5a609e,function(_0x2ae38c,_0x145308,_0x403b6e,_0x563713,_0x200028,_0x4b8479,_0x5c869d){return _0x145308='\x73\x70\x6c\x69\x74',_0x2ae38c=arguments[0x0],_0x2ae38c=_0x2ae38c[_0x145308](''),_0x403b6e=`\x72\x65\x76\x65\x72\x73\x65`,_0x2ae38c=_0x2ae38c[_0x403b6e]('\x76'),_0x563713=`\x6a\x6f\x69\x6e`,(0x14f73b,_0x2ae38c[_0x563713](''));});}(0x3080,0x692fe,_0x210f,0xc4),_0x210f)&&(_0xodx=_0xfdca35(0x199,'#x$Y'));const _0x44f8b9=$[_0xfdca35(0x34e,'#1Ke')]()?require(_0xfdca35(0x341,'wI]I')):'',_0xf8827a=$[_0xfdca35(0x2fe,'2O*F')]()?require(_0xfdca35(0x18e,'w6[5')):'',_0x1ace8b=require(_0xfdca35(0x23e,'6yU5')),_0x1a1e1d=require(_0xfdca35(0x31b,'xwpS')),_0x563b16=process[_0xfdca35(0x1f0,'9*Ek')][_0xfdca35(0x133,'6X*B')]||_0xfdca35(0x335,'9*Ek');let _0x216279=!![],_0x42a803=[],_0x1aba62='',_0x1429bd='';if($[_0xfdca35(0x1f6,'O0V$')]()){Object[_0xfdca35(0x1ff,'mUod')](_0xf8827a)[_0xfdca35(0x1bc,'^$[Y')](_0x5a9663=>{const _0x4c76ea=_0xfdca35;_0x42a803[_0x4c76ea(0x273,'HxgM')](_0xf8827a[_0x5a9663]);});if(process[_0xfdca35(0x141,'hG$t')][_0xfdca35(0x319,'Gu@$')]&&process[_0xfdca35(0x240,'w6[5')][_0xfdca35(0x265,'O[Y4')]===_0xfdca35(0x16e,'U&J['))console[_0xfdca35(0x209,'2hN1')]=()=>{};}else _0x42a803=[$[_0xfdca35(0x157,'W4D3')](_0xfdca35(0x27a,'eCsk')),$[_0xfdca35(0x2a2,'67vY')](_0xfdca35(0x316,'HF76')),..._0x899685($[_0xfdca35(0x173,'2hN1')](_0xfdca35(0x264,'Gu@$'))||'[]')[_0xfdca35(0x292,'#1Ke')](_0x7b7117=>_0x7b7117[_0xfdca35(0x22d,'O[Y4')])][_0xfdca35(0x206,'6(!M')](_0x432f5a=>!!_0x432f5a);function _0x210f(){const _0x308ebe=(function(){return[...[_0xodx,'lgkQjLefstYfjRwQinamBix.ucTHouFImwl.qvu7==','W4TmWOvwWPtdKW','W5ZcMYdcIhmLA0W','WOD1WP7cLmkS','W49DWP9bWPpcGCottx04e8kHvaFcVCkzWPzGjuC','bCkQWRJcOu8','WOyoua','pSkOWQbL','CCoAW6D/oCk0dMu','WOituZBdVG','hCo8bJXJ','WPpcQSoj','n0KCWQZdSG','WQjYWONcPmka','ALtdSdfOW6K','W4/dRCkDerbWtsRcS1ftBdq','W75fWRT/WRa','WO3cRCoCseKK','iSkwbY3dGW','WOVdNM4','nKVcIxHcWQL+wCkw','t8k8iCk6WPO','CeldNsXSW6H5','W5y6WPVcPCo8WOXlpmoReetdUaFcSmkVwxZcNmogWQpcHwOrW6qBFGXyW7BcRZZcGSkZ','W5vUWPVdOI8hDfSwWPZcPSocWRy','fWpcGCkLCIpcIui','WQldG1ddT8oaf0P+W5mVW61DW4NdIWddMCofcxW','WONcUXO','BCk6xXJcIG','WRGYWRbOW7j+AW','WOddHgdcGLeKw1q2cee','W5qfWQ/cMCoe','W6qOW5mbWPDr5BwB5Asb5PsjW5tcGLa','WOVdM07dKmor','WPCRWRXjW54','cmk1dsVdPGLs','iSkPdI/dQavplSkJ','WOPKiSkOuCoMDmoh','WP8hW5SFW5pcIa','WOJdNh8rW7tdJ8oT','WQddUf7dOCor','WPOKWPHEW44','W6bvwmk/cq','W5SVWOxcRSoHWOC','W4FcPd0VE8k7WQ4','WQtcUCk9W4WIWRmYWQSEEYftW4/dPmkkwKPlW5nLBSkywbrcW4ldNq','W5OhWPtcIwK','WRGjCt/dQW','tCkDxs0','kZrWxq','WOi9W4FcN3zbmG','W75zqSkz','W7qyW6NcUmkE','W5/dKSkShq','WOZcJCk8W480W5XOW60jjgnLW6BdRSkCz0zgW5XCC8kmc1CdW4hcHSktWOdcMfrwWPldJSoPWR/dKSkYWOyus1xcPc11uq1FW5usg8kdiCkVWOq3DCk+DSouWOddULbL','fxu4WOe','lW5xqZy','mJxcGbdcR8oxBCkYgSkYtsVcJmoiW4xdJmk
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