jdpro/jd_rmvcart.js

6 lines
46 KiB
JavaScript
Raw Normal View History

2024-01-04 13:56:55 +00:00
/*
1 1 1 1 * jd_rmvcart.js
*/
const $ = new Env('清空购物车');
2024-01-04 15:38:05 +00:00
var _0xodp='jsjiami.com.v7';const _0x329f14=_0x14aa;(function(_0x72529c,_0x578261,_0x275d7c,_0x9af14a,_0x552192,_0x40ce4d,_0x12941){return _0x72529c=_0x72529c>>0x7,_0x40ce4d='hs',_0x12941='hs',function(_0x42b907,_0x141690,_0x4590bd,_0x5ca21f,_0x563b4e){const _0x36e44d=_0x14aa;_0x5ca21f='tfi',_0x40ce4d=_0x5ca21f+_0x40ce4d,_0x563b4e='up',_0x12941+=_0x563b4e,_0x40ce4d=_0x4590bd(_0x40ce4d),_0x12941=_0x4590bd(_0x12941),_0x4590bd=0x0;const _0x26aeae=_0x42b907();while(!![]&&--_0x9af14a+_0x141690){try{_0x5ca21f=-parseInt(_0x36e44d(0x128,'Cu2r'))/0x1*(parseInt(_0x36e44d(0x13f,'uQeu'))/0x2)+parseInt(_0x36e44d(0x11c,'ZIkI'))/0x3*(parseInt(_0x36e44d(0x1df,'POL$'))/0x4)+parseInt(_0x36e44d(0x1ee,'PG9L'))/0x5*(parseInt(_0x36e44d(0x136,'R0Fa'))/0x6)+parseInt(_0x36e44d(0x1a2,'OqV7'))/0x7+-parseInt(_0x36e44d(0x298,'zWm$'))/0x8*(-parseInt(_0x36e44d(0x17c,'(Iq('))/0x9)+parseInt(_0x36e44d(0x215,'Cu2r'))/0xa+-parseInt(_0x36e44d(0x28e,'R)&d'))/0xb;}catch(_0x3445ba){_0x5ca21f=_0x4590bd;}finally{_0x563b4e=_0x26aeae[_0x40ce4d]();if(_0x72529c<=_0x9af14a)_0x4590bd?_0x552192?_0x5ca21f=_0x563b4e:_0x552192=_0x563b4e:_0x4590bd=_0x563b4e;else{if(_0x4590bd==_0x552192['replace'](/[tFDKeuWQGCByYXHU=]/g,'')){if(_0x5ca21f===_0x141690){_0x26aeae['un'+_0x40ce4d](_0x563b4e);break;}_0x26aeae[_0x12941](_0x563b4e);}}}}}(_0x275d7c,_0x578261,function(_0x1dd9f2,_0x2c1c26,_0x25abd9,_0x26257b,_0x3e83b8,_0x546aa7,_0x40df63){return _0x2c1c26='\x73\x70\x6c\x69\x74',_0x1dd9f2=arguments[0x0],_0x1dd9f2=_0x1dd9f2[_0x2c1c26](''),_0x25abd9=`\x72\x65\x76\x65\x72\x73\x65`,_0x1dd9f2=_0x1dd9f2[_0x25abd9]('\x76'),_0x26257b=`\x6a\x6f\x69\x6e`,(0x14eb8e,_0x1dd9f2[_0x26257b](''));});}(0x6500,0x8d56a,_0x5257,0xcc),_0x5257)&&(_0xodp=0x264a);const _0x3dc5ad=$[_0x329f14(0x15f,'uQeu')]()?require(_0x329f14(0x1b3,'G79H')):'',_0x2e8f45=$[_0x329f14(0x1e5,'3)x9')]()?require(_0x329f14(0x218,'oASj')):'',_0x1beb46=require(_0x329f14(0x197,'oASj')),_0x51b991=require(_0x329f14(0x29c,'[8h[')),_0x273093=process[_0x329f14(0x2c3,'5BwL')][_0x329f14(0x1c9,'ZIkI')]||_0x329f14(0x166,'qN^o');let _0x2be314=!![],_0x2c2450=[],_0x1d21a1='',_0x113522='';function _0x5257(){const _0x1b6973=(function(){return[...[_0xodp,'KeyQjFystjtiGaFWmitX.ycDUBoCYmYH.v7yXKuC==','W4ddLeOtqtRdIH4','WOnBW4yRyq','FCkNESkhBa','r3lcN8k/WQG','v1ZcKmk8WOG','W5RcGrWBW7ZcKrCb','cKldICoMkrRcHv43E18v','a8kTW4dcS0ldG8k3WRtdUqfkWOZdRLGizJJdImoDkN4twrqGamk8a8oKW7VdP8o3FSoYW4JdTGldGflcG8kWzZzeW73dMSoJk8kzemkzW5atiSkfz8odW4aThCojW4ngrubwDJnpq8oxWOZcL8o2W6XCW6GWDCkeWOddR8kRDuddG8kTWOP8l8oYWRRdNd3dRfLoW4tcQJ/dIJ7cKCk5DSo0W6BdHIjVwx11g8obEcTlsMKwhIJcO1qVW6pcLmk8i8oBWOVdHahcRrldJ0nJqmkQd3GuW7XXW4BdVYJcTSkjWOvYWQ7cJmknWPJcP34','W6T7WPOusq','FSo0CSoEW4K','CComBCoIW5W','uqNcNmkXFeVcGa','WRBcPNL5Aa','W7ddJSkcD8o8','W5ddIcPtWQe','5y6B5RMO56Uz6lAw54I76l6M','ualdKmop','CdFdHSoPpG','W6/dMdn0lq','retcI2C','EwyUA0K','AYJcMCkL','W4ZdPXPYea','dxNdHCkWEq','W5RdHGzxahaqW4hcSmowW5VcUe/dV8ozWQG','dwhdO8kDx8kdfG','WRFcMK7cTYf+','W5FcIcldNJSQW44','bSk4W53cRwlcKSoT','W4pcMd3dUG','W7P3WP8bmwhcRSojWP4VWOTAsmoCW6XIxSk2lmoRW47dImofoSoTWPTXjHCtnCoVWRPRAL01gmoBWQhcNSojeSoT','WRSIW6/cTSkk','FmkjfwHy','W4RdRJ98WRW','W6VdIbyzbSk1W5ZdO8o8W6n2cmoic8kTomobvqThW4pdOJddI8knFCk9AdfeW6ZcVmowyb3cOSkBW5fNWOvSWPC','WPdcVSkTEHi','bIaXWQPY','umkYx8kerW','tK/cV8kSWOO','r34sDufpW5zS','WPZcJmoaWQC','dZ4XWP1O','F8oDwa','aMddSSk0s8kegWG','D8kfbxzK','aq7dVSkqFa','WOZcPM9LxG','W7FcKXVdGG4','WPxcKmoj','W5JdUmkb','W6JdIGLvW7TnvG','feVdNmoYkW7cNwinE2ajx8kW','jWVdOCkaxW','sbNdL8oliCo6W4fVWQtcNXBdOSkmFmo1W413wLS','WP/dHaRdG3q','aSksW5xcSfO','lJ7cNdK7','WQpORjBPHk/MLAdNMPlLV7hOJ6VLJ53dTHv1W4i2mq','c8khs8knWQy','W4ldStfDjq','W7BcLmoRsv7dImotu8oeW6XmlG','W6xcNs0IW74','W5JcUbddPrK','WPmfWPxdS2KV','WO8bWONdP3G','vXxdVmoym8kYWPOFWQldJ08','w8kVvSkLyIW','vXJcMSk7Efy','E8okWR0zma','h8kwsCk7WQm','vmkierfE','ESo5W53cNSk/sq','sSkVnYv4','WOtcTK3dHc4','zh0KsKS','W5tdOWGneSo4WOVcR8o0W5b6dSoteq','D0/cHCk4WQO','W7NcHWuzW57cNbTlCWufWPFcQ3tcNSoUzKTjcSoKW5hdKLuiW4XtfN0cW54QdSogi8ohEmkegCkNW6NcTwq+DKhcHu15W4ObW6NcNhxdOhz+rNWbWOxdMrhdPwVdSKXOWQChfSkxWOVcS8o9uSoChSo/C1FdGqFdT8kVWORcJ8oaW6bGWONdISk9lIJdO8k5WRBcNmkLhKddQbldTg5
2024-01-04 13:56:55 +00:00
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