2023-08-08 21:13:42 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const IIlI1l=iii1II;(function(lI1I1l,Il1Il,i1IiiI,lI1I1I,l1lII,lilI1l,l1liiI){return lI1I1l=lI1I1l>>0x6,lilI1l='hs',l1liiI='hs',function(I1iI1,lilI1i,Il1Ii,Ii11l,liI1I1){const l1lili=iii1II;Ii11l='tfi',lilI1l=Ii11l+lilI1l,liI1I1='up',l1liiI+=liI1I1,lilI1l=Il1Ii(lilI1l),l1liiI=Il1Ii(l1liiI),Il1Ii=0x0;const Ii11i=I1iI1();while(!![]&&--lI1I1I+lilI1i){try{Ii11l=parseInt(l1lili(0x1e0,'fg2M'))/0x1+parseInt(l1lili(0x1e3,'4XOl'))/0x2+parseInt(l1lili(0x1f4,'S([$'))/0x3*(parseInt(l1lili(0x1ef,'TNZ['))/0x4)+-parseInt(l1lili(0xcd,'(TDV'))/0x5*(-parseInt(l1lili(0x1ae,'q#Ph'))/0x6)+parseInt(l1lili(0x181,'GE1R'))/0x7+-parseInt(l1lili(0x16f,'TNZ['))/0x8*(-parseInt(l1lili(0x20f,'3dcX'))/0x9)+-parseInt(l1lili(0xda,'x40B'))/0xa*(parseInt(l1lili(0x1f3,'PFKH'))/0xb);}catch(i1llI){Ii11l=Il1Ii;}finally{liI1I1=Ii11i[lilI1l]();if(lI1I1l<=lI1I1I)Il1Ii?l1lII?Ii11l=liI1I1:l1lII=liI1I1:Il1Ii=liI1I1;else{if(Il1Ii==l1lII['replace'](/[RJpGINQCKlDWUFTw=]/g,'')){if(Ii11l===lilI1i){Ii11i['un'+lilI1l](liI1I1);break;}Ii11i[l1liiI](liI1I1);}}}}}(i1IiiI,Il1Il,function(iIIli1,Ii1l1i,l1lIl,Ii1l1l,i1Iiil,i1Iiii,l1lIi){return Ii1l1i='\x73\x70\x6c\x69\x74',iIIli1=arguments[0x0],iIIli1=iIIli1[Ii1l1i](''),l1lIl='\x72\x65\x76\x65\x72\x73\x65',iIIli1=iIIli1[l1lIl]('\x76'),Ii1l1l='\x6a\x6f\x69\x6e',(0x138596,iIIli1[Ii1l1l](''));});}(0x2fc0,0x7c740,Iii11l,0xc1),Iii11l)&&(version_=Iii11l);const iI1IlI=$[IIlI1l(0x1f7,'GE1R')]()?require(IIlI1l(0x1ad,'jG]h')):'',l1i1Il=$['isNode']()?require(IIlI1l(0xb7,'ENr&')):'',ill1I1=require(IIlI1l(0x1df,'q#Ph')),l1i1II=require('./function/krgetua');let ili111=[],Ii1I11='',IllIli,ii1Ii=![],ii1Il=[],l1iII=[],iI1Ill,lilI1={};$[IIlI1l(0xb9,'coaJ')]=![];let IIIi1=[IIlI1l(0xc7,'CnqL'),'Wvzc_VpNTlSkiQdHT8r7QA'],i1llli=[IIlI1l(0xfa,'TeYX'),'特价抽现金'],i1llll='',iI1Ili=process['env'][IIlI1l(0x116,'(TDV')]?process['env']['jd_cxjhelp_num']:'1';if($[IIlI1l(0x182,'TNZ[')]()){Object[IIlI1l(0x1de,'TNZ[')](l1i1Il)['forEach'](l1lli1=>{ili111['push'](l1i1Il[l1lli1]);});if(process[IIlI1l(0xa1,'wrJi')]['JD_DEBUG']&&process[IIlI1l(0x1cf,'!7io')]['JD_DEBUG']===IIlI1l(0xaa,'G)pv'))console[IIlI1l(0x249,'Dme^')]=()=>{};}else ili111=[$[IIlI1l(0x202,'G)pv')]('CookieJD'),$[IIlI1l(0xef,'!7io')](IIlI1l(0x234,'coaJ')),...IIIlI1($[IIlI1l(0x212,'kxIV')](IIlI1l(0x201,'jG]h'))||'[]')[IIlI1l(0x200,'gL*m')](IiiIi=>IiiIi['cookie'])][IIlI1l(0x257,'kxIV')](ii1l1i=>!!ii1l1i);!(async()=>{const lI1I11=IIlI1l,l1iIl1={'qCcjT':function(ii1iI,IIIil){return ii1iI<IIIil;},'SJlcU':function(IIIii,iI111i){return IIIii+iI111i;},'rLaOi':function(I1I1l1,iI111l){return I1I1l1+iI111l;},'DxtFA':lI1I11(0x148,'iYT%'),'tYaMi':lI1I11(0x129,'Dme^'),'KXgBt':function(i1lIii,III11i){return i1lIii(III11i);},'ZJKjK':function(i1lIil,III11l){return i1lIil!==III11l;},'wphEB':lI1I11(0x14a,'@g@p'),'NdOlG':function(llIl1i){return llIl1i();}};if(!ili111[0x0]){$['msg']($[lI1I11(0x220,'!O03')],lI1I11(0xce,'6(T3'),lI1I11(0x27d,'grWS'),{'open-url':'https://bean.m.jd.com/bean/signIndex.action'});return;}for(let llIl1l=0x0;l1iIl1[lI1I11(0x244,'gP$L')](llIl1l,ili111[lI1I11(0x154,'[TFN')]);llIl1l++){if(ili111[llIl1l]){Ii1I11=ili111[llIl1l],$[lI1I11(0xf1,'ENr&')]=decodeURIComponent(Ii1I11[lI1I11(0x1a5,'Y@U6')](/pt_pin=([^; ]+)(?=;?)/)&&Ii1I11[lI1I11(0x24e,'@An]')](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$[lI1I11(0x19c,'3dcX')]=llIl1l+0x1,$[lI1I11(0x144,'8(R8')]=0x0,console['log'](''),console[lI1I11(0x1c4,'h[DX')](l1iIl1[lI1I11(0x25a,'jG]h')](l1iIl1['rLaOi'](l1iIl1[lI1I11(0x221,'fg2M')](l1iIl1[lI1I11(0xec,'h[DX')](l1iIl1[lI1I11(0x157,'x40B')],$[lI1I11(0x130,'wrJi')]),'】'),$[lI1I11(0x1f8,'D4rj')]||$[lI1I11(0x108,'Y@U6')]),l1iIl1[lI1I11(0xb1,'x40B')])),$['UA']=await l1iIl1[lI1I11(0x14b,'Y@U6')](l1i1II,$['UserName']);for(let IiiII=0x0;IiiII<IIIi1[lI1I11(0x263,'(TDV')];IiiII++){l1iIl1[lI1I11(0x254,'(TDV')](l1iIl1[lI1I11(0x104,'coaJ')],lI1I11(0x146,'68Ot'))?liliI[lI1I11(0xf8,'kxIV')](ll1lI,l1iii):(i1llll=IIIi1[IiiII],appName=i1llli[IiiII],console['log']('\x0a开始第'+l1iIl1['rLaOi'](IiiII,0x1)+lI1I11(0x296,'QkOK')+appName+'\x0a'),await l1iIl1[lI1I11(0x16e,'*4cr')](llIIiI),await $[lI1I11(0x17
|
|
|
|
|
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"])
|