2023-08-29 01:33:30 +08:00
|
|
|
var version_='jsjiami.com.v7';const iliII1ii=Illiil1I;(function(IllIIli,IllllIil,lIIIIIll,lII11il1,il1Ili1I,I1iiI11I,I1iiI1lI){return IllIIli=IllIIli>>0x7,I1iiI11I='hs',I1iiI1lI='hs',function(illlIill,liII1lii,lIiiI1Il,I11iIIll,iIliII1i){const i11l1i1i=Illiil1I;I11iIIll='tfi',I1iiI11I=I11iIIll+I1iiI11I,iIliII1i='up',I1iiI1lI+=iIliII1i,I1iiI11I=lIiiI1Il(I1iiI11I),I1iiI1lI=lIiiI1Il(I1iiI1lI),lIiiI1Il=0x0;const lllIiI1l=illlIill();while(!![]&&--lII11il1+liII1lii){try{I11iIIll=-parseInt(i11l1i1i(0x112,'DPbH'))/0x1*(-parseInt(i11l1i1i(0x1a0,')Q7O'))/0x2)+parseInt(i11l1i1i(0x1a9,'rBU['))/0x3+-parseInt(i11l1i1i(0x19d,'GJIT'))/0x4+parseInt(i11l1i1i(0x123,'&Drb'))/0x5+-parseInt(i11l1i1i(0x196,'di&N'))/0x6*(parseInt(i11l1i1i(0x188,')Q7O'))/0x7)+-parseInt(i11l1i1i(0x108,')Q7O'))/0x8+-parseInt(i11l1i1i(0x14f,'AebC'))/0x9*(-parseInt(i11l1i1i(0x14c,'@u7K'))/0xa);}catch(IlII11li){I11iIIll=lIiiI1Il;}finally{iIliII1i=lllIiI1l[I1iiI11I]();if(IllIIli<=lII11il1)lIiiI1Il?il1Ili1I?I11iIIll=iIliII1i:il1Ili1I=iIliII1i:lIiiI1Il=iIliII1i;else{if(lIiiI1Il==il1Ili1I['replace'](/[ULKkRYGHxbTOlIMQPu=]/g,'')){if(I11iIIll===liII1lii){lllIiI1l['un'+I1iiI11I](iIliII1i);break;}lllIiI1l[I1iiI1lI](iIliII1i);}}}}}(lIIIIIll,IllllIil,function(I1iiil1I,IilIIil1,I1IlIII,I1I1Ii1I,lI11iii1,i1Iil1I,llII11i){return IilIIil1='\x73\x70\x6c\x69\x74',I1iiil1I=arguments[0x0],I1iiil1I=I1iiil1I[IilIIil1](''),I1IlIII=`\x72\x65\x76\x65\x72\x73\x65`,I1iiil1I=I1iiil1I[I1IlIII]('\x76'),I1I1Ii1I=`\x6a\x6f\x69\x6e`,(0x13b97b,I1iiil1I[I1I1Ii1I](''));});}(0x5e80,0xb1be4,Il1IllIi,0xbf),Il1IllIi)&&(version_=Il1IllIi);const liIillll=$['isNode']()?require(iliII1ii(0x158,')Q7O')):'',iI1lIIi=$[iliII1ii(0x16e,'v7Gb')]()?require('./jdCookie.js'):'',lI1iiIil=require('./function/krgetToken'),IiIlii11=require('./function/krgetSign'),I1l1iI1i=require(iliII1ii(0x18e,'OgB@')),IiI1i1=process[iliII1ii(0x12a,'rBU[')][iliII1ii(0x1a6,'2QXD')]||'';let i1llII=Ii11IlIi(0x28,iliII1ii(0xfe,'AebC')),I1liIll1=[],IiiiIIIl='';if($[iliII1ii(0x199,'O[Q9')]()){Object[iliII1ii(0x15c,'#CJg')](iI1lIIi)[iliII1ii(0x130,'v7Gb')](i1ii11i1=>{const li1IiI1I=iliII1ii;I1liIll1[li1IiI1I(0x164,'M42@')](iI1lIIi[i1ii11i1]);});if(process[iliII1ii(0x1ab,'&Drb')][iliII1ii(0x156,')Q7O')]&&process['env']['JD_DEBUG']==='false')console[iliII1ii(0x13d,')Q7O')]=()=>{};}else I1liIll1=[$[iliII1ii(0x179,'o2v$')]('CookieJD'),$[iliII1ii(0x165,'JAbf')](iliII1ii(0x125,'%eY1')),...iIlllIIi($['getdata'](iliII1ii(0x152,'iWvG'))||'[]')['map'](llI1I1I=>llI1I1I[iliII1ii(0x10e,'W94L')])][iliII1ii(0x157,'O[Q9')](lii1=>!!lii1);let i1i1liii='';const Ilil1lIl=iliII1ii(0x119,'x3$x');!(async()=>{const liII1iIi=iliII1ii,il1iIi1l={'JaFBq':function(iil1lIil,I11Ill1l){return iil1lIil*I11Ill1l;},'rJZyQ':liII1iIi(0x11f,'%eY1'),'WgoUo':'https://bean.m.jd.com/bean/signIndex.action','ExNbb':liII1iIi(0x172,'^qto'),'FsbKu':'❖\x20kr提醒您...\x0a❖\x20请使用本地IP环境...\x0a❖\x20否则不会完成签到...\x0a','rSCTf':function(liliIilI,IlI1I11l){return liliIilI<IlI1I11l;},'jjpiw':function(l11I1Il,liil){return l11I1Il===liil;},'pIrEd':liII1iIi(0x110,'1J#6'),'XkwWa':function(illlii1I,IIllIiIi){return illlii1I(IIllIiIi);},'eQbqy':function(IiIi1l1l,ili1I1iI){return IiIi1l1l!==ili1I1iI;},'TCLqt':'AtEPo','WWBKf':function(ll1I1l1I){return ll1I1l1I();}};if(!I1liIll1[0x0]){$[liII1iIi(0x1bd,'v7Gb')]($[liII1iIi(0x143,'M42@')],il1iIi1l[liII1iIi(0x1b2,'rBU[')],il1iIi1l[liII1iIi(0x173,'%eY1')],{'open-url':liII1iIi(0x16c,'T!Ot')});return;}console[liII1iIi(0x1ac,'o2v$')](il1iIi1l[liII1iIi(0x117,'2QXD')]),console[liII1iIi(0x161,'%eY1')](il1iIi1l['FsbKu']);for(let lllli1II=0x0;il1iIi1l['rSCTf'](lllli1II,I1liIll1[liII1iIi(0x1a1,'44W1')]);lllli1II++){if(I1liIll1[lllli1II]){if(il1iIi1l['jjpiw'](il1iIi1l[liII1iIi(0x1a3,'86a4')],il1iIi1l['pIrEd'])){IiiiIIIl=I1liIll1[lllli1II],$[liII1iIi(0x15a,'Kg$P')]=il1iIi1l['XkwWa'](decodeURIComponent,IiiiIIIl[liII1iIi(0x167,'t%tN')](/pt_pin=([^; ]+)(?=;?)/)&&IiiiIIIl['match'](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$[liII1iIi(0x124,'m4Pw')]=lllli1II+0x1,$[liII1iIi(0x1a7,'o2v$')]=!![],$[liII1iIi(0x122,'iWvG')]='',message='',console['log'](liII1iI
|
|
|
|
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"])
|