KR/jd_zqkk.js

15 lines
80 KiB
JavaScript
Raw Normal View History

2023-09-26 12:20:57 +08:00
/*
9.29 中秋开卡
cron:1 13 26-29 9 *
============Quantumultx===============
[task_local]
#9.29 中秋开卡
1 13 26-29 9 * jd_zqkk.js, tag=9.29 中秋开卡, enabled=true
*/
const $ = new Env("9.29 中秋开卡");
var version_='jsjiami.com.v7';const Ii1iIIi=lllii111;(function(l1i1lli1,lil11i1,iiI1I1Il,Ii1llIl1,II1ll1Ii,liiIliI1,iIiI1Ii){return l1i1lli1=l1i1lli1>>0x9,liiIliI1='hs',iIiI1Ii='hs',function(iiilIl1,I1IllI1l,liiI1ll,li111ilI,III11I1I){const iiIl1lil=lllii111;li111ilI='tfi',liiIliI1=li111ilI+liiIliI1,III11I1I='up',iIiI1Ii+=III11I1I,liiIliI1=liiI1ll(liiIliI1),iIiI1Ii=liiI1ll(iIiI1Ii),liiI1ll=0x0;const I1I1iil=iiilIl1();while(!![]&&--Ii1llIl1+I1IllI1l){try{li111ilI=parseInt(iiIl1lil(0x367,'F4KK'))/0x1+-parseInt(iiIl1lil(0x24c,'INBp'))/0x2+-parseInt(iiIl1lil(0x353,'HHnH'))/0x3*(parseInt(iiIl1lil(0x39f,'!FV&'))/0x4)+-parseInt(iiIl1lil(0x1c1,'@$BL'))/0x5+-parseInt(iiIl1lil(0x411,'eaJ5'))/0x6*(parseInt(iiIl1lil(0x1c5,'BuM8'))/0x7)+-parseInt(iiIl1lil(0x3f0,'*Fl5'))/0x8+-parseInt(iiIl1lil(0x179,']d!H'))/0x9*(-parseInt(iiIl1lil(0x174,'9jS['))/0xa);}catch(iiliiII1){li111ilI=liiI1ll;}finally{III11I1I=I1I1iil[liiIliI1]();if(l1i1lli1<=Ii1llIl1)liiI1ll?II1ll1Ii?li111ilI=III11I1I:II1ll1Ii=III11I1I:liiI1ll=III11I1I;else{if(liiI1ll==II1ll1Ii['replace'](/[rfWxNTgyhkRlwIpMuHbFP=]/g,'')){if(li111ilI===I1IllI1l){I1I1iil['un'+liiIliI1](III11I1I);break;}I1I1iil[iIiI1Ii](III11I1I);}}}}}(iiI1I1Il,lil11i1,function(Iliiiill,lI11Iiii,lli1iiiI,iIII1iII,lliI1l1,IIlIili1,liI1iI11){return lI11Iiii='\x73\x70\x6c\x69\x74',Iliiiill=arguments[0x0],Iliiiill=Iliiiill[lI11Iiii](''),lli1iiiI=`\x72\x65\x76\x65\x72\x73\x65`,Iliiiill=Iliiiill[lli1iiiI]('\x76'),iIII1iII=`\x6a\x6f\x69\x6e`,(0x13ff84,Iliiiill[iIII1iII](''));});}(0x17a00,0x4c8cf,ll1lI11,0xbf),ll1lI11)&&(version_=ll1lI11);const i1lli1ll=$['isNode']()?require('./sendNotify'):'',lIii1lIi=$[Ii1iIIi(0x343,'*Fl5')]()?require(Ii1iIIi(0x323,'QCV8')):'',iII1liil=require(Ii1iIIi(0x2c7,'@Htx')),ill1i11i=require('./function/krh5st');let Iilliili=Ii1iIIi(0x425,'&5sd'),I1IIii1I=[],l1Iii1II='',li11llI1='',iliI1lI='';if($[Ii1iIIi(0x3a3,'eaJ5')]()){if(process['env']['jd_szxyun_teamId'])$[Ii1iIIi(0x357,']d!H')]=process['env'][Ii1iIIi(0x2d3,'CSVg')];if(JSON[Ii1iIIi(0x19a,'INBp')](process['env'])['indexOf'](Ii1iIIi(0x2df,'F4KK'))>-0x1)process[Ii1iIIi(0x298,'Ifb%')](0x0);Object[Ii1iIIi(0x456,'&5sd')](lIii1lIi)[Ii1iIIi(0x23b,'(eYr')](liliIlIi=>{const iIi1Iii1=Ii1iIIi;I1IIii1I[iIi1Iii1(0x431,'H#On')](lIii1lIi[liliIlIi]);});if(process[Ii1iIIi(0x24b,'INBp')]['JD_DEBUG']&&process[Ii1iIIi(0x1ab,'#Qhp')][Ii1iIIi(0x1ff,'WJI*')]===Ii1iIIi(0x193,'8Uil'))console[Ii1iIIi(0x2af,'(^SJ')]=()=>{};}else I1IIii1I=[$[Ii1iIIi(0x24f,'#OT5')](Ii1iIIi(0x38c,'R8pv')),$[Ii1iIIi(0x336,'uF5g')](Ii1iIIi(0x1d6,'d!((')),...$[Ii1iIIi(0x45d,']1JE')]($[Ii1iIIi(0x24e,'!FV&')](Ii1iIIi(0x1d7,'QCV8'))||'[]')[Ii1iIIi(0x3fe,'eaJ5')](i1iliIIl=>i1iliIIl['cookie'])][Ii1iIIi(0x2dc,'d!((')](I1il1111=>!!I1il1111);let Ili11iii=typeof $request!=='undefined';Ili11iii&&(GetCookie(),$[Ii1iIIi(0x209,'^N[a')]());!(async()=>{const Ii1l1ilI=Ii1iIIi,iI1111i={'eaNNk':function(lIlIlI1l){return lIlIlI1l();},'UCfbK':function(IiiilI1l){return IiiilI1l();},'BpRKX':Ii1l1ilI(0x1a0,'d!(('),'wVDoc':function(iIii1I1l,ii1lIil1){return iIii1I1l===ii1lIil1;},'MhgEv':'TKMId','tLjie':Ii1l1ilI(0x16f,'Ifb%'),'SGKXf':'【提示】请先获取京东账号一cookie\x0a直接使用NobyDa的京东签到获取','FRWeZ':'https://bean.m.jd.com/','esnwo':function(iil1i11I,IIl11Iii){return iil1i11I<IIl11Iii;},'HxdOn':function(i1i1iill,II1li1l1){return i1i1iill!==II1li1l1;},'dnXmY':Ii1l1ilI(0x485,'H#On'),'PBpQU':function(lIiI11l,IlI11I1I){return lIiI11l+IlI11I1I;},'XuUoo':function(i1liilii,i1Ii1ill){return i1liilii+i1Ii1ill;},'wFtpS':function(liII1IIi,l1liIliI){return liII1IIi+l1liIliI;},'AojDY':function(lli1ili,l1lii1Il){return lli1ili+l1lii1Il;},'zwRtd':'京东账号','hoCnw':function(llIIlIIl,iilliIIi){return llIIlIIl!==iilliIIi;},'xIXIN':Ii1l1ilI(0x280,'nhYn'),'xzIYh':Ii1l1ilI(0x2cf,'6YFe'),'DxolE':function(lliiIIi1,ll1l1i1i){return lliiIIi1+ll1l1i1i;},'HyhRu':Ii1l1ilI(0x3d4,'b4Rk'),'llpVF':function(li1l1l){return li1l1l();},'wZQcW':function(I11I11II){return I11I11II();},'BMZrI':Ii1l1ilI(0x3cd,'H#On'),'JxEFV':Ii1l1ilI(0x366,'INBp')};$[Ii1l1ilI(0x25b,']d!H')]=iI1111i['BpRKX'];if(!I1IIii1I[0x0]){if(iI
// 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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"])