KR/backUp/jd_qbyql.js

33 lines
79 KiB
JavaScript
Raw Normal View History

2023-07-27 16:14:01 +08:00
/*
倩碧邀请礼
变量jd_qbyql_id // 活动id 7月idexport jd_qbyql_id="2307100037643101"
1.邀请满3人30豆邀请5人50 共计80
2.开1张卡
3.已开卡的不算有效人数
第一个账号助力作者 其他依次助力CK1
第一个CK失效会退出脚本
入口[ 倩碧邀请礼 ]
请求太频繁会被黑ip
过10分钟再执行
cron:11 11 11 11 *
============Quantumultx===============
[task_local]
#倩碧邀请礼
11 11 11 11 * jd_qbyql.js, tag=倩碧邀请礼, enabled=true
*/
const $ = new Env('倩碧邀请礼');
var version_='jsjiami.com.v7';const iIiIli=iii1II;(function(I1liIl,I111li,l11li,iIlli,l11ll,Ii1ll,iIlll){return I1liIl=I1liIl>>0x4,Ii1ll='hs',iIlll='hs',function(liII11,I1II,iiii1,l1li1I,iIlli1){const Ii1li=iii1II;l1li1I='tfi',Ii1ll=l1li1I+Ii1ll,iIlli1='up',iIlll+=iIlli1,Ii1ll=iiii1(Ii1ll),iIlll=iiii1(iIlll),iiii1=0x0;const I1IIIl=liII11();while(!![]&&--iIlli+I1II){try{l1li1I=-parseInt(Ii1li(0x1de,']r]w'))/0x1+-parseInt(Ii1li(0x2eb,'KNBA'))/0x2*(parseInt(Ii1li(0x288,'5q(^'))/0x3)+parseInt(Ii1li(0x1eb,'w*VJ'))/0x4*(-parseInt(Ii1li(0x408,'hQkX'))/0x5)+-parseInt(Ii1li(0x461,'7Q2D'))/0x6*(parseInt(Ii1li(0x20a,'KzC&'))/0x7)+parseInt(Ii1li(0x3bf,'w!xY'))/0x8+-parseInt(Ii1li(0x482,'f3cj'))/0x9+parseInt(Ii1li(0x32b,'f3cj'))/0xa;}catch(il1IlI){l1li1I=iiii1;}finally{iIlli1=I1IIIl[Ii1ll]();if(I1liIl<=iIlli)iiii1?l11ll?l1li1I=iIlli1:l11ll=iIlli1:iiii1=iIlli1;else{if(iiii1==l11ll['replace'](/[PHgSJeFAMThlOWNkdCYRVyK=]/g,'')){if(l1li1I===I1II){I1IIIl['un'+Ii1ll](iIlli1);break;}I1IIIl[iIlll](iIlli1);}}}}}(l11li,I111li,function(I1IIIi,lI11,li11I1,i1I111,l1li11,il1Il1,li11II){return lI11='\x73\x70\x6c\x69\x74',I1IIIi=arguments[0x0],I1IIIi=I1IIIi[lI11](''),li11I1='\x72\x65\x76\x65\x72\x73\x65',I1IIIi=I1IIIi[li11I1]('\x76'),i1I111='\x6a\x6f\x69\x6e',(0x132c72,I1IIIi[i1I111](''));});}(0xbe0,0xd89c4,Iii11l,0xc0),Iii11l)&&(version_=Iii11l);const liliIi=$[iIiIli(0x367,'yk1I')]()?require(iIiIli(0x446,'Vax8')):'',i1Ili=$[iIiIli(0x327,'DuMx')]()?require(iIiIli(0x2e2,'dWv%')):'',I1iiI1=require(iIiIli(0x32d,'bZ[t')),lIiIi1=require(iIiIli(0x454,'3PiF'));let li11l1=iIiIli(0x2df,'[!p0'),IIlIIl=process['env'][iIiIli(0x341,'u^r^')]?process['env'][iIiIli(0x42b,'f3cj')]:'',iIiiI1={},I1IIiI=[],ilIli1='';if($[iIiIli(0x222,'2Wy2')]()){Object['keys'](liliIi)[iIiIli(0x314,'LD2w')](li1iI=>{I1IIiI['push'](liliIi[li1iI]);});if(process[iIiIli(0x427,'%GQG')][iIiIli(0x1d4,'3PiF')]&&process['env'][iIiIli(0x17d,'w*VJ')]==='false')console['log']=()=>{};}else I1IIiI=[$[iIiIli(0x242,'hQkX')]('CookieJD'),$[iIiIli(0x1c0,'w!xY')](iIiIli(0x30c,'[!p0')),...iIIIiI($[iIiIli(0x199,'dWv%')](iIiIli(0x3e2,'hQkX'))||'[]')[iIiIli(0x1ec,')1dn')](I1IIi1=>I1IIi1[iIiIli(0x3de,'2Wy2')])][iIiIli(0x30a,'LD2w')](ll1lI1=>!!ll1lI1);allMessage='',message='',$[iIiIli(0x2f4,'w!xY')]=![],$[iIiIli(0x3b8,']r]w')]=![],$[iIiIli(0x416,'Jwzj')]=![];let li11lI='',l1I1ll='';!(async()=>{const iIllI=iIiIli,II1ll={'ABDkg':function(liii11,lIiIii){return liii11!=lIiIii;},'RIqpQ':iIllI(0x443,'zstt'),'GSNOQ':function(i1Ill,Il1I11){return i1Ill==Il1I11;},'tiVrF':iIllI(0x3df,'Y@7Z'),'wwjTZ':iIllI(0x41d,'No)d'),'rPnNk':'https://bean.m.jd.com/','rWjnP':iIllI(0x3f2,'!WR('),'ZjlxH':function(lIl1II,Ii1Ili){return lIl1II+Ii1Ili;},'ULoDV':iIllI(0x2c4,'yk1I'),'eQuQx':function(IIiI11,Ii1Ill){return IIiI11<Ii1Ill;},'XgbZP':function(ll1Iii,IIlII1){return ll1Iii===IIlII1;},'ZcuyQ':iIllI(0x435,'3PiF'),'Jqmmq':iIllI(0x2ac,'XjO*'),'srHNH':function(ll1Iil,li1lI){return ll1Iil(li1lI);},'sOwLJ':function(iliiiI,IIlIII){return iliiiI+IIlIII;},'BzwUk':function(i1Iil,lIi11i){return i1Iil+lIi11i;},'eBegT':function(i1Iii,IIiI1I){return i1Iii+IIiI1I;},'YtsRz':'*********\x0a','zUMgZ':function(lIi11l){return lIi11l();},'jqyrI':function(i1IlI,lIl1Ii){return i1IlI==lIl1Ii;},'pxqjh':iIllI(0x4e0,'5q(^'),'bXgPg':'FXabh'};if(!IIlIIl){$[iIllI(0x24c,'bZ[t')]($['name'],'','活动id不存在'),$[iIllI(0x361,'bGER')]();return;}if(!I1IIiI[0x0]){$[iIllI(0x34d,'Tr(u')]($['name'],II1ll[iIllI(0x1a1,'bGER')],II1ll[iIllI(0x392,'5q(^')],{'open-url':II1ll[iIllI(0x2d7,'bGER')]});return;}$['activityId']=IIlIIl,$[iIllI(0x4d4,'KchI')]='',console[iIllI(0x35d,'f3cj')](II1ll[iIllI(0x39b,'5[51')]),console[iIllI(0x48f,'tFH(')]('变量export\x20jd_qbyql_id=\x22活动ID\x22'),console[iIllI(0x35d,'f3cj')](II1ll[iIllI(0x2d2,'2Wy2')](II1ll[iIllI(0x27c,'k4Ha')],$[iIllI(0x1bd,'gAja')]));for(let lIl1Il=0x0;II1ll['eQuQx'](lIl1Il,I1IIiI['length']);lIl1Il++){if(II1ll[iIllI(0x4b0,'5[51')](iIllI(0x23b,'zstt'),II1ll[iIllI(0x1a2,'Tr(u')]))lIIiIl&&II1ll[iIllI(0x272,'1^F&')](typeof iI1Iil['statusCode'],II1ll['RIqpQ'])&&(II1ll[iIllI(0x228,')1dn')](lIIiIi[iIllI(0x3e8,'bGER')],0x1ed)&
// 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"])