mirror of https://github.com/KingRan/KR.git
17 lines
92 KiB
JavaScript
17 lines
92 KiB
JavaScript
|
/*
|
||
|
10.24-11.11 联合集卡 双十一冲
|
||
|
|
||
|
10.31可瓜分
|
||
|
|
||
|
cron:31 0,17 24-31,1-11 10,11 *
|
||
|
============Quantumultx===============
|
||
|
[task_local]
|
||
|
#10.24-11.11 联合集卡 双十一冲
|
||
|
31 0,17 24-31,1-11 10,11 * jd_jk.js, tag=10.24-11.11 联合集卡 双十一冲, enabled=true
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('10.24-11.11 联合集卡 双十一冲');
|
||
|
var version_='jsjiami.com.v7';const l1I1iili=iiiIiI1I;(function(iIi1l1Ii,IiiliilI,l1I1II1l,i11liii,lll1iiI,iiililII,l1li1lil){return iIi1l1Ii=iIi1l1Ii>>0x7,iiililII='hs',l1li1lil='hs',function(I1li11il,ii1IIil1,iIl1Il1l,Iil11I1l,iil1llII){const IiiiIlil=iiiIiI1I;Iil11I1l='tfi',iiililII=Iil11I1l+iiililII,iil1llII='up',l1li1lil+=iil1llII,iiililII=iIl1Il1l(iiililII),l1li1lil=iIl1Il1l(l1li1lil),iIl1Il1l=0x0;const l1IiiI1=I1li11il();while(!![]&&--i11liii+ii1IIil1){try{Iil11I1l=-parseInt(IiiiIlil(0x323,'fNjz'))/0x1+parseInt(IiiiIlil(0x26f,'so(N'))/0x2*(parseInt(IiiiIlil(0x36f,'5s3D'))/0x3)+-parseInt(IiiiIlil(0x439,'5s3D'))/0x4+-parseInt(IiiiIlil(0x1dc,'n&7#'))/0x5*(parseInt(IiiiIlil(0x2ad,'^S0C'))/0x6)+-parseInt(IiiiIlil(0x235,'n&7#'))/0x7+parseInt(IiiiIlil(0x12a,'B2$f'))/0x8+-parseInt(IiiiIlil(0x44b,'iu*('))/0x9*(-parseInt(IiiiIlil(0x363,'5Pu@'))/0xa);}catch(i1ll1iiI){Iil11I1l=iIl1Il1l;}finally{iil1llII=l1IiiI1[iiililII]();if(iIi1l1Ii<=i11liii)iIl1Il1l?lll1iiI?Iil11I1l=iil1llII:lll1iiI=iil1llII:iIl1Il1l=iil1llII;else{if(iIl1Il1l==lll1iiI['replace'](/[UCDxQkwqeKfShWLBlA=]/g,'')){if(Iil11I1l===ii1IIil1){l1IiiI1['un'+iiililII](iil1llII);break;}l1IiiI1[l1li1lil](iil1llII);}}}}}(l1I1II1l,IiiliilI,function(I11Illii,iI1I1il1,illIllll,IIII1I1i,ii1ll1ll,ii1I1IIi,iiIII1i1){return iI1I1il1='\x73\x70\x6c\x69\x74',I11Illii=arguments[0x0],I11Illii=I11Illii[iI1I1il1](''),illIllll=`\x72\x65\x76\x65\x72\x73\x65`,I11Illii=I11Illii[illIllll]('\x76'),IIII1I1i=`\x6a\x6f\x69\x6e`,(0x144309,I11Illii[IIII1I1i](''));});}(0x6000,0xd24cf,l1Iil1i1,0xc2),l1Iil1i1)&&(version_=l1I1iili(0x379,'5s3D'));const Ili1Il1I=$['isNode']()?require(l1I1iili(0x2c5,'TUs1')):'',Il1iiiil=$[l1I1iili(0x385,'Vd!D')]()?require(l1I1iili(0x38a,'h9&v')):'',I11iI1Il=require(l1I1iili(0x2fb,'m2O3')),Il1iIlil=require(l1I1iili(0x17c,'QHUy')),II11Iil1=require(l1I1iili(0x2bd,'H8If'));let IIlli1li=l1I1iili(0x45d,'efk('),liIl11II=[],I1i1liII='',lIiiI1li='',Il111iIi='';if($['isNode']()){if(process[l1I1iili(0x408,'OmfP')][l1I1iili(0x454,'X5hs')])$['teamId']=process['env'][l1I1iili(0x254,'MZjw')];if(JSON[l1I1iili(0x411,'h9&v')](process[l1I1iili(0x1c8,'iu*(')])['indexOf']('GITHUB')>-0x1)process[l1I1iili(0x133,'n&7#')](0x0);Object['keys'](Il1iiiil)[l1I1iili(0x2e1,'MZjw')](IliIlIi=>{const l1Iii1l=l1I1iili;liIl11II[l1Iii1l(0xe8,'Vd!D')](Il1iiiil[IliIlIi]);});if(process['env'][l1I1iili(0x249,'p@u&')]&&process[l1I1iili(0x1a9,'YtLG')][l1I1iili(0x1f9,'OmfP')]===l1I1iili(0x218,'!6*y'))console[l1I1iili(0x105,'9lev')]=()=>{};}else liIl11II=[$[l1I1iili(0x430,'X5hs')](l1I1iili(0x1bf,'B2$f')),$[l1I1iili(0x2b8,'a]CG')](l1I1iili(0x3a6,'*tPl')),...$[l1I1iili(0xe6,'i8F5')]($['getdata'](l1I1iili(0x406,'HQxS'))||'[]')[l1I1iili(0x465,'oBQx')](I1liillI=>I1liillI[l1I1iili(0x3fa,'9lev')])][l1I1iili(0x2a8,'Ly*&')](Ili1ilIi=>!!Ili1ilIi);let l1i1I11=typeof $request!==l1I1iili(0x151,'i8F5');l1i1I11&&(GetCookie(),$[l1I1iili(0x135,'ttB]')]());!(async()=>{const lIIiii1i=l1I1iili,iillI11={'ExjVc':function(ilIii11I,IIlI111I){return ilIii11I+IIlI111I;},'DHsbE':lIIiii1i(0x2c4,'^S0C'),'bgTRO':function(ilili11,I1IIi1l1){return ilili11+I1IIi1l1;},'mlgHG':'获得积分:','tNLKq':function(iI1I1lll,IIIIlI){return iI1I1lll+IIIIlI;},'apMKE':function(IIi1liI1,iII1li11){return IIi1liI1(iII1li11);},'TPGSV':'unionCardD11Go20231020Nlmrxwq2','kLLwQ':function(l11Il1l1,IiIii1lI){return l11Il1l1!==IiIii1lI;},'sfJJt':lIIiii1i(0x3eb,'V]V$'),'HDaVh':lIIiii1i(0x1ef,'oBQx'),'IWgiI':lIIiii1i(0x3bb,'@WV@'),'NMsRU':'sJLCz','glLOv':'JDcGf','lwyEE':lIIiii1i(0x14a,'@WV@'),'oiJNY':lIIiii1i(0x384,'so(N'),'ZxCeF':function(il1IlIll,IIilI1II){return il1IlIll<IIilI1II;},'NUGAw':function(IIiliIlI,iIi11iI){return IIiliIlI+iIi11iI;},'MPdva':'\x0a开始【京东账号','jyAXK':'【提示】cookie已失效','QyVbi':function(IIiliiil,iIIIiliI){return IIiliiil+iIIIiliI;},'fKTAn':function(lliiIli1,iillliI1){return lliiIli1+iillliI1;},'DRxlQ':lIIiii1i(0x398,'338m'),'SCbVA':lIIiii1i(0x19d,'H8If'),'btKcM':function(IlIIilI,lliIi111){return IlIIilI+lliIi111;},'VxNBJ':function(lIiIII1I,li1li1li){return lIiIII1I+li1li1li;},'WpdYU':lIIiii1i(0x270,'^S0C'),'WVyOA':lIIiii1i
|
||
|
// 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"])
|