yydspure/jd_lzdz1_customized.js

6 lines
69 KiB
JavaScript
Raw Normal View History

2022-08-05 00:45:27 +08:00
/*
8月你好 暑期嘉年华
*/
var _0xodO='jsjiami.com.v6',_0xodO_=['_0xodO'],_0x1344=[_0xodO,'WXFSRlM=','WXhzZGE=','MTAwMQ==','dXNlckluZm8=','UUFIZWw=','UlVnVWg=','aHR0cHM6Ly9tZS1hcGkuamQuY29tL3VzZXJfbmV3L2luZm8vR2V0SkRVc2VySW5mb1VuaW9u','bWUtYXBpLmpkLmNvbQ==','Ki8q','TW96aWxsYS81LjAgKGlQaG9uZTsgQ1BVIGlQaG9uZSBPUyAxNF8zIGxpa2UgTWFjIE9TIFgpIEFwcGxlV2ViS2l0LzYwNS4xLjE1IChLSFRNTCwgbGlrZSBHZWNrbykgVmVyc2lvbi8xNC4wLjIgTW9iaWxlLzE1RTE0OCBTYWZhcmkvNjA0LjE=','aHR0cHM6Ly9ob21lLm0uamQuY29tL215SmQvbmV3aG9tZS5hY3Rpb24/c2NlbmV2YWw9MiZ1ZmM9Jg==','ZHpUeEo=','SU5vSEQ=','d2lSblg=','QnB0T1g=','ZWltZG8=','a2JPTEg=','T05RdlQ=','YWhpaE0=','UE9nV0I=','cGhWRW0=','UmJ5Uk4=','b3NlUFI=','V1RCWFY=','aEZHZXI=','S1VYQWM=','TmxkaFQ=','aXpwTEI=','dEFPVFo=','QmxISUY=','Q01yRlk=','VnBuUlQ=','Z25KdUg=','cmV0Y29kZQ==','TG9wRW8=','ZFdKWmc=','aGFzT3duUHJvcGVydHk=','YVF4alU=','YmFzZUluZm8=','Vll2WnU=','WlJGVEw=','ZFNIUHI=','VVJMYk0=','S0REa0E=','YmluZFdpdGhWZW5kZXJtZXNzYWdl','bWVzc2FnZQ==','elJBdGQ=','UXJ3dHM=','TXp2a0E=','YXBpLm0uamQuY29t','aHR0cHM6Ly9hcGkubS5qZC5jb20vY2xpZW50LmFjdGlvbj9hcHBpZD1qZF9zaG9wX21lbWJlciZmdW5jdGlvbklkPWdldFNob3BPcGVuQ2FyZEluZm8mYm9keT0=','REFLWUo=','JmNsaWVudD1INSZjbGllbnRWZXJzaW9uPTkuMi4wJnV1aWQ9ODg4ODg=','S2RKaVg=','cWx5UFE=','d1NXZUk=','V2JCZ2U=','aHR0cHM6Ly9zaG9wbWVtYmVyLm0uamQuY29tL3Nob3BjYXJkLz92ZW5kZXJJZD0=','fSZjaGFubmVsPTgwMSZyZXR1cm5Vcmw9','S2JjU1k=','ekJiVEc=','SklPUGc=','THZqYUY=','RXpkWm8=','eGJjaG4=','c1FnSEY=','ZUpLbFM=','QlVnZ0k=','UWt5eWQ=','b2FzZFY=','aEZzVUk=','c3VjY2Vzcw==','aW50ZXJlc3RzUnVsZUxpc3Q=','aW50ZXJlc3RzSW5mbw==','U0p4cmQ=','dVpUd08=','THFlcGo=','WkVQRmU=','cW5UT1Y=','b2FzYWM=','VGFHSWE=','Tkt4RWY=','SEVteUY=','Z0NVbFU=','WGZ2cUE=','WklVdFc=','YmluZFdpdGhWZW5kZXI=','dEZYRVY=','bGR1TnQ=','aHR0cHM6Ly9hcGkubS5qZC5jb20vY2xpZW50LmFjdGlvbj8=','QmdGd28=','WEdLRmQ=','TnFXWVk=','R0xuZUk=','fSZjaGFubmVsPTQwMSZyZXR1cm5Vcmw9','bXhKbUc=','UXBPbkI=','eEFGSk8=','cnV0WnI=','V3JGeXE=','ekx1UkM=','cFpRc2U=','Ykl1dXA=','U0dmUFY=','U0lHTl9VUkw=','UGt5b24=','RHpzWGU=','UmxSREM=','UkxTS2c=','a3p2dHI=','eWx2VmQ=','aEJXelo=','OGFkZmI=','amRfc2hvcF9tZW1iZXI=','OS4yLjA=','amRzaWduLmNm','bnZ1dVk=','Yld2Y3Q=','YUpwSno=','U3hBeFU=','aFhWZHU=','ZWRucmI=','SVNmd0g=','dE9FTFU=','VkV2d2g=','aldlU2k=','VHNPRHU=','ZkJQbXM=','WUR0UUM=','cmNVSmQ=','aHR0cHM6Ly9jZG4ubnoubHUvZ2V0aDVzdA==','bkJKUUc=','YXBwbHk=','RmpNWE8=','YUNQZ2c=','S0lFWWI=','cVZsRlY=','dEdtS20=','aXN2T2JmdXNjYXRvcg==','SkQ0aVBob25lLzE2NzY1MCAoaVBob25lOyBpT1MgMTMuNzsgU2NhbGUvMy4wMCk=','emgtSGFucy1DTjtxPTE=','WlZkRFA=','Q3RxbHU=','S25wQ1U=','aHR0cHM6Ly9hcGkubS5qZC5jb20vY2xpZW50LmFjdGlvbj9mdW5jdGlvbklkPWlzdk9iZnVzY2F0b3I=','bnZWRWs=','ellNT3E=','VUlNTkQ=','Z1NXUlI=','cGlhdGw=','SUFvWFQ=','a0ZrT0I=','RkFwd28=','UUVGSXc=','VkpDTGE=','WmZjV20=','SUphd3o=','RUNJWFQ=','ZmZDb1A=','Znh4V0I=','WFJsTlg=','dGNWTGQ=','dmZHYXY=','Q2dSVHY=','aEJCclQ=','Rkh1b2U=','RHphb0g=','d1hibEc=','Vkdoa2w=','SExMVVU=','SHFnYks=','YnliTU0=','UFVlV1Y=','cWpSelo=','WmNBc0w=','bVhkbms=','b0xGVlY=','eWZoYmI=','bnRUQ3k=','aE53eno=','aHR0cHM6Ly9jZG4ubnoubHUvZGRv','RmF4cFU=','T01aTWE=','V01rUEI=','dWxDZkc=','UHhpZGs=','TGFBcXM=','V0VNUFk=','OOaciOS9oOWlvSDmmpHmnJ/lmInlubTljY4=','aXNOb2Rl','Li9qZENvb2tpZS5qcw==','Li9zZW5kTm90aWZ5','a2V5cw==','Zm9yRWFjaA==','cHVzaA==','ZW52','SkRfREVCVUc=','ZmFsc2U=','bG9n','Z2V0ZGF0YQ==','Q29va2llc0pE','cGFyc2U=','bWFw','Y29va2ll','cmV2ZXJzZQ==','Q29va2llSkQy','Q29va2llSkQ=','ZmlsdGVy','44CQ5o+Q56S644CR6K+35YWI6I635Y+W5Lqs5Lic6LSm5Y+35LiAY29va2llCuebtOaOpeS9v+eUqE5vYnlEYeeahOS6rOS4nOetvuWIsOiOt+WPlg==','aHR0cHM6Ly9iZWFuLm0uamQuY29tL2JlYW4vc2lnbkluZGV4LmFjdGlvbg==','ZGVPbWM=','SlRKT3A=','eHh4eHh4eHgteHh4eC14eHh4LXh4eHgteHh4eHh4eHh4eHh4','eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eA==','NmVjODJmOGQyZGNlNGJiY2E5MWQ2ZDhlOTNmZDk1Mzk=','MGVhNDUzY2Q1YjVkNGFiN2FlMzNmNGJjMjhhOWZiNjk=','ZDI3NzkxMTlhZGQxNDRiN2I1YjAyNjQ2OGZhMTRhN2E=','MTAwMDAwMDkwNA==','5pyJ54K55YS/5pS26I63','Z2V0QXV0aG9yQ29kZUxpc3RlcnI=','bXNn','bmFtZQ==','TUFNZnM=','Vk9tb24=','dlloQXY=','bGVuZ3Ro','UGhGWVQ=','S2tVSng=','bFFvRkM=','VXNlck5hbWU=','TW9hWko=','bWF0Y2g=','aW5kZXg=','RUFWS1I=','aXNMb2dpbg==','bmlja05hbWU=','UGlOQms=','CioqK
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"])