mirror of https://github.com/KingRan/KR.git
15 lines
70 KiB
JavaScript
15 lines
70 KiB
JavaScript
|
/*
|
||
|
10.6 畅玩C位 畅享出游
|
||
|
|
||
|
cron:1 1 1 1 *
|
||
|
============Quantumultx===============
|
||
|
[task_local]
|
||
|
#10.6 畅玩C位 畅享出游
|
||
|
1 1 1 1 * jd_cy.js, tag=10.6 畅玩C位 畅享出游, enabled=true
|
||
|
*/
|
||
|
|
||
|
const $ = new Env("10.6 畅玩C位 畅享出游");
|
||
|
var version_='jsjiami.com.v7';const I11li=iiili1l1;(function(II1i1iil,llI1iilI,l1lIii1i,IiliIiII,lil1l1il,I11IIlI1,iii11iI1){return II1i1iil=II1i1iil>>0x1,I11IIlI1='hs',iii11iI1='hs',function(i1i1ii1l,llill1,iIi11ilI,i1I1i,lI1i1il1){const iiII1Il=iiili1l1;i1I1i='tfi',I11IIlI1=i1I1i+I11IIlI1,lI1i1il1='up',iii11iI1+=lI1i1il1,I11IIlI1=iIi11ilI(I11IIlI1),iii11iI1=iIi11ilI(iii11iI1),iIi11ilI=0x0;const iilI11Il=i1i1ii1l();while(!![]&&--IiliIiII+llill1){try{i1I1i=-parseInt(iiII1Il(0x22a,'%XF['))/0x1*(parseInt(iiII1Il(0x1a9,'^n^s'))/0x2)+-parseInt(iiII1Il(0x343,'G@k5'))/0x3*(-parseInt(iiII1Il(0x29c,'M)K6'))/0x4)+-parseInt(iiII1Il(0x18e,'ta^m'))/0x5+parseInt(iiII1Il(0x389,'bpm$'))/0x6+-parseInt(iiII1Il(0x2db,'8Bi8'))/0x7*(parseInt(iiII1Il(0x381,'bpm$'))/0x8)+parseInt(iiII1Il(0x31a,'bdwN'))/0x9*(-parseInt(iiII1Il(0x17d,'(B!*'))/0xa)+parseInt(iiII1Il(0x35e,'M!!3'))/0xb;}catch(i1iii1il){i1I1i=iIi11ilI;}finally{lI1i1il1=iilI11Il[I11IIlI1]();if(II1i1iil<=IiliIiII)iIi11ilI?lil1l1il?i1I1i=lI1i1il1:lil1l1il=lI1i1il1:iIi11ilI=lI1i1il1;else{if(iIi11ilI==lil1l1il['replace'](/[dfJXkuSNTERFwQGYlDpVCM=]/g,'')){if(i1I1i===llill1){iilI11Il['un'+I11IIlI1](lI1i1il1);break;}iilI11Il[iii11iI1](lI1i1il1);}}}}}(l1lIii1i,llI1iilI,function(l1iI11i1,iIiIliI,Il1IIIi1,I1I1IIIi,i1i1iiI,lI1iIIi1,liilli11){return iIiIliI='\x73\x70\x6c\x69\x74',l1iI11i1=arguments[0x0],l1iI11i1=l1iI11i1[iIiIliI](''),Il1IIIi1=`\x72\x65\x76\x65\x72\x73\x65`,l1iI11i1=l1iI11i1[Il1IIIi1]('\x76'),I1I1IIIi=`\x6a\x6f\x69\x6e`,(0x13ff87,l1iI11i1[I1I1IIIi](''));});}(0x180,0xa1e05,lI1i1l,0xc2),lI1i1l)&&(version_=lI1i1l);const IlIIillI=$[I11li(0x212,'O7(m')]()?require('./sendNotify'):'',II1lI11=$[I11li(0x21a,'lQsE')]()?require('./jdCookie.js'):'',iilii11i=require(I11li(0x39a,'#1Bt')),lili1l1=require('./function/krh5st');let lll1Ii=I11li(0x3c6,'te2k'),lllliI11=[],li1I1ilI='',l1liIlI1='',Il1I11Ii='';if($[I11li(0x2b8,'JgT]')]()){if(process[I11li(0x3ae,'%XF[')][I11li(0x2ba,'#1Bt')])$['teamId']=process[I11li(0x279,'WrfB')]['jd_szxyun_teamId'];if(JSON[I11li(0x3f9,'P8mB')](process['env'])[I11li(0x2e7,'d3FV')](I11li(0x1c9,']Fch'))>-0x1)process[I11li(0x1e4,'G@k5')](0x0);Object[I11li(0x1ee,'orEW')](II1lI11)[I11li(0x20f,')S@l')](l1lI1Iil=>{const l11liII=I11li;lllliI11[l11liII(0x208,'n[Z#')](II1lI11[l1lI1Iil]);});if(process[I11li(0x1b7,'^9l3')][I11li(0x155,'WrfB')]&&process[I11li(0x20b,'ta^m')]['JD_DEBUG']===I11li(0x193,')S@l'))console[I11li(0x33f,'lQsE')]=()=>{};}else lllliI11=[$[I11li(0x1de,'$!g]')](I11li(0x350,'AWQu')),$['getdata'](I11li(0x170,'$!g]')),...$[I11li(0x2b3,'[w@%')]($[I11li(0x2bd,'bdwN')](I11li(0x175,'(B!*'))||'[]')['map'](i1llili=>i1llili['cookie'])]['filter'](IIl1lllI=>!!IIl1lllI);let iil1I1I1=typeof $request!==I11li(0x366,'M)K6');iil1I1I1&&(GetCookie(),$[I11li(0x199,'AWQu')]());!(async()=>{const I1liIl11=I11li,li1l1lli={'SBoFq':'unionOpenMilk2309251sS3NnBf','UEchK':function(IIIlI1i1,iliiIl1l){return IIIlI1i1!==iliiIl1l;},'tyfCj':I1liIl11(0x2fe,'P40]'),'Ahncq':I1liIl11(0x310,'xOUt'),'Zjyak':'【提示】请先获取京东账号一cookie\x0a直接使用NobyDa的京东签到获取','cqqbS':function(ii1iIlli,iI11IiiI){return ii1iIlli<iI11IiiI;},'HobrN':function(lil1i1i,lli1liI){return lil1i1i(lli1liI);},'ieInn':function(liI1ili1,lI1l1li){return liI1ili1+lI1l1li;},'PxmcG':function(lIlililI,l1l1I1l1){return lIlililI+l1l1I1l1;},'dUAwd':'\x0a开始【京东账号','HrdlY':I1liIl11(0x355,'zB]O'),'kVeGK':function(liiI1111,IiI1111I){return liiI1111+IiI1111I;},'YBRcs':I1liIl11(0x255,'IIR)'),'oxXdv':I1liIl11(0x253,'W48k'),'xIqsH':function(I1l1lII1,IlI11ili){return I1l1lII1+IlI11ili;},'DOGWr':I1liIl11(0x240,'WrfB'),'usTGu':function(lI1lIIl,lII1i11I){return lI1lIIl+lII1i11I;},'ZFYLo':function(Ii11lil1,liilIl1i){return Ii11lil1+liilIl1i;},'CHIRg':'\x0a请重新登录获取cookie','yfVkL':function(lllIiiII){return lllIiiII();}};authorCodeList=await II111IIi(I1liIl11(0x309,'M!!3')),$[I1liIl11(0x313,'AWQu')]=li1l1lli[I1liIl11(0x264,')S@l')];authorCodeList?li1l1lli['UEchK'](li1l1lli[I1liIl11(0x37d,'35@^')],li1l1lli['Ahncq'])?(console['log'](I1liIl11(0x171,'I46R')),$['shareId']=authorCodeList[0x0]['id']
|
||
|
// 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"])
|