jdpro/jd_rmvcart.js

6 lines
50 KiB
JavaScript
Raw Normal View History

2024-01-04 13:56:55 +00:00
/*
1 1 1 1 * jd_rmvcart.js
*/
const $ = new Env('清空购物车');
var _0xoda='jsjiami.com.v7';const _0x12a17e=_0x9eff;(function(_0x2f085b,_0x387077,_0x5466aa,_0x300add,_0xa67934,_0x5b5a27,_0x4e4ec2){return _0x2f085b=_0x2f085b>>0x2,_0x5b5a27='hs',_0x4e4ec2='hs',function(_0x27fff9,_0x2d0e49,_0x357a20,_0xdc823,_0x279f88){const _0x2e66ad=_0x9eff;_0xdc823='tfi',_0x5b5a27=_0xdc823+_0x5b5a27,_0x279f88='up',_0x4e4ec2+=_0x279f88,_0x5b5a27=_0x357a20(_0x5b5a27),_0x4e4ec2=_0x357a20(_0x4e4ec2),_0x357a20=0x0;const _0x4a02e9=_0x27fff9();while(!![]&&--_0x300add+_0x2d0e49){try{_0xdc823=-parseInt(_0x2e66ad(0x1aa,'[u@G'))/0x1*(-parseInt(_0x2e66ad(0x176,'tG*e'))/0x2)+parseInt(_0x2e66ad(0x2b9,'x3II'))/0x3*(parseInt(_0x2e66ad(0x28b,'09oz'))/0x4)+parseInt(_0x2e66ad(0x1d1,'d*o)'))/0x5+parseInt(_0x2e66ad(0x295,'n)wF'))/0x6*(-parseInt(_0x2e66ad(0x2b7,'EvHj'))/0x7)+-parseInt(_0x2e66ad(0x2c2,'d*o)'))/0x8*(-parseInt(_0x2e66ad(0x180,'$0#2'))/0x9)+parseInt(_0x2e66ad(0x31a,']jh1'))/0xa+-parseInt(_0x2e66ad(0x208,'Sr]#'))/0xb;}catch(_0x365d03){_0xdc823=_0x357a20;}finally{_0x279f88=_0x4a02e9[_0x5b5a27]();if(_0x2f085b<=_0x300add)_0x357a20?_0xa67934?_0xdc823=_0x279f88:_0xa67934=_0x279f88:_0x357a20=_0x279f88;else{if(_0x357a20==_0xa67934['replace'](/[YgkfdLuDMQlPRpVTwBh=]/g,'')){if(_0xdc823===_0x2d0e49){_0x4a02e9['un'+_0x5b5a27](_0x279f88);break;}_0x4a02e9[_0x4e4ec2](_0x279f88);}}}}}(_0x5466aa,_0x387077,function(_0x4dc629,_0x5ea360,_0x3fb8bd,_0x56aecd,_0x58ebf0,_0x550f2e,_0xf43580){return _0x5ea360='\x73\x70\x6c\x69\x74',_0x4dc629=arguments[0x0],_0x4dc629=_0x4dc629[_0x5ea360](''),_0x3fb8bd=`\x72\x65\x76\x65\x72\x73\x65`,_0x4dc629=_0x4dc629[_0x3fb8bd]('\x76'),_0x56aecd=`\x6a\x6f\x69\x6e`,(0x14eb06,_0x4dc629[_0x56aecd](''));});}(0x300,0x728fb,_0x4215,0xc2),_0x4215)&&(_0xoda=_0x12a17e(0x279,'ea6^'));const _0x54b927=$[_0x12a17e(0x31d,'F*88')]()?require(_0x12a17e(0x2af,'hUs8')):'',_0x3f4b38=$[_0x12a17e(0x1dd,'Qu2q')]()?require(_0x12a17e(0x2d9,']vZ(')):'',_0x145d73=require(_0x12a17e(0x2f9,']jh1')),_0x17615d=require(_0x12a17e(0x318,'3$HR')),_0x3c2984=process[_0x12a17e(0x287,'1zXG')][_0x12a17e(0x286,'jTY[')]||_0x12a17e(0x183,'Qu2q');function _0x9eff(_0x348f4d,_0x320a53){const _0x3f678b=_0x4215();return _0x9eff=function(_0xde8b8b,_0x2a6a4a){_0xde8b8b=_0xde8b8b-0x146;let _0x4215b0=_0x3f678b[_0xde8b8b];if(_0x9eff['StpCOK']===undefined){var _0x9effff=function(_0x39720d){const _0x43a74b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x500ec3='',_0x4ef361='',_0x4c41c1=_0x500ec3+_0x9effff;for(let _0x25c6c0=0x0,_0x2592b9,_0x138487,_0xefafc=0x0;_0x138487=_0x39720d['charAt'](_0xefafc++);~_0x138487&&(_0x2592b9=_0x25c6c0%0x4?_0x2592b9*0x40+_0x138487:_0x138487,_0x25c6c0++%0x4)?_0x500ec3+=_0x4c41c1['charCodeAt'](_0xefafc+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x2592b9>>(-0x2*_0x25c6c0&0x6)):_0x25c6c0:0x0){_0x138487=_0x43a74b['indexOf'](_0x138487);}for(let _0x462ee3=0x0,_0x38fd3f=_0x500ec3['length'];_0x462ee3<_0x38fd3f;_0x462ee3++){_0x4ef361+='%'+('00'+_0x500ec3['charCodeAt'](_0x462ee3)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4ef361);};const _0x29b4bd=function(_0x2f0225,_0x176e58){let _0x3443fc=[],_0x1f8fca=0x0,_0x4a5200,_0x1c83e3='';_0x2f0225=_0x9effff(_0x2f0225);let _0x54c4d2;for(_0x54c4d2=0x0;_0x54c4d2<0x100;_0x54c4d2++){_0x3443fc[_0x54c4d2]=_0x54c4d2;}for(_0x54c4d2=0x0;_0x54c4d2<0x100;_0x54c4d2++){_0x1f8fca=(_0x1f8fca+_0x3443fc[_0x54c4d2]+_0x176e58['charCodeAt'](_0x54c4d2%_0x176e58['length']))%0x100,_0x4a5200=_0x3443fc[_0x54c4d2],_0x3443fc[_0x54c4d2]=_0x3443fc[_0x1f8fca],_0x3443fc[_0x1f8fca]=_0x4a5200;}_0x54c4d2=0x0,_0x1f8fca=0x0;for(let _0x465327=0x0;_0x465327<_0x2f0225['length'];_0x465327++){_0x54c4d2=(_0x54c4d2+0x1)%0x100,_0x1f8fca=(_0x1f8fca+_0x3443fc[_0x54c4d2])%0x100,_0x4a5200=_0x3443fc[_0x54c4d2],_0x3443fc[_0x54c4d2]=_0x3443fc[_0x1f8fca],_0x3443fc[_0x1f8fca]=_0x4a5200,_0x1c83e3+=String['fromCharCode'](_0x2f0225['charCodeAt'](_0x465327)^_0x3443fc[(_0x3443fc[_0x54c4d2]+_0x3443fc[_0x1f8fca])%0x100]);}return _0x1c83e3;};_0x9eff['KwOWfs']=_0x29b4bd,_0x348f4d=arguments,_0x9eff['StpCOK']=!![];}const _0x1259db=_0x3f678b[0x0],_0x296c70=_0xde8b8b+_0x1259db,_0x584b95=_0x348f4d[_0x296c70];if(
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