KR/jd_car_play_exchange.js

19 lines
52 KiB
JavaScript
Raw Normal View History

2023-07-27 16:14:01 +08:00
/*
头文字J
兑换
变量:export jd_car_play_exchangeid="兑换ID"
cron:11 11 11 11 *
============Quantumultx===============
[task_local]
#头文字J
11 11 11 11 * jd_car_play_exchange.js, tag=头文字J兑换, enabled=true
*/
const $ = new Env("头文字J兑换");
var version_='jsjiami.com.v7';const llIiIll1=ii1lI1;(function(IIililii,iIlllliI,I1i1II1,l1111IiI,i1iI1lII,illliII1,l1llIIll){return IIililii=IIililii>>0x1,illliII1='hs',l1llIIll='hs',function(lIiiiI1,I1III1I,IiIi1II,lili111I,lI11l1l){const i1l1iili=ii1lI1;lili111I='tfi',illliII1=lili111I+illliII1,lI11l1l='up',l1llIIll+=lI11l1l,illliII1=IiIi1II(illliII1),l1llIIll=IiIi1II(l1llIIll),IiIi1II=0x0;const i1i1lliI=lIiiiI1();while(!![]&&--l1111IiI+I1III1I){try{lili111I=parseInt(i1l1iili(0x2c7,'iwP('))/0x1*(parseInt(i1l1iili(0x22e,'3IRt'))/0x2)+-parseInt(i1l1iili(0xa5,'hq@R'))/0x3*(parseInt(i1l1iili(0x15f,'Jdca'))/0x4)+-parseInt(i1l1iili(0x100,'tKqb'))/0x5*(-parseInt(i1l1iili(0x220,'eF@&'))/0x6)+-parseInt(i1l1iili(0x2cb,'mah4'))/0x7*(-parseInt(i1l1iili(0xf5,'4cHC'))/0x8)+parseInt(i1l1iili(0x1d3,'1qnR'))/0x9*(-parseInt(i1l1iili(0x1ec,'Uzvn'))/0xa)+parseInt(i1l1iili(0x129,'krw^'))/0xb*(-parseInt(i1l1iili(0x137,'px5F'))/0xc)+-parseInt(i1l1iili(0x2c1,'uxij'))/0xd;}catch(IiI1IIii){lili111I=IiIi1II;}finally{lI11l1l=i1i1lliI[illliII1]();if(IIililii<=l1111IiI)IiIi1II?i1iI1lII?lili111I=lI11l1l:i1iI1lII=lI11l1l:IiIi1II=lI11l1l;else{if(IiIi1II==i1iI1lII['replace'](/[xULnQbKOtqVeNCFdSglY=]/g,'')){if(lili111I===I1III1I){i1i1lliI['un'+illliII1](lI11l1l);break;}i1i1lliI[l1llIIll](lI11l1l);}}}}}(I1i1II1,iIlllliI,function(I1Il1l1i,li11iIlI,IIiili1,IIliilI1,Il11Iil,l111lii1,IiliI11l){return li11iIlI='\x73\x70\x6c\x69\x74',I1Il1l1i=arguments[0x0],I1Il1l1i=I1Il1l1i[li11iIlI](''),IIiili1=`\x72\x65\x76\x65\x72\x73\x65`,I1Il1l1i=I1Il1l1i[IIiili1]('\x76'),IIliilI1=`\x6a\x6f\x69\x6e`,(0x1241c6,I1Il1l1i[IIliilI1](''));});}(0x188,0xa1299,iiIil1l1,0xc6),iiIil1l1)&&(version_=iiIil1l1);const l1lilii=$[llIiIll1(0x6f,'Uzvn')]()?require(llIiIll1(0x1e4,'9jf3')):'',ll1l1lii=$[llIiIll1(0x248,'iAR(')]()?require(llIiIll1(0x158,'mah4')):'',IllIIl11=require(llIiIll1(0x76,'x[07'));CryptoJS=$[llIiIll1(0x19d,'1qnG')]()?require(llIiIll1(0x1c3,'eF@&')):CryptoJS;let IlIlliii=[],Iil1iIii='';if($[llIiIll1(0x196,'T[DC')]()){Object[llIiIll1(0x22d,'hq@R')](l1lilii)[llIiIll1(0x298,'Ov$Z')](lIlliII=>{const lI11lIi1=llIiIll1;IlIlliii[lI11lIi1(0x29b,'RP@!')](l1lilii[lIlliII]);});if(process[llIiIll1(0x16a,'iAR(')][llIiIll1(0x108,'dx6*')]&&process[llIiIll1(0x161,'tKqb')][llIiIll1(0x2ba,'YRZu')]===llIiIll1(0x16c,'WeHO'))console[llIiIll1(0x151,'rJ$2')]=()=>{};}else IlIlliii=[$[llIiIll1(0xb7,'UWSp')](llIiIll1(0x12a,'sLpr')),$[llIiIll1(0xdc,'Jdca')](llIiIll1(0x198,'7mhs')),...IliIlIII($[llIiIll1(0x27d,'iAR(')](llIiIll1(0x188,'7mhs'))||'[]')[llIiIll1(0x214,'7mhs')](lIliIlIi=>lIliIlIi[llIiIll1(0x22c,'IZ%^')])][llIiIll1(0x15e,'px5F')](i1IiIlll=>!!i1IiIlll);allMessage='',message='',$[llIiIll1(0x217,'mah4')]=![],$[llIiIll1(0x1ad,'dx6*')]=![],$[llIiIll1(0xe1,'mah4')]=![];function ii1lI1(_0x4cb716,_0xf76f03){const _0x1738a1=iiIil1l1();return ii1lI1=function(_0xaee959,_0x40bc7e){_0xaee959=_0xaee959-0x6f;let _0x2634df=_0x1738a1[_0xaee959];if(ii1lI1['GwMFOi']===undefined){var _0xcaefc2=function(_0x5e24e8){const _0x25d29f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5d2b9e='',_0x162a51='';for(let _0x139653=0x0,_0x14780d,_0x10838c,_0x16886c=0x0;_0x10838c=_0x5e24e8['charAt'](_0x16886c++);~_0x10838c&&(_0x14780d=_0x139653%0x4?_0x14780d*0x40+_0x10838c:_0x10838c,_0x139653++%0x4)?_0x5d2b9e+=String['fromCharCode'](0xff&_0x14780d>>(-0x2*_0x139653&0x6)):0x0){_0x10838c=_0x25d29f['indexOf'](_0x10838c);}for(let _0x4da981=0x0,_0x3db102=_0x5d2b9e['length'];_0x4da981<_0x3db102;_0x4da981++){_0x162a51+='%'+('00'+_0x5d2b9e['charCodeAt'](_0x4da981)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x162a51);};const _0x4c2d93=function(_0x3186dd,_0x5bd705){let _0x1bad6e=[],_0x24f04d=0x0,_0x6bfe70,_0x555891='';_0x3186dd=_0xcaefc2(_0x3186dd);let _0x4998a7;for(_0x4998a7=0x0;_0x4998a7<0x100;_0x4998a7++){_0x1bad6e[_0x4998a7]=_0x4998a7;}for(_0x4998a7=0x0;_0x4998a7<0x100;_0x4998a7++){_0x24f04d=(_0x24f04d+_0x1bad6e[_0x4998a7]+_0x5bd705['charCodeAt'](_0x4998a7%_0x5bd705['length']))%0x100,_0x6bfe70=_0x1bad6e[_0x4998a7],_0x1bad6e[_0x4998a7]=_0x1bad6e[_0x24f04d],_0x1bad6e[_0x24f04d]=_0x6bfe70
// prettier-ignore
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