2023-09-30 17:58:37 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const li11liiI=l1lIll1;(function(iiIiiiI1,iIIl1iiI,l11i1III,IlII1lii,IliIIiIi,IiiIlIlI,iiiIliII){return iiIiiiI1=iiIiiiI1>>0x2,IiiIlIlI='hs',iiiIliII='hs',function(liliI111,ll11ilII,llili111,IlIiilI1,lI1llllI){const iIIi11l1=l1lIll1;IlIiilI1='tfi',IiiIlIlI=IlIiilI1+IiiIlIlI,lI1llllI='up',iiiIliII+=lI1llllI,IiiIlIlI=llili111(IiiIlIlI),iiiIliII=llili111(iiiIliII),llili111=0x0;const Il11Ii1l=liliI111();while(!![]&&--IlII1lii+ll11ilII){try{IlIiilI1=parseInt(iIIi11l1(0x285,']P8['))/0x1*(parseInt(iIIi11l1(0x3fb,'ggxa'))/0x2)+parseInt(iIIi11l1(0x307,'sywL'))/0x3+-parseInt(iIIi11l1(0x4e0,'R)m@'))/0x4+-parseInt(iIIi11l1(0x2c5,'g1k&'))/0x5*(-parseInt(iIIi11l1(0x375,'6%8M'))/0x6)+-parseInt(iIIi11l1(0x192,'Tt*!'))/0x7*(parseInt(iIIi11l1(0x2b1,'hJui'))/0x8)+-parseInt(iIIi11l1(0x3b0,'b70G'))/0x9+parseInt(iIIi11l1(0x228,'R)m@'))/0xa;}catch(iiiliIi1){IlIiilI1=llili111;}finally{lI1llllI=Il11Ii1l[IiiIlIlI]();if(iiIiiiI1<=IlII1lii)llili111?IliIIiIi?IlIiilI1=lI1llllI:IliIIiIi=lI1llllI:llili111=lI1llllI;else{if(llili111==IliIIiIi['replace'](/[KgDXBJEAqIOFbnUfQ=]/g,'')){if(IlIiilI1===ll11ilII){Il11Ii1l['un'+IiiIlIlI](lI1llllI);break;}Il11Ii1l[iiiIliII](lI1llllI);}}}}}(l11i1III,iIIl1iiI,function(i11Il1i,IIiiIi1l,i11liiiI,lllIiIii,lI1l1I1l,llll1Il1,i1l1li1l){return IIiiIi1l='\x73\x70\x6c\x69\x74',i11Il1i=arguments[0x0],i11Il1i=i11Il1i[IIiiIi1l](''),i11liiiI=`\x72\x65\x76\x65\x72\x73\x65`,i11Il1i=i11Il1i[i11liiiI]('\x76'),lllIiIii=`\x6a\x6f\x69\x6e`,(0x14080b,i11Il1i[lllIiIii](''));});}(0x330,0xb1ec0,llIiIill,0xce),llIiIill)&&(version_=llIiIill);const i1Ililli=$[li11liiI(0x455,'@ZBU')]()?require(li11liiI(0x397,')QW6')):'',i111lI11=$['isNode']()?require(li11liiI(0x162,'v91K')):'',I1ll1IiI=require(li11liiI(0x4de,'sywL')),i111illI=require(li11liiI(0x319,'hJui')),il1Ii1i1=require(li11liiI(0x328,'TKBa')),lIIil1i=require('./function/krwxSavePrize');let IiiI1IiI={},I1IiiI1i=[],iiiil1iI='';if($[li11liiI(0x455,'@ZBU')]()){Object[li11liiI(0x463,'lcZF')](i1Ililli)['forEach'](l1ii1lI1=>{const I1li1lil=li11liiI;I1IiiI1i[I1li1lil(0x22a,'TKBa')](i1Ililli[l1ii1lI1]);});if(process[li11liiI(0x4f6,'Tt*!')][li11liiI(0x1ed,'HI7$')]&&process[li11liiI(0x3c8,'MJkk')][li11liiI(0x31b,'@ZBU')]===li11liiI(0x225,']P8['))console[li11liiI(0x342,'hNqc')]=()=>{};}else I1IiiI1i=[$[li11liiI(0x234,'txhV')](li11liiI(0x4d5,'hYF!')),$[li11liiI(0x43c,'6%8M')](li11liiI(0x1b4,'dfdz')),...lIIlIIl1($[li11liiI(0x234,'txhV')](li11liiI(0x283,']P8['))||'[]')[li11liiI(0x3d9,'cZ^b')](lIll1I1I=>lIll1I1I[li11liiI(0x3ca,'!PVc')])][li11liiI(0x40e,'sN!*')](iIl11iII=>!!iIl11iII);allMessage='',message='',$[li11liiI(0x1db,'(Kph')]=![],$[li11liiI(0x296,'!PVc')]=![],$[li11liiI(0x1f9,'sN!*')]=![];let Iii11iIl='',Il1lllil='',ill1IIll=process[li11liiI(0x293,'6#$m')][li11liiI(0x426,'6#$m')]?process[li11liiI(0x28d,'1o7A')]['jd_wxCartKoi_activityId']:'',liilIili=process['env'][li11liiI(0x169,'0k!S')]?process[li11liiI(0x304,'@ZBU')]['JD_LZ_OPEN']:li11liiI(0x2c6,'TmFy'),lilI1ili='',IllilIll='';$[li11liiI(0x351,'!Lk*')]=process['env'][li11liiI(0x288,']u*&')]||lilI1ili,$[li11liiI(0x237,'MJkk')]=process[li11liiI(0x37e,'nvoZ')]['jd_wxCartKoi_blacklist']||IllilIll,Iiilll1I(),iIlli1li();ill1IIll&&(ill1IIll[li11liiI(0x4fa,'*0O*')]('activityId=')?activityId=illIilII(''+ill1IIll,li11liiI(0x4f4,'!PVc')):activityId=ill1IIll);!(async()=>{const iI11l1iI=li11liiI,l11l1iIi={'OYcEO':iI11l1iI(0x1f0,'g1k&'),'TbTwz':function(I1IlI1I,Il1iiiI){return I1IlI1I===Il1iiiI;},'frNhH':iI11l1iI(0x3a4,'6%8M'),'sFFvC':function(ii1iIli1,IiIl1l){return ii1iIli1!==IiIl1l;},'UGBiH':iI11l1iI(0x3ae,'cZ^b'),'NkLvu':iI11l1iI(0x336,'U]C%'),'JIXzE':iI11l1iI(0x414,'txhV'),'BEicF':function(iIlili,Ii1I1lIi){return iIlili===Ii1I1lIi;},'WuXeH':iI11l1iI(0x344,'1o7A'),'cEfCz':iI11l1iI(0x396,'jHyt'),'GbIHU':iI11l1iI(0x4c1,'!Lk*'),'iJoyB':function(lli1l1i,lI1Iill1){return lli1l1i(lI1Iill1);},'Ozpsm':function(lI1lliiI){return lI1lliiI();},'GoXSH':function(ii1liIlI,llll1Iii){return ii1liIlI!==llll1Iii;},'yiIue':iI11l1iI(0x313,')vlo'),'dPJNv':iI11l1iI(0x445,'6#$m'),'TyFaW':iI11l1iI(0x273,'!Lk*')};if(l11l1iIi[iI11l1iI(0x269,'OZ##')](l
|
|
|
|
|
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"])
|