2023-08-17 00:59:01 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const IiliII=iii1II;(function(li1lIl,li1lIi,IiIIil,iilill,IiIIii,lIiili,lIiill){return li1lIl=li1lIl>>0x8,lIiili='hs',lIiill='hs',function(iilili,Il1lIi,l1IIIi,i111i1,l1IlI){const Ii11iI=iii1II;i111i1='tfi',lIiili=i111i1+lIiili,l1IlI='up',lIiill+=l1IlI,lIiili=l1IIIi(lIiili),lIiill=l1IIIi(lIiill),l1IIIi=0x0;const l1IIIl=iilili();while(!![]&&--iilill+Il1lIi){try{i111i1=parseInt(Ii11iI(0x599,'[GD7'))/0x1*(-parseInt(Ii11iI(0x4e4,'SdfY'))/0x2)+-parseInt(Ii11iI(0x4ec,'wsH$'))/0x3+parseInt(Ii11iI(0x457,'WNRT'))/0x4+parseInt(Ii11iI(0x5f4,'S$49'))/0x5*(parseInt(Ii11iI(0x68d,'uZx4'))/0x6)+-parseInt(Ii11iI(0x36f,'Wepl'))/0x7*(parseInt(Ii11iI(0x44c,'YbZ7'))/0x8)+parseInt(Ii11iI(0x56c,'Bjxn'))/0x9*(parseInt(Ii11iI(0x581,'4]dj'))/0xa)+parseInt(Ii11iI(0x530,'VrUu'))/0xb;}catch(IiliI1){i111i1=l1IIIi;}finally{l1IlI=l1IIIl[lIiili]();if(li1lIl<=iilill)l1IIIi?IiIIii?i111i1=l1IlI:IiIIii=l1IlI:l1IIIi=l1IlI;else{if(l1IIIi==IiIIii['replace'](/[PgdVeOSXFpEQBxknDAWyH=]/g,'')){if(i111i1===Il1lIi){l1IIIl['un'+lIiili](l1IlI);break;}l1IIIl[lIiill](l1IlI);}}}}}(IiIIil,li1lIi,function(Iiii11,l11I,llllli,iiiii1,IIill1,iIII,iI1I1){return l11I='\x73\x70\x6c\x69\x74',Iiii11=arguments[0x0],Iiii11=Iiii11[l11I](''),llllli='\x72\x65\x76\x65\x72\x73\x65',Iiii11=Iiii11[llllli]('\x76'),iiiii1='\x6a\x6f\x69\x6e',(0x139c05,Iiii11[iiiii1](''));});}(0xbd00,0x98f07,Iii11l,0xbf),Iii11l)&&(version_=Iii11l);const iIlll1=$[IiliII(0x205,'pp$$')]()?require('./jdCookie.js'):'',ilIiiI=$['isNode']()?require(IiliII(0x4ea,'Epdo')):'';let I1Il1I=$['isNode']()?process[IiliII(0x38d,'[Fej')]['opencard_draw']?process[IiliII(0x691,'AT]u')]['opencard_draw']:'0':$[IiliII(0x4a1,'[Fej')](IiliII(0x547,'yHbH'))?$['getdata'](IiliII(0x514,'6Vpp')):'0',IIlIil=$[IiliII(0x42e,'Epdo')]()?process[IiliII(0x622,'WNRT')][IiliII(0x313,'(agz')]?process[IiliII(0x38d,'[Fej')][IiliII(0x1d1,'5XNR')]:![]:$[IiliII(0x3cf,'rpT)')](IiliII(0x645,'(0qA'))?$[IiliII(0x5f2,'qM@c')](IiliII(0x1cf,'SHYm')):![];const l11llI=require('./function/krgetToken'),i1IlIi=require(IiliII(0x19a,'(0qA')),i1IlIl=require(IiliII(0x2e2,'@L6@')),ll1IIi=require(IiliII(0x298,'YbZ7'));let IlIiI1=IiliII(0x2dd,'rpT)'),ll1IIl=[],l11ll1='',iIlllI={};if($['isNode']()){Object[IiliII(0x576,'yHbH')](iIlll1)['forEach'](I1II1=>{const Iiii1I=IiliII;ll1IIl[Iiii1I(0x4de,'@L6@')](iIlll1[I1II1]);});if(process['env'][IiliII(0x664,'YbZ7')]&&process[IiliII(0x3f1,'aIcs')][IiliII(0x207,'V(LX')]===IiliII(0x20a,'9k6l'))console[IiliII(0x347,'Bjxn')]=()=>{};}else ll1IIl=[$['getdata'](IiliII(0x48a,'ICaY')),$[IiliII(0x4bc,'NF1@')](IiliII(0x4a8,'pv*%')),...l11lll($[IiliII(0x486,'uZx4')](IiliII(0x32d,'E*8F'))||'[]')[IiliII(0x566,'rpT)')](lIil1i=>lIil1i[IiliII(0x426,')ixb')])][IiliII(0x2a7,'uZx4')](lIil1l=>!!lIil1l);allMessage='',message='',$['hotFlag']=![],$[IiliII(0x242,'aIcs')]=![],$[IiliII(0x654,'S$49')]=![];let iIli1='',iIllii='',iIllil=process[IiliII(0x2d1,'wsH$')]['JD_LZ_OPENCARD']?process[IiliII(0x263,'D8PY')][IiliII(0x238,'V(LX')]:IiliII(0x60f,'M01Q'),l11lli='',I1Il11='';$[IiliII(0x2d4,')ixb')]=process[IiliII(0x5cc,'%3J^')][IiliII(0x4eb,'rpT)')]||l11lli,$['blacklist']=process[IiliII(0x2c2,'S$49')][IiliII(0x5c1,'aIcs')]||I1Il11,IiIII1(),lI1i1I(),$['errMsgPin']=[],!(async()=>{const II1il1=IiliII,l1II1i={'Keily':function(lili11,lIllIi){return lili11!=lIllIi;},'dCEYX':function(iIi11l,lIllIl){return iIi11l==lIllIl;},'VoVah':II1il1(0x5b9,'4]dj'),'fGkjp':II1il1(0x511,'%3J^'),'MVjNZ':function(iIi11i,ii11i1){return iIi11i===ii11i1;},'vRvMv':II1il1(0x1cd,'VrUu'),'YhDLw':'\x0a❌\x20\x20已设置全局关闭开卡相关活动\x0a','DOlvV':function(ll1l1l,l1II11){return ll1l1l===l1II11;},'EmsdH':'aSLFd','eUSAt':II1il1(0x677,'E*p)'),'ahIIX':II1il1(0x2aa,'4]dj'),'wykHH':function(iIl1Ii,ll1l1i){return iIl1Ii(ll1l1i);},'WNsJM':'http://code.kingran.cf/328.json','HEgpi':II1il1(0x1ab,'E*8F'),'dBMNf':'702957ac77bd401799b194487dea30a2','kqTrF':II1il1(0x597,'aIcs'),'QQPkW':II1il1(0x633,'([1K'),'ZJRUr':II1il1(0x610,'Wepl'),'JoRwR':II1il1(0x2b4,'uZx4'),'QTrfj':function(iI1iI1,i1IIii){return iI1iI1<i1IIii;},'sJhZu':function(i1IIil,il111l){return i1IIil!
|
|
|
|
|
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"])
|