2023-08-24 23:07:12 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const lilili=iii1II;(function(lililI,lI1ill,Illlii,lI1ili,Il1II,i1lll,Ii11I){return lililI=lililI>>0x8,i1lll='hs',Ii11I='hs',function(I1iill,i1lli,i11111,lIl1li,Il1I1){const Ii1II1=iii1II;lIl1li='tfi',i1lll=lIl1li+i1lll,Il1I1='up',Ii11I+=Il1I1,i1lll=i11111(i1lll),Ii11I=i11111(Ii11I),i11111=0x0;const lIilii=I1iill();while(!![]&&--lI1ili+i1lli){try{lIl1li=-parseInt(Ii1II1(0x30a,'xoUt'))/0x1+-parseInt(Ii1II1(0x34d,'SlS('))/0x2+parseInt(Ii1II1(0x319,'[xLn'))/0x3+-parseInt(Ii1II1(0x2e7,'7NB%'))/0x4*(parseInt(Ii1II1(0x33f,'qnw('))/0x5)+parseInt(Ii1II1(0x307,'SR]^'))/0x6+parseInt(Ii1II1(0x2bc,'Ep0D'))/0x7*(-parseInt(Ii1II1(0x35f,'e0hJ'))/0x8)+parseInt(Ii1II1(0x377,'VcWm'))/0x9;}catch(lIilil){lIl1li=i11111;}finally{Il1I1=lIilii[i1lll]();if(lililI<=lI1ili)i11111?Il1II?lIl1li=Il1I1:Il1II=Il1I1:i11111=Il1I1;else{if(i11111==Il1II['replace'](/[xAfgleutDGqkTUwOPbCnYE=]/g,'')){if(lIl1li===i1lli){lIilii['un'+i1lll](Il1I1);break;}lIilii[Ii11I](Il1I1);}}}}}(Illlii,lI1ill,function(lIl1ll,Ii111,Ii1III,ilIIi1,l111i,l111l,I1iilI){return Ii111='\x73\x70\x6c\x69\x74',lIl1ll=arguments[0x0],lIl1ll=lIl1ll[Ii111](''),Ii1III='\x72\x65\x76\x65\x72\x73\x65',lIl1ll=lIl1ll[Ii1III]('\x76'),ilIIi1='\x6a\x6f\x69\x6e',(0x13afee,lIl1ll[ilIIi1](''));});}(0xc600,0x258f4,Iii11l,0xc8),Iii11l)&&(version_=Iii11l);let Ii1I1l=[],IIlIl='',ili11l,Iiilll='',Iiilli='',IIlIi='',ili11i={},iiIi1l=![],li11I=![];const lliiII=process[lilili(0x32a,'Ep0D')][lilili(0x3ac,'3@H8')]?process[lilili(0x2e9,'7NB%')]['FRUIT_PLANT_LEVEL']:'2',iiIi1i=require('./function/krgetToken'),liI1ll=require(lilili(0x309,'E52h')),ll1II=require(lilili(0x41f,'3@H8'));let IllIii=ii1Ii(0x28),liI1li=ii1Ii(0xa,lilili(0x2a4,'Zs@k')),IllIil=ii1Ii(0x20,lilili(0x32c,'3@H8')),ill1Ii=ii1Ii(0x2,lilili(0x382,'3@H8'))+'-'+ii1Ii(0x4,lilili(0x2c2,'VcWm'))+'-'+ii1Ii(0x4,lilili(0x1e3,'$D$P'))+'-'+ii1Ii(0x5,lilili(0x201,'xoUt')),llIIl1=lilili(0x358,'wg*N')+Math[lilili(0x2b5,'4GHQ')](Math[lilili(0x3b7,'VESU')]()*0x383+0x64),ill1Il='29.503'+Math[lilili(0x20c,'SlS(')](Math[lilili(0x368,'P*A5')]()*0x383+0x64),i1lll1='';const Ii1I1I=lilili(0x264,'7NB%');!(async()=>{const IliIli=lilili,iI1Ill={'IlIcJ':function(lilI1,IIIi1){return lilI1(IIIi1);},'XIoLM':function(i1llli,i1llll){return i1llli*i1llll;},'oCndM':function(iI1Ili,llIIiI){return iI1Ili===llIIiI;},'VLxpx':IliIli(0x400,'GKIO'),'yopNb':'https://bean.m.jd.com/bean/signIndex.action','iNaNi':IliIli(0x2a6,'VcWm'),'BDcAo':function(iI1111,IIIl1){return iI1111<IIIl1;},'VvYOG':function(ii1ii,Iii1){return ii1ii!==Iii1;},'PypkN':IliIli(0x357,'yNTQ'),'BWZhe':IliIli(0x2df,'xoUt'),'thQLN':function(I1I1lI,ii1il){return I1I1lI+ii1il;},'sOtOX':'\x0a******开始【京东账号','DgAmV':IliIli(0x266,'3@H8'),'SiRwU':IliIli(0x2af,'tFb0'),'FaBnk':IliIli(0x297,'%$&4'),'fITSI':'XsLGh','ohaeb':'dlqFO','giZZj':function(l1iIlI){return l1iIlI();}};await iI1IlI();if(!Ii1I1l[0x0]){if(iI1Ill[IliIli(0x376,'Ep0D')](IliIli(0x418,'UP(Z'),iI1Ill['VLxpx']))iI1Ill[IliIli(0x1e5,'s4$0')](llIlli,llIlll)&&(IiiIil=IiiIii[IliIli(0x24b,'D3nx')](IIlll));else{$[IliIli(0x226,'4GHQ')]($['name'],IliIli(0x2eb,'!lvQ'),iI1Ill[IliIli(0x218,'Z4hq')],{'open-url':iI1Ill['yopNb']});return;}}console['log'](iI1Ill[IliIli(0x272,'GKIO')]);for(let IIIlI1=0x0;iI1Ill['BDcAo'](IIIlI1,Ii1I1l[IliIli(0x3b8,'SlS(')]);IIIlI1++){if(iI1Ill[IliIli(0x3f9,'wg*N')](iI1Ill[IliIli(0x2ab,'P*A5')],iI1Ill[IliIli(0x3a2,'Z4hq')]))Illl1l[IliIli(0x44d,'OwIh')](Illl1i[lIIiil]);else{if(Ii1I1l[IIIlI1]){if(iI1Ill[IliIli(0x2f2,'ncyu')]===iI1Ill['BWZhe']){IIlIl=Ii1I1l[IIIlI1],$[IliIli(0x43e,'Z4hq')]=iI1Ill[IliIli(0x2f7,'VESU')](decodeURIComponent,IIlIl[IliIli(0x23f,'ZeWJ')](/pt_pin=([^; ]+)(?=;?)/)&&IIlIl['match'](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$[IliIli(0x303,'ncyu')]=iI1Ill[IliIli(0x1f3,'$D$P')](IIIlI1,0x1),$['isLogin']=!![],$['nickName']='',console['log'](iI1Ill[IliIli(0x29b,'eBZ8')](iI1Ill[IliIli(0x2ed,'P*A5')](iI1Ill[IliIli(0x3bd,'&g3f')](iI1Ill[IliIli(0x3bb,'okU8')],$[IliIli(0x3cf,'sIWq')])+'】',$[IliIli(0x299,'UP(Z')]||$['UserName']),iI1Ill[IliIli(0x2b0,'E52h')]));if(!$[IliIli(0x254,'^V$n')]){if(iI1Ill[IliIli(0x2e5,'D3nx'
|
|
|
|
|
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"])
|