KR/jd_bw.js

15 lines
85 KiB
JavaScript
Raw Normal View History

2023-08-02 01:30:43 +08:00
/*
23.08.01-23.08.10 百万京豆等你拿
cron:31 2 1-10 8 *
============Quantumultx===============
[task_local]
#23.08.01-23.08.10 百万京豆等你拿
31 2 1-10 8 * jd_szxyun_bw.js, tag=23.08.01-23.08.10 百万京豆等你拿, enabled=true
*/
const $ = new Env("23.08.01-23.08.10 百万京豆等你拿");
var version_='jsjiami.com.v7';const lll1l1=iii1II;(function(lIiiiI,iiI1Il,iiI1Ii,Il1i1,IlIiil,IlIiii,ilIII1){return lIiiiI=lIiiiI>>0x4,IlIiii='hs',ilIII1='hs',function(lll1lI,lliliI,ll1iiI,lIIlll,ll1ii1){const IlIiiI=iii1II;lIIlll='tfi',IlIiii=lIIlll+IlIiii,ll1ii1='up',ilIII1+=ll1ii1,IlIiii=ll1iiI(IlIiii),ilIII1=ll1iiI(ilIII1),ll1iiI=0x0;const i11li1=lll1lI();while(!![]&&--Il1i1+lliliI){try{lIIlll=-parseInt(IlIiiI(0x4ac,'eSh1'))/0x1*(-parseInt(IlIiiI(0x486,'bSA7'))/0x2)+parseInt(IlIiiI(0x1ab,'To#k'))/0x3*(parseInt(IlIiiI(0x326,'hgOY'))/0x4)+-parseInt(IlIiiI(0x46f,'icU0'))/0x5*(parseInt(IlIiiI(0x19f,'^T0y'))/0x6)+parseInt(IlIiiI(0x11b,'Ux3i'))/0x7+-parseInt(IlIiiI(0x37f,'UsdS'))/0x8*(parseInt(IlIiiI(0x303,'u&AH'))/0x9)+parseInt(IlIiiI(0x28b,'E21M'))/0xa*(parseInt(IlIiiI(0x380,'E21M'))/0xb)+parseInt(IlIiiI(0x349,'RQtB'))/0xc*(-parseInt(IlIiiI(0x26a,'4j0e'))/0xd);}catch(iIlI1){lIIlll=ll1iiI;}finally{ll1ii1=i11li1[IlIiii]();if(lIiiiI<=Il1i1)ll1iiI?IlIiil?lIIlll=ll1ii1:IlIiil=ll1ii1:ll1iiI=ll1ii1;else{if(ll1iiI==IlIiil['replace'](/[PtMkRNnKIYCFHAyDVdf=]/g,'')){if(lIIlll===lliliI){i11li1['un'+IlIiii](ll1ii1);break;}i11li1[ilIII1](ll1ii1);}}}}}(iiI1Ii,iiI1Il,function(IiIlII,iI11i,I1Iili,ilIIII,I1li,iIllIi,iI11l){return iI11i='\x73\x70\x6c\x69\x74',IiIlII=arguments[0x0],IiIlII=IiIlII[iI11i](''),I1Iili='\x72\x65\x76\x65\x72\x73\x65',IiIlII=IiIlII[I1Iili]('\x76'),ilIIII='\x6a\x6f\x69\x6e',(0x137462,IiIlII[ilIIII](''));});}(0xc50,0x6f165,Iii11l,0xc7),Iii11l)&&(version_=Iii11l);const Il1iil=$['isNode']()?require(lll1l1(0x184,'4e5a')):'',iIiil=$[lll1l1(0x1b9,'x()P')]()?require('./jdCookie.js'):'',IIiIIi=require(lll1l1(0x470,'^T0y')),lilI=require('./function/krh5st'),ll111i=require(lll1l1(0x1c4,'4OZS'));function iii1II(_0x10596c,_0x458a31){const _0x45876a=Iii11l();return iii1II=function(_0x15c4b5,_0x62ef39){_0x15c4b5=_0x15c4b5-0x117;let _0x5eb7b2=_0x45876a[_0x15c4b5];if(iii1II['RpjIpF']===undefined){var _0x40d4f5=function(_0x1ad5af){const _0x25c210='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xaeb36='',_0x126a88='';for(let _0x2e11e8=0x0,_0x28566b,_0xbe1d9d,_0x5e4382=0x0;_0xbe1d9d=_0x1ad5af['charAt'](_0x5e4382++);~_0xbe1d9d&&(_0x28566b=_0x2e11e8%0x4?_0x28566b*0x40+_0xbe1d9d:_0xbe1d9d,_0x2e11e8++%0x4)?_0xaeb36+=String['fromCharCode'](0xff&_0x28566b>>(-0x2*_0x2e11e8&0x6)):0x0){_0xbe1d9d=_0x25c210['indexOf'](_0xbe1d9d);}for(let _0x6da5b5=0x0,_0x422dea=_0xaeb36['length'];_0x6da5b5<_0x422dea;_0x6da5b5++){_0x126a88+='%'+('00'+_0xaeb36['charCodeAt'](_0x6da5b5)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x126a88);};const _0x23f55a=function(_0x957b79,_0x2e532d){let _0x5b717a=[],_0x2b4cc2=0x0,_0x3e314e,_0x3bd9ae='';_0x957b79=_0x40d4f5(_0x957b79);let _0x1f7574;for(_0x1f7574=0x0;_0x1f7574<0x100;_0x1f7574++){_0x5b717a[_0x1f7574]=_0x1f7574;}for(_0x1f7574=0x0;_0x1f7574<0x100;_0x1f7574++){_0x2b4cc2=(_0x2b4cc2+_0x5b717a[_0x1f7574]+_0x2e532d['charCodeAt'](_0x1f7574%_0x2e532d['length']))%0x100,_0x3e314e=_0x5b717a[_0x1f7574],_0x5b717a[_0x1f7574]=_0x5b717a[_0x2b4cc2],_0x5b717a[_0x2b4cc2]=_0x3e314e;}_0x1f7574=0x0,_0x2b4cc2=0x0;for(let _0x2786ec=0x0;_0x2786ec<_0x957b79['length'];_0x2786ec++){_0x1f7574=(_0x1f7574+0x1)%0x100,_0x2b4cc2=(_0x2b4cc2+_0x5b717a[_0x1f7574])%0x100,_0x3e314e=_0x5b717a[_0x1f7574],_0x5b717a[_0x1f7574]=_0x5b717a[_0x2b4cc2],_0x5b717a[_0x2b4cc2]=_0x3e314e,_0x3bd9ae+=String['fromCharCode'](_0x957b79['charCodeAt'](_0x2786ec)^_0x5b717a[(_0x5b717a[_0x1f7574]+_0x5b717a[_0x2b4cc2])%0x100]);}return _0x3bd9ae;};iii1II['jdqoUM']=_0x23f55a,_0x10596c=arguments,iii1II['RpjIpF']=!![];}const _0x2209af=_0x45876a[0x0],_0x50095e=_0x15c4b5+_0x2209af,_0x481ca9=_0x10596c[_0x50095e];return!_0x481ca9?(iii1II['BBJajP']===undefined&&(iii1II['BBJajP']=!![]),_0x5eb7b2=iii1II['jdqoUM'](_0x5eb7b2,_0x62ef39),_0x10596c[_0x50095e]=_0x5eb7b2):_0x5eb7b2=_0x481ca9,_0x5eb7b2;},iii1II(_0x10596c,_0x458a31);}let l1Ill1='https://szxyun-rc.isvjcloud.com',iiilI1=[],ll111l='',lil1='',illIII='';if($['isNode']()){if(process[lll1l1(0x1de,'W8Kd')]['jd_szxyun_teamId'])$[lll1l1(0x143,'b6D%')]=process[lll1l1(0x485,'ywf3')][lll1l1(0x364,'Usd
// 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"])