mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
11 lines
44 KiB
JavaScript
11 lines
44 KiB
JavaScript
|
/*
|
|||
|
京东校园抽风了
|
|||
|
|
|||
|
cron "31 12 * * *" script-path=jd_XinFarm_draw.js, tag=京东校园抽风了
|
|||
|
|
|||
|
*/
|
|||
|
const $ = new Env('京东校园抽奖');
|
|||
|
var iil='jsjiami.com.v7';const l1iIlI=iii1II;(function(l1i1Il,ill1I1,l1i1II,ili111,Ii1I11,IllIli,ii1Ii){return l1i1Il=l1i1Il>>0x6,IllIli='hs',ii1Ii='hs',function(ii1Il,l1iII,iI1Ill,lilI1,IIIi1){const ii1il=iii1II;lilI1='tfi',IllIli=lilI1+IllIli,IIIi1='up',ii1Ii+=IIIi1,IllIli=iI1Ill(IllIli),ii1Ii=iI1Ill(ii1Ii),iI1Ill=0x0;const i1llli=ii1Il();while(!![]&&--ili111+l1iII){try{lilI1=-parseInt(ii1il(0x16e,'V2tl'))/0x1*(parseInt(ii1il(0x18e,'J[^Z'))/0x2)+-parseInt(ii1il(0x246,'Jl2S'))/0x3*(parseInt(ii1il(0x2f1,'kTRC'))/0x4)+parseInt(ii1il(0x1fb,'WHf1'))/0x5*(parseInt(ii1il(0x1d2,'eoA7'))/0x6)+parseInt(ii1il(0x217,'j^v]'))/0x7+parseInt(ii1il(0x286,'7JhL'))/0x8+parseInt(ii1il(0x1ee,'ronH'))/0x9+-parseInt(ii1il(0x2b7,'c6eh'))/0xa*(parseInt(ii1il(0x242,'j$0p'))/0xb);}catch(i1llll){lilI1=iI1Ill;}finally{IIIi1=i1llli[IllIli]();if(l1i1Il<=ili111)iI1Ill?Ii1I11?lilI1=IIIi1:Ii1I11=IIIi1:iI1Ill=IIIi1;else{if(iI1Ill==Ii1I11['replace'](/[kgCtrxBUpRIDVLPGKnJQ=]/g,'')){if(lilI1===l1iII){i1llli['un'+IllIli](IIIi1);break;}i1llli[ii1Ii](IIIi1);}}}}}(l1i1II,ill1I1,function(iI1Ili,llIIiI,iI1111,IIIl1,ii1ii,Iii1,I1I1lI){return llIIiI='\x73\x70\x6c\x69\x74',iI1Ili=arguments[0x0],iI1Ili=iI1Ili[llIIiI](''),iI1111=`\x72\x65\x76\x65\x72\x73\x65`,iI1Ili=iI1Ili[iI1111]('\x76'),IIIl1=`\x6a\x6f\x69\x6e`,(0x1593a3,iI1Ili[IIIl1](''));});}(0x2f40,0xed265,Iii11l,0xbf),Iii11l)&&(iil=0xf86);const notify=$[l1iIlI(0x18b,'U9J@')]()?require(l1iIlI(0x19e,'xgpx')):'',jdCookieNode=$[l1iIlI(0x2cb,'kuxe')]()?require(l1iIlI(0x1bf,'&6hk')):'',common=require(l1iIlI(0x1a8,'a!kU')),{H5st}=require(l1iIlI(0x29e,'$4CB'));let linkId='57oKWatvA44VhAqozRR2pA',cookiesArr=[],cookie='',message;if($[l1iIlI(0x16d,'xgpx')]()){Object[l1iIlI(0x2f3,'WHf1')](jdCookieNode)[l1iIlI(0x1fd,'Jl2S')](i1i11l=>{const iI111I=l1iIlI;cookiesArr[iI111I(0x21f,'vvY(')](jdCookieNode[i1i11l]);});if(process[l1iIlI(0x22f,'9svi')]['JD_DEBUG']&&process[l1iIlI(0x232,'j^v]')][l1iIlI(0x255,'V2tl')]===l1iIlI(0x202,'ronH'))console[l1iIlI(0x204,'pcVs')]=()=>{};}else cookiesArr=[$['getdata'](l1iIlI(0x2bf,'pcVs')),$[l1iIlI(0x1db,'P!$4')]('CookieJD2'),...jsonParse($[l1iIlI(0x2e9,'Di%x')](l1iIlI(0x1e8,'[O9L'))||'[]')[l1iIlI(0x15c,'V2ZB')](i1i11i=>i1i11i[l1iIlI(0x2b8,'@PJ!')])]['filter'](II11l1=>!!II11l1);!(async()=>{const IIIlI1=l1iIlI,Iil1lI={'QPISi':function(IiiliI,iii1iI){return IiiliI+iii1iI;},'zXBXP':function(llIll,il1iII){return llIll===il1iII;},'EHqbn':function(iilli){return iilli();},'Wmduy':IIIlI1(0x18a,'FJ*5'),'dYafd':IIIlI1(0x2db,'[O9L'),'RBqyD':function(IlllIl,II11lI){return IlllIl<II11lI;},'ZzCly':'sNsZO','opWPt':IIIlI1(0x2c4,']eF^'),'GZQKE':function(lI1IIi,I1l11I){return lI1IIi+I1l11I;},'xVnhS':IIIlI1(0x29c,'%72]'),'tjyEc':IIIlI1(0x16a,'%C$l'),'AcTVT':function(Ilil1l){return Ilil1l();},'EVyRt':function(iIIiii,iilll){return iIIiii*iilll;}};if(!cookiesArr[0x0]){if(Iil1lI['zXBXP'](Iil1lI[IIIlI1(0x256,'u4yy')],'kTQYv'))I11iI1[IIIlI1(0x292,'I]Oh')](Iil1lI['QPISi']('',l1lIil['stringify'](IiiIli)));else{$['msg']($[IIIlI1(0x299,'!tKq')],'【提示】请先获取京东账号一cookie\x0a直接使用NobyDa的京东签到获取',Iil1lI[IIIlI1(0x2a2,'ronH')],{'open-url':Iil1lI[IIIlI1(0x167,'w&bH')]});return;}}for(let IlllIi=0x0;Iil1lI[IIIlI1(0x25c,'J[^Z')](IlllIi,cookiesArr[IIIlI1(0x257,'j^v]')]);IlllIi++){if(Iil1lI['zXBXP'](Iil1lI[IIIlI1(0x1ef,'xgpx')],Iil1lI[IIIlI1(0x2d8,'xgpx')])){IiilI1['keys'](IIII1l)[IIIlI1(0x1bd,'kTRC')](i1l1Ii=>{const i1lIiI=IIIlI1;IlI11[i1lIiI(0x2ec,'R[45')](iIIIIl[i1l1Ii]);});if(IlI1I[IIIlI1(0x187,'V2ZB')]['JD_DEBUG']&&Iil1lI['zXBXP'](II11Ii[IIIlI1(0x28f,'pdph')]['JD_DEBUG'],'false'))II11Il[IIIlI1(0x1f1,'J[^Z')]=()=>{};}else{if(cookiesArr[IlllIi]){cookie=cookiesArr[IlllIi],$[IIIlI1(0x1bc,'xX2z')]=decodeURIComponent(cookie[IIIlI1(0x2ed,'P!$4')](/pt_pin=([^; ]+)(?=;?)/)&&cookie[IIIlI1(0x2e8,'a!kU')](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$['index']=Iil1lI[IIIlI1(0x2ae,'kuxe')](IlllIi,0x1),$[IIIlI1(0x2bc,'lnv9')]=!![],$['nickName']='',message='',console[IIIlI1(0x2b2,'7JhL')](IIIlI1(0x181,'U9J@')+$[IIIlI1(0x1c1,'kTRC')]+'】'+($[IIIlI1(0x2ce,'Di%x')]||$['UserName'])+IIIlI1(0x25b,'eoA7'));if(!$['isLogi
|
|||
|
// 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
|