mirror of https://github.com/6dylan6/jdpro.git
18 lines
82 KiB
JavaScript
18 lines
82 KiB
JavaScript
|
/*
|
||
|
头文字J兑换
|
||
|
|
||
|
每日10点刷新库存
|
||
|
|
||
|
变量:export jd_car_play_exchangeid="兑换ID"
|
||
|
|
||
|
cron:1 1 1 1 *
|
||
|
============Quantumultx===============
|
||
|
[task_local]
|
||
|
#头文字J
|
||
|
1 1 11 1 * jd_car_exc.js, tag=头文字J兑换, enabled=true
|
||
|
*/
|
||
|
const $ = new Env("头文字J兑换");
|
||
|
var _0xodA='jsjiami.com.v7';const _0x32ac9d=_0x153c;(function(_0x1f1a9c,_0x38fa6d,_0xe5cb0b,_0x35f4c1,_0x2ea7f7,_0x3f2d6b,_0x4b3a08){return _0x1f1a9c=_0x1f1a9c>>0x7,_0x3f2d6b='hs',_0x4b3a08='hs',function(_0x50b976,_0x442218,_0xa397e4,_0x22ba0b,_0x412cbb){const _0xbc9ebd=_0x153c;_0x22ba0b='tfi',_0x3f2d6b=_0x22ba0b+_0x3f2d6b,_0x412cbb='up',_0x4b3a08+=_0x412cbb,_0x3f2d6b=_0xa397e4(_0x3f2d6b),_0x4b3a08=_0xa397e4(_0x4b3a08),_0xa397e4=0x0;const _0x18ced8=_0x50b976();while(!![]&&--_0x35f4c1+_0x442218){try{_0x22ba0b=parseInt(_0xbc9ebd(0x181,'Ferz'))/0x1*(-parseInt(_0xbc9ebd(0x29b,'YVC4'))/0x2)+-parseInt(_0xbc9ebd(0x35f,'2!u('))/0x3+parseInt(_0xbc9ebd(0x4a1,'ne^]'))/0x4+parseInt(_0xbc9ebd(0x429,'dHe3'))/0x5*(parseInt(_0xbc9ebd(0x259,'%Lir'))/0x6)+-parseInt(_0xbc9ebd(0x159,'@k8X'))/0x7+parseInt(_0xbc9ebd(0x132,'ULHX'))/0x8*(parseInt(_0xbc9ebd(0x24c,'ne^]'))/0x9)+parseInt(_0xbc9ebd(0x4cd,'%Lir'))/0xa;}catch(_0x194b06){_0x22ba0b=_0xa397e4;}finally{_0x412cbb=_0x18ced8[_0x3f2d6b]();if(_0x1f1a9c<=_0x35f4c1)_0xa397e4?_0x2ea7f7?_0x22ba0b=_0x412cbb:_0x2ea7f7=_0x412cbb:_0xa397e4=_0x412cbb;else{if(_0xa397e4==_0x2ea7f7['replace'](/[WMSYwDyFBdVCuIqgApHkf=]/g,'')){if(_0x22ba0b===_0x442218){_0x18ced8['un'+_0x3f2d6b](_0x412cbb);break;}_0x18ced8[_0x4b3a08](_0x412cbb);}}}}}(_0xe5cb0b,_0x38fa6d,function(_0x8913d2,_0x2e9747,_0x560e57,_0x31f881,_0xbbd7ea,_0xd0dd69,_0x10c894){return _0x2e9747='\x73\x70\x6c\x69\x74',_0x8913d2=arguments[0x0],_0x8913d2=_0x8913d2[_0x2e9747](''),_0x560e57=`\x72\x65\x76\x65\x72\x73\x65`,_0x8913d2=_0x8913d2[_0x560e57]('\x76'),_0x31f881=`\x6a\x6f\x69\x6e`,(0x14d143,_0x8913d2[_0x31f881](''));});}(0x5e00,0xe12aa,_0xeae9,0xbe),_0xeae9)&&(_0xodA=0x4d6c);const _0x2c75ea=$[_0x32ac9d(0x275,'YVC4')]()?require(_0x32ac9d(0x295,'VN*M')):'',_0x56843a=$[_0x32ac9d(0x385,'V)gp')]()?require(_0x32ac9d(0x2ab,'4S%$')):'',_0x14321f=require(_0x32ac9d(0x102,'J0j7'));if(process[_0x32ac9d(0x451,'ne^]')][_0x32ac9d(0x3c5,'^Eye')])try{require(_0x32ac9d(0x3bb,')lCx')),ccc=require(_0x32ac9d(0x4b4,'gfR#')),$[_0x32ac9d(0x3ea,'@uqO')]=ccc[_0x32ac9d(0x2df,'lK%N')]($[_0x32ac9d(0x1f5,'6(JF')][_0x32ac9d(0x183,'ZkXG')]($)),$[_0x32ac9d(0x20a,'w!c8')]=ccc[_0x32ac9d(0x4c7,'w!c8')]($[_0x32ac9d(0x173,'Eyv]')][_0x32ac9d(0x200,'@uqO')]($));}catch{$[_0x32ac9d(0x423,'arrH')](_0x32ac9d(0x170,'YVC4')),$[_0x32ac9d(0x2a9,'VN*M')]=$[_0x32ac9d(0x122,']rCB')],$[_0x32ac9d(0x238,'F1o4')]=$[_0x32ac9d(0x473,'Ferz')];}else $[_0x32ac9d(0x3a6,'6%Uw')]=$[_0x32ac9d(0x118,'AlaX')],$[_0x32ac9d(0x389,'V)gp')]=$[_0x32ac9d(0x1ec,'V)gp')];function _0xeae9(){const _0x4dc64=(function(){return[...[_0xodA,'HYWjsgjIiBCapkmqDfi.coMMm.dYDvwSV7yAFSwu==','v204ytu','W6iBWQfPW4S2W4O','WOjJWOdcQYm','WO9kk8o2WQ0YW4aSjstdJfa','xNelsWtcGWG','qxHalJhcJSkiwSoSlmozbCk3W5VdKSkxWQ7cUKraW4hcJ8k6WPSLcSk6WOj8b0ynW5FcJSk3W6fPW4rAALxcSd1HW5zkW5xcVbLCW6mAmColW61neSoNW44SWPBcJc/cSa','WRHZWOFcUGm','E3WR','WPddRYe','WQipDmkMW7y','kSk0n8ksxa','e2tdLmkYCJ7cOmoKW4K','WQ4yW4JcKW','F3m/W59n','WPjPhmoBWPW','WO5qWQVcQHG','guFdImowjwqXxW','sSkQDrKq','W7JdMmooixC4WRG','pCk4W7RdGra','WR4+tvlcPSkd','C8kvCHyc','W47dMXpcGCoV','WOuDwSky','yKyFWQVcIa','qvTWgIK','WRNdVqC','44gz5O+P56sx44k36k6M5yAG6i2d5yYHWR4EiIhdNwXs55Q05OYU5l2755wwWQe3WQBcH1pcI+EyKUs4Ros4MEEUJowlTEImO+wmUa','W5FdJEwfUEAnRCoOio+8GW','mmklamklDSkH','rWNdR8kUia','WO5CWOpcUXC','fGZdRwlcNJ9A','WPfRFSo5WRi','zfy9WRZcM8otWQqPhmowjCkLW4KOW5zVeW','WRT7pmouWOC','WRXJjKhcHG','WRPRt8oDWP4WWOq','C8kGW5ZdKZdcKa','wmkBcsldIa','dgRdO8kLAa','wSkSWPhdN8oFg8oQW6D6fmkZESkJW4hcJmktmtalW6Lgf1ShFmoBxColkbj6WPldTmokW73cSCkUW6ddQaGPFCktWO/cGw81xxmWumoKW7nTWR9MsCo7WRJcTYuSemoA','zmkDyJi6','WOhcO3xcOua','kSkLWP3cGa','WOqPW5hdK1BdJxNcV8o6C8kvWPq','WOaFwSkWjq','F8kwW6NdL2m','r8kJDaG','DSoopq','W6FdJSoz','EHmNxG','WQxdQ8kAlvG','W47cHSoWuJWyxG','WR3cJL3cMhLUW6tdVN3cQGZdRG','q8kbeqddQK7dGCoVbwnt','FXeNvH/dPcRcTSoDWQbz','WPLJW5KTWOC','Chq3W45qnG','fSoGWQJcN0aIWPxcOmkdW4Kcmqe','aqJdQ2FcKJG','qmkRW7ZdHbb4W4tcN8kZW70AnIddKL7cGW','cgbNW5uF','WQnbW74+WPxcPGW','zdxdUSkkmmokWQaA','W73cV0dcSmoS','WPqps8klcmoV','vhaUW7DE','WPCHW4tdTee','yCkXjmkOcCoJD8k6c8oJxmkEW6i','FH7dVvlcHW','WRTGt8ogWQS','hM9eW54A','se4OW
|
||
|
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
|
||
|
|