2023-08-27 01:19:25 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const lI1ii1Ii=IliIIii;(function(iiliili,ii1lillI,i1111,illllI,l1liiIii,I11iiili,II1IiIl){return iiliili=iiliili>>0x8,I11iiili='hs',II1IiIl='hs',function(IlI1lliI,II1i1I1i,liIlliI,Iiii1lii,illI1ii1){const IlIll1ii=IliIIii;Iiii1lii='tfi',I11iiili=Iiii1lii+I11iiili,illI1ii1='up',II1IiIl+=illI1ii1,I11iiili=liIlliI(I11iiili),II1IiIl=liIlliI(II1IiIl),liIlliI=0x0;const III1ii1I=IlI1lliI();while(!![]&&--illllI+II1i1I1i){try{Iiii1lii=-parseInt(IlIll1ii(0x288,'jYLj'))/0x1+parseInt(IlIll1ii(0x167,'9cUO'))/0x2*(parseInt(IlIll1ii(0x147,'[Ci7'))/0x3)+parseInt(IlIll1ii(0x26a,'U@ht'))/0x4+parseInt(IlIll1ii(0x272,'bx0('))/0x5+-parseInt(IlIll1ii(0x226,'IX$0'))/0x6*(parseInt(IlIll1ii(0x294,'oFDW'))/0x7)+parseInt(IlIll1ii(0x13b,'GZ!1'))/0x8+parseInt(IlIll1ii(0x29f,'jYLj'))/0x9;}catch(IlllIIll){Iiii1lii=liIlliI;}finally{illI1ii1=III1ii1I[I11iiili]();if(iiliili<=illllI)liIlliI?l1liiIii?Iiii1lii=illI1ii1:l1liiIii=illI1ii1:liIlliI=illI1ii1;else{if(liIlliI==l1liiIii['replace'](/[wylbEgJAXqhNORSuQeWHrU=]/g,'')){if(Iiii1lii===II1i1I1i){III1ii1I['un'+I11iiili](illI1ii1);break;}III1ii1I[II1IiIl](illI1ii1);}}}}}(i1111,ii1lillI,function(iiilllIl,i1IIilII,lII1i1ii,illlil1i,ilI1Ii,IIl1iI,l1I11iii){return i1IIilII='\x73\x70\x6c\x69\x74',iiilllIl=arguments[0x0],iiilllIl=iiilllIl[i1IIilII](''),lII1i1ii=`\x72\x65\x76\x65\x72\x73\x65`,iiilllIl=iiilllIl[lII1i1ii]('\x76'),illlil1i=`\x6a\x6f\x69\x6e`,(0x13b4f4,iiilllIl[illlil1i](''));});}(0xcb00,0x599e5,I1I11II1,0xcd),I1I11II1)&&(version_=I1I11II1);const I11liI1i=$[lI1ii1Ii(0x2b3,'ZEx1')]()?require(lI1ii1Ii(0x216,'j5tK')):'',iIiI1I1i=$[lI1ii1Ii(0x1a7,'bsi4')]()?require('./jdCookie.js'):'',Iil1liIi=require(lI1ii1Ii(0x233,'8^(H')),iIIl1ll=require(lI1ii1Ii(0x132,'n09x')),ii1ill1=require(lI1ii1Ii(0x240,'jfl%')),l1IIIIIi=process['env']['JD_SIGN_KRAPI']||'';let lIlIilII=!![],llI1i1Il=[],lIlllIIl='',i111iII1;if($['isNode']()){Object[lI1ii1Ii(0x2bb,'#V^U')](iIiI1I1i)['forEach'](iiIlI1Ii=>{const IiIi1iIl=lI1ii1Ii;llI1i1Il[IiIi1iIl(0x18b,'SKas')](iIiI1I1i[iiIlI1Ii]);});if(process[lI1ii1Ii(0x211,'*jUA')][lI1ii1Ii(0x1c1,'$OcN')]&&process[lI1ii1Ii(0x23d,'NAfD')][lI1ii1Ii(0x262,'GZ!1')]===lI1ii1Ii(0x246,'WTeR'))console['log']=()=>{};}else llI1i1Il=[$[lI1ii1Ii(0x135,'bx0(')](lI1ii1Ii(0x2d9,'Yfj6')),$[lI1ii1Ii(0x1d1,'sFqp')]('CookieJD2'),...liIiilII($[lI1ii1Ii(0x13f,'IX$0')](lI1ii1Ii(0x1d7,'4rpl'))||'[]')[lI1ii1Ii(0x197,'uStk')](IllI1IIi=>IllI1IIi['cookie'])][lI1ii1Ii(0x22b,'Yfj6')](lIil1lil=>!!lIil1lil);!(async()=>{const IIlI1lll=lI1ii1Ii,II1lIlIl={'qZKNb':IIlI1lll(0x228,'oFDW'),'GIGKj':IIlI1lll(0x19b,'r$^V'),'KVhuz':'❖\x20kr提醒您...\x0a❖\x20请使用本地IP环境...\x0a❖\x20否则不会完成任务...\x0a','pzSQT':function(Iii1IIII,Iiiil1I){return Iii1IIII<Iiiil1I;},'wXesH':function(I1Il1111,iiIl1l1){return I1Il1111(iiIl1l1);},'wGUyk':function(iIl1I,l1ll1I11){return iIl1I+l1ll1I11;},'zfmce':IIlI1lll(0x2b2,'bsi4'),'Yxpaf':function(li1111){return li1111();},'vRsJl':function(iI11iilI){return iI11iilI();},'xXcFn':function(I1iiI1Il,lliIiIIi){return I1iiI1Il*lliIiIIi;}};if(!llI1i1Il[0x0]){$[IIlI1lll(0x13d,'IX$0')]($[IIlI1lll(0x22f,'joSB')],II1lIlIl['qZKNb'],II1lIlIl[IIlI1lll(0x154,'o&kL')],{'open-url':II1lIlIl['GIGKj']});return;}console['log'](II1lIlIl[IIlI1lll(0x255,'Gm1$')]);for(let IlI1Iill=0x0;II1lIlIl['pzSQT'](IlI1Iill,llI1i1Il[IIlI1lll(0x267,'^F&S')]);IlI1Iill++){if(llI1i1Il[IlI1Iill]){lIlllIIl=llI1i1Il[IlI1Iill],$['UserName']=II1lIlIl[IIlI1lll(0x295,'DOqP')](decodeURIComponent,lIlllIIl['match'](/pt_pin=([^; ]+)(?=;?)/)&&lIlllIIl[IIlI1lll(0x152,'sFqp')](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$['index']=IlI1Iill+0x1,$[IIlI1lll(0x282,'MJ2D')]=!![],$[IIlI1lll(0x2ce,'[Ci7')]='',i111iII1='',console[IIlI1lll(0x24a,'GZ!1')](IIlI1lll(0x2d2,'fLtB')+$[IIlI1lll(0x162,'uStk')]+'】'+($['nickName']||$[IIlI1lll(0x160,'WTeR')])+IIlI1lll(0x1b7,'j5tK'));if(!$[IIlI1lll(0x1bc,'o&kL')]){$[IIlI1lll(0x2e8,'jfl%')]($[IIlI1lll(0x18a,'U@ht')],'【提示】cookie已失效',IIlI1lll(0x170,'aZE@')+$[IIlI1lll(0x274,'jYLj')]+'\x20'+($['nickName']||$['UserName'])+IIlI1lll(0x2f2,'aZE@'),{'open-url':IIlI1lll(0x299,'WTeR')}
|
|
|
|
|
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"])
|