faker3/jd_jdCasarteUnionPet.js

12 lines
117 KiB
JavaScript
Raw Normal View History

2025-01-10 19:12:50 +08:00
/*
1.18 星宠也要过大年
cron:59 23 29 2 *
*/
const $ = new Env('星宠也要过大年')
function l2R5TD7(){}var LiPBz7j=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],s9WuNL,GWESYMG,xPA45J,Xmf1OV,YWygmi,oxjFYLm,kPcddT,e6q_mr,dI3fqd,DxFAG8,pgN0Ai9,qhI5_jl,rPRqs9,cuN065,bRQGCfV,gToiUR,lcQXpm,gNJ5n_J;function KVT1mG(l2R5TD7){return s9WuNL[l2R5TD7<0x36?l2R5TD7+0x5d:l2R5TD7+0x22]}l2R5TD7(s9WuNL=o33_SJb(),GWESYMG=k119BRM((l2R5TD7,LiPBz7j)=>{return LiPBz7j(l2R5TD7())},0x2)(kLqpLqM,YTyeQV));var y3QNaF=[],NZOuxtZ=['\x31\x6e\x33\x21\x61\x4e\x67\x34','\x72\x51\x5a\x5f\x5b\x2e\x49\x74','\u007d\u003a\u006f\u002c','\u0070\u003c\u004f\u0028\u0060\u0045\u0022\u004a\u0058\u002e\u007c\u003f\u0040\u0066\u006d',HfZ7ZJ(KVT1mG(-0x49)),'\x70\x3c\x4f\x28\x60\x45\x22\x4a\x58\x2e\x41\x76\x35\x2e\x2f\x64\x28\x2f','f#6bW','p<O(`E"JX.E?qVwo','p<KF:|c("+','\u003d\u003c\u005d\u002e\u0079\u0029\u0033\u006f\u003a\u002e','\u0054\u006c\u0057\u0074\u0055','\x46\x54\x50\x7a\x5d\x58\x39\x38\x3a\x2e','\u005d\u006c\u0057\u0074\u007c\u004f\u0078',HfZ7ZJ(0x1),'\x41\x3a\x52\x62\x4d\x21\x3c\x69\x48\x43','\x28\x6c\x21\x38\x6d\x4f\x78',HfZ7ZJ(0x2),'E#!8#09I_',HfZ7ZJ(KVT1mG(-0x43)),'\x54\x6c\x46\x2c\x7a\x4c\x70\x5e',HfZ7ZJ(KVT1mG(-0x36)),'\u0074\u003d\u0075\u0032\u0061\u0077\u002b\u005e','\u007c\u0024\u0071\u006f\u002e\u0021\u0054\u007b\u006c\u002e','\x30\x7b\x48\x2c\x57','\u0060\u0056\u0026\u007a\u007c\u0021\u006f\u0022\u003a\u002e',HfZ7ZJ(0x5),'\x2f\x40\x7c\x38','\x3a\x54\x51\x38\x62\x58\x47\x5e','\u003b\u0074\u0069\u0038',HfZ7ZJ(KVT1mG(-0x48)),'\u007d\u005e\u004d\u0042\u002e\u0037\u0023\u0022\u003e\u004b\u003d\u0025\u0066\u002e\u0058\u004f\u0042\u0076\u0031\u0022\u003e\u0048\u007c\u0066\u0057\u006b\u0062\u0053\u007a\u003a\u0037\u005d\u0056\u0062\u003f\u006e\u0057','\x42\x5a\x49\x38\x46','\u005b\u007a\u005f\u005b\u0068\u0036\u002f\u0032\u0054\u002b\u004a','\x70\x3c\x4f\x28\x60\x45\x22\x4a\x58\x2e\x5d\x39\x7b\x70\x77\x6f\x47\x54\x34\x2c\x46','\u005a\u0023\u0023\u0062\u0069\u004f\u0049\u005e\u0068\u0044\u0067','\x5a\x23\x75\x6b\x26\x4c\x3e\x7c\x63\x39\x4c\x3f\x6f\x40',KVT1mG(-0x59),'\u006f\u0042\u004e\u002c\u0038\u0050\u005d\u0059\u003a\u0039\u0053\u0023\u0073\u0058\u004a\u0024\u0054\u004d\u0051\u0055\u0053\u003a\u005e\u0047\u0062\u004e\u0058\u0076\u006a\u0041\u0041\u0035\u002c\u0047\u0051\u0038\u004a\u0062\u0043\u0043\u0074\u0043\u0067','\u003e\u002e\u0055\u0064\u0070\u0058\u006a\u0069\u0076\u003a\u004d\u005b\u003c\u002c\u0041\u007d\u0038\u005d\u004f\u0064\u002f\u003a\u0050\u0073\u0043\u0035\u002b\u0074\u0071\u0050\u0058\u007c\u005e\u0049\u0022\u004d\u0060\u005d\u003a\u0026\u0022\u0054\u0068\u003c\u0079\u0039\u005b\u0051\u005a\u002f',HfZ7ZJ(KVT1mG(-0x5d)),HfZ7ZJ(0x8),HfZ7ZJ(KVT1mG(-0x5d)),'>.UdpXjiv:M[<,A}TO>5/:PsC5{B}r7O!/X~PTNLB?=ad*w2>VZB$!1+z:XE"x','G8RbQ?x','\x70\x3c\x5d\x4b\x34\x4f\x65\x34\x63\x4d\x69\x28\x38\x2e\x2e\x5d\x2b\x47\x30\x69\x3c\x52\x4e\x46\x63\x32\x58\x52\x54\x5e','\u0047\u0038\u005a\u006b\u005b\u004f\u0033\u005e\u005b\u0024','\x6a\x6f\x2e\x41\x50\x7c\x43\x4f\x6c\x4d\x28\x3b\x56\x70\x44\x7a\x5f\x40\x48\x2c\x62\x58\x4a\x7c\x41\x31\x4b\x4d\x21\x3b\x61\x3a','\u0021\u007b\u0044\u0057\u004e\u0056\u0058\u002e\u0073\u006a\u0076\u0047\u005d','\x39\x3a\x35\x34\x7d\x28\x25\x7d\x5a\x61\x3f\x4d\x7b\x3c\x3c\x35\x5b\x21\x75\x3f\x7e',HfZ7ZJ(0x9),'CG[20dB#T+bMzp;Pg8@k20s|:901/','\u004f\u007b\u003b\u0062\u0048\u0033\u005e\u003f\u0060','_>aY=K.x','\x59\x5f\x77\x37\x4d\x64\x5e','^@7bW',HfZ7ZJ(KVT1mG(-0x44)),HfZ7ZJ(0xb),'\x41\x3a\x66\x62\x45\x4f\x3e\x7c\x68\x31\x5e\x6a\x2f','\u0034\u0033\u004e\u002c\u0062\u004c\u0065\u0043\u0023\u0043\u0074\u0075\u002f','\x6c\x5a\x7c\x28\x78\x51\x5a\x3c\x44\x42\x2e\x55\x2f','\x32\x21\x31\x41\x52\x28\x5e',HfZ7ZJ(KVT1mG(-0x47)),HfZ7ZJ(KVT1mG(-0x39)),'\x72\x76\x48\x61\x6d\x39\x3c\x62','dE=^9y{b','\x44\x38\x7e\x62\x74\x77\x52\x7c\x49\x25\x25\x53\x4d\x7e\x7b\x2c\x68\x70\x42\x28\x69\x44\x45\x71\x67\x6d\x75\x32\x4c\x6e\x3b\x7d\x3f\x67\x33\x30\x33\x36\x33\x6b\x23\x21\x46\x4f\x6f\x6e\x3f\x76\x75\x3c\x45\x3f\x41\x52\x2f\x7b\x3c\x72\x31\x33\x2f\x5e\x5f\x4a\x4b\x61\x53\x7d\x5d\x69\x43\x78\x34\x6b\x53\x23\x6a\x44\x70\x26\x3c\x46\x57\x51\x49\x52\x72\x4b\x7a\x41\x61\x6d\x33\x23\x23\x4d\
// prettier-ignore
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"])