faker2/jd_opencard_0808.js

17 lines
69 KiB
JavaScript
Raw Normal View History

2024-08-08 07:07:54 +00:00
/*
8.8-8.15 初秋有礼 大牌惊喜
不会自动运行请在有水的时候运行
//export jd_opencard_draw="3" //抽奖次数 3
//export jd_opencard_break="true" //IP限制后继续执行true/false
cron "1 1 1 1 *" script-path=jd_opencard_0808.js
*/
const $ = new Env('8.8-8.15 初秋有礼 大牌惊喜')
var il='jsjiami.com.v7';function iii1II(_0x2fdcdf,_0x6ef473){const _0x27a303=Iii11l();return iii1II=function(_0x27b0ba,_0x192c01){_0x27b0ba=_0x27b0ba-0x149;let _0x4f0777=_0x27a303[_0x27b0ba];if(iii1II['KQlXmE']===undefined){var _0x25da74=function(_0x588e1a){const _0x25c0fb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5c483b='',_0x10847f='';for(let _0x7b903b=0x0,_0x14677d,_0x1d8f5d,_0x13c4bb=0x0;_0x1d8f5d=_0x588e1a['charAt'](_0x13c4bb++);~_0x1d8f5d&&(_0x14677d=_0x7b903b%0x4?_0x14677d*0x40+_0x1d8f5d:_0x1d8f5d,_0x7b903b++%0x4)?_0x5c483b+=String['fromCharCode'](0xff&_0x14677d>>(-0x2*_0x7b903b&0x6)):0x0){_0x1d8f5d=_0x25c0fb['indexOf'](_0x1d8f5d);}for(let _0x440e83=0x0,_0x37fa2c=_0x5c483b['length'];_0x440e83<_0x37fa2c;_0x440e83++){_0x10847f+='%'+('00'+_0x5c483b['charCodeAt'](_0x440e83)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x10847f);};const _0x1321ac=function(_0x8e5754,_0x3b21ef){let _0x16dc60=[],_0x2597ba=0x0,_0x13f701,_0x349b9a='';_0x8e5754=_0x25da74(_0x8e5754);let _0x38ac94;for(_0x38ac94=0x0;_0x38ac94<0x100;_0x38ac94++){_0x16dc60[_0x38ac94]=_0x38ac94;}for(_0x38ac94=0x0;_0x38ac94<0x100;_0x38ac94++){_0x2597ba=(_0x2597ba+_0x16dc60[_0x38ac94]+_0x3b21ef['charCodeAt'](_0x38ac94%_0x3b21ef['length']))%0x100,_0x13f701=_0x16dc60[_0x38ac94],_0x16dc60[_0x38ac94]=_0x16dc60[_0x2597ba],_0x16dc60[_0x2597ba]=_0x13f701;}_0x38ac94=0x0,_0x2597ba=0x0;for(let _0x350b19=0x0;_0x350b19<_0x8e5754['length'];_0x350b19++){_0x38ac94=(_0x38ac94+0x1)%0x100,_0x2597ba=(_0x2597ba+_0x16dc60[_0x38ac94])%0x100,_0x13f701=_0x16dc60[_0x38ac94],_0x16dc60[_0x38ac94]=_0x16dc60[_0x2597ba],_0x16dc60[_0x2597ba]=_0x13f701,_0x349b9a+=String['fromCharCode'](_0x8e5754['charCodeAt'](_0x350b19)^_0x16dc60[(_0x16dc60[_0x38ac94]+_0x16dc60[_0x2597ba])%0x100]);}return _0x349b9a;};iii1II['QlcLtS']=_0x1321ac,_0x2fdcdf=arguments,iii1II['KQlXmE']=!![];}const _0x477ccc=_0x27a303[0x0],_0x45f10f=_0x27b0ba+_0x477ccc,_0x50d7a7=_0x2fdcdf[_0x45f10f];return!_0x50d7a7?(iii1II['TGtQFj']===undefined&&(iii1II['TGtQFj']=!![]),_0x4f0777=iii1II['QlcLtS'](_0x4f0777,_0x192c01),_0x2fdcdf[_0x45f10f]=_0x4f0777):_0x4f0777=_0x50d7a7,_0x4f0777;},iii1II(_0x2fdcdf,_0x6ef473);}const l1Iii=iii1II;(function(IIlI11,iIIll1,llIIII,ilI11I,ili1I,iilIIl,i1Iili){return IIlI11=IIlI11>>0x2,iilIIl='hs',i1Iili='hs',function(i1Iill,l1IiI,l1lill,i1li1,iIIllI){const I1Ilii=iii1II;i1li1='tfi',iilIIl=i1li1+iilIIl,iIIllI='up',i1Iili+=iIIllI,iilIIl=l1lill(iilIIl),i1Iili=l1lill(i1Iili),l1lill=0x0;const I1Ill1=i1Iill();while(!![]&&--ilI11I+l1IiI){try{i1li1=-parseInt(I1Ilii(0x1b9,'aGyY'))/0x1*(-parseInt(I1Ilii(0x3b4,'A[Z5'))/0x2)+-parseInt(I1Ilii(0x1fc,'aGyY'))/0x3+parseInt(I1Ilii(0x2ae,'p^xU'))/0x4+parseInt(I1Ilii(0x463,'fyGH'))/0x5*(-parseInt(I1Ilii(0x151,'xCat'))/0x6)+-parseInt(I1Ilii(0x465,'qMhS'))/0x7+parseInt(I1Ilii(0x181,'Ekjf'))/0x8+parseInt(I1Ilii(0x2e6,'$rNy'))/0x9;}catch(ili11){i1li1=l1lill;}finally{iIIllI=I1Ill1[iilIIl]();if(IIlI11<=ilI11I)l1lill?ili1I?i1li1=iIIllI:ili1I=iIIllI:l1lill=iIIllI;else{if(l1lill==ili1I['replace'](/[tklXLJSEReDMwYpOPGu=]/g,'')){if(i1li1===l1IiI){I1Ill1['un'+iilIIl](iIIllI);break;}I1Ill1[i1Iili](iIIllI);}}}}}(llIIII,iIIll1,function(IiIiIi,llIIIl,IIlI1I,llIIIi,IiIiIl,I1Ilil,l1I1I1){return llIIIl='\x73\x70\x6c\x69\x74',IiIiIi=arguments[0x0],IiIiIi=IiIiIi[llIIIl](''),IIlI1I=`\x72\x65\x76\x65\x72\x73\x65`,IiIiIi=IiIiIi[IIlI1I]('\x76'),llIIIi=`\x6a\x6f\x69\x6e`,(0x17ce4a,IiIiIi[llIIIi](''));});}(0x310,0x785e0,Iii11l,0xc6),Iii11l)&&(il=`\x7e3`);const jdCookie=require(l1Iii(0x2c1,'@E9f')),notify=require(l1Iii(0x261,'Ekjf')),opencard_draw=process['env'][l1Iii(0x1cc,'g5^f')]||0x3,hotbreak=process[l1Iii(0x22c,'C3cZ')][l1Iii(0x2eb,'P5Wp')]===l1Iii(0x3df,'Ih!u'),isNotify=process[l1Iii(0x223,'#[lw')]['jd_opencard_notify']===l1Iii(0x190,'TvzV'),common=require(l1Iii(0x403,'fyGH')),getToken=require(l1Iii(0x224,'eOyY')),{lzdz1_savePrize}=require(l1Iii(0x400,'#[lw'));common[l1Iii(0x182,'!w4H')]()==='关闭'?$[l1Iii(0x42c,')l4g')]=0x3e8:$[l1Iii(0x1c7,'qMhS')]=0x0;function Iii11l(){const IiIiII=(function(){return[...[il,'POjMsjliatSmLRiGP.lcEJeopmS.ukv
// 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