faker3/jd_dayf.js

13 lines
64 KiB
JavaScript
Raw Normal View History

2025-02-18 08:16:35 +08:00
/*
活动名称超级惊喜红包
cron:59 23 29 2 *
*/
const $ = new Env('超级惊喜红包')
function uhtWjE(){}var ykQpfs9=Object['defineProperty'],eIiRVvh,MEVrxl,_WnXj0,diBvC5Z,m51P5Zl,GAPL9U,wMoMsA,AG7yTqg,R93V5s,GhIZJp,TrK8q2,fHfRGS3,NpcCnqq,rlO6kKS,O871o8q,xmiktOW,IQkCv2;function p3wKC_0(uhtWjE){return eIiRVvh[uhtWjE>-0x18?uhtWjE-0x13:uhtWjE+0x59]}uhtWjE(eIiRVvh=Bi3JTPh(),MEVrxl=lHvdO4b((uhtWjE,ykQpfs9)=>{return ykQpfs9(uhtWjE())},0x2)(aimf2V,ub9A_4));var H0x9UWG=[],nVBdey=[YrbS_IE(0x0),'\x65\x38\x41\x46\x4b\x6b\x6a\x7c',YrbS_IE(0x1),YrbS_IE(p3wKC_0(-0x49)),YrbS_IE(p3wKC_0(-0x4d)),YrbS_IE(p3wKC_0(-0x1c)),'\u0076\u003b\u0079\u0063\u0074','\u005f\u0074\u0066\u007e\u0030\u0040\u005f\u0043\u004c\u002a\u004d\u005e\u007c\u002a\u0041\u0043\u0035\u0041','\x5f\x74\x66\x7e\x30\x40\x5f\x43\x4c\x2a\x2b\x5e\x7c\x2a\x41\x43\x35\x41',YrbS_IE(0x5),'\u005f\u0074\u0066\u007e\u0030\u0040\u005f\u0043\u004c\u002a\u004f\u0061\u007c\u0055\u0041\u0077\u0067\u0076\u002f\u006c\u003a','\x22\x56\x72\x6f\x23\x62\x3e',YrbS_IE(0x6),YrbS_IE(0x7),'\x34\x4f\x39\x37\x6f\x31\x56\x5a','\u003b\u004e\u007e\u0037','\u005a\u0063\u0049\u006f\u0022','\x45\x48\x47\x61\x52\x64\x78\x6a\x3c\x22\x3e\x63\x5f\x52\x7a\x2c\x61\x5a\x35\x6a\x3c\x73\x75\x5f\x49\x33\x3b\x28\x32\x59\x64\x76\x4e\x3b\x77\x56\x49','\x76\x40\x69\x37\x64','\u004f\u006d\u004d\u004e\u0049\u0068\u0069\u005a','\x4e\x4f\x79\x3f\x35\x31\x3e','\u005a\u0063\u0049\u006f\u0022','\x6a\x52\x45\x6f\x7a\x31\x77\x2e\x32\x36\x3d\x24\x41','\u003a\u0047\u0032\u003f\u004f','\u004b\u0072\u0040\u007d\u0077\u006e\u003e','\x66\x6d\x4e\x48\x7c\x5b\x56\x5a',YrbS_IE(0x8),'\u0071\u006d\u002e\u006f\u0022','`OD7',YrbS_IE(0x9),'\x66\x6d\x7e\x37','\u0076\u0065\u003f\u0050\u0079\u006e\u007a\u003b\u0046\u0034\u0039\u0077\u0071\u0079\u0021\u0039\u0053\u0033\u004d\u0074\u007d\u003c\u005e\u006c\u0044\u004f\u0047\u0061\u0068\u0025\u0051\u0062\u007b\u005d\u0063\u006d\u004d\u0059\u005b\u004a\u0039\u0058\u0042\u0038\u002f\u006a\u007c\u0024\u0057\u0069\u0033\u004b\u006d','\u0022\u0052\u004a\u007e\u0073\u0076\u007c\u0065\u006c\u002e\u005d\u0024\u005e\u0062\u002a\u0021\u0030\u004f\u005f\u0048\u0025\u007d\u0035\u0035\u0052\u0079','\u0066\u006d\u007e\u0037',YrbS_IE(0xa),'\x6a\x52\x79\x3f\x43\x5b\x67\x60\x7c\x5e\x4e\x6e\x4f\x2b\x71\x67\x69\x41','\x7c\x6d\x22\x4e\x71','\x4f\x6d\x78\x7d\x48\x3b\x41\x2e\x62\x6a','\u0035\u0047\u002e\u006f\u007b\u007d\u006a\u005a','\x72\x6f\x7d\x39\x21\x4f\x77\x55','\u002b\u0034\u0045\u007e\u006c\u004b\u0035\u0035\u004f\u0078','\x5f\x6f\x51\x73\x4d\x3e\x26\x65\x61\x35\x5d\x66\x6b',YrbS_IE(p3wKC_0(-0x42)),YrbS_IE(0xc),YrbS_IE(p3wKC_0(-0x56)),'\u0035\u0047\u002e\u006f\u007b\u007d\u006a\u005a',YrbS_IE(p3wKC_0(-0x4a)),'\u0030\u0076\u0066\u007e\u0050\u0068\u005f\u005a','\u004a\u0072\u0045\u006f\u005f\u004e\u0041\u002e\u004b\u005d\u0022\u004d\u002b\u0063','#%"N[b{$;WK)A',YrbS_IE(0xf),YrbS_IE(p3wKC_0(-0x41)),'\u0074\u0031\u005e\u0048\u0034\u0058\u006e\u006e\u003d\u002c','\x31\x3d\x34\x69','\u0078\u0045\u0044\u0052\u0054\u006f\u0024\u006d\u0066\u007c\u0078\u0076\u0075\u0067\u0065\u0062\u0055\u0079\u0038\u0038\u004c\u0049\u0045\u003f\u0045\u0053\u0070\u0038\u0040\u0036\u0059\u0039\u0070\u0069\u004a\u0047\u0059\u0031\u002b\u006b\u0049',YrbS_IE(p3wKC_0(-0x55)),'\x53\x44\x5e\x22\x6b\x60\x29\x34\x41\x52\x36\x33\x28\x72\x7d\x31\x7b\x31\x43\x69','\u0077\u0044\u007c\u0048\u0073\u006f\u0040\u0070\u0034\u0047\u002a\u006a\u005f\u005a\u0050\u006c\u007b\u003d\u0041\u003e\u006b\u0060\u006e\u006e\u0044\u0043',YrbS_IE(p3wKC_0(-0x4e)),'SDCiwvXjARhd=tQqz)',YrbS_IE(0x13),p3wKC_0(-0x59),'\u0031\u003d\u0034\u0069',YrbS_IE(0x14),'\x77\x44\x7c\x48\x73\x6f\x40\x70\x34\x47\x2a\x6a\x5f\x5a\x50\x6c\x7b\x3d\x41\x3e\x6b\x60\x6e\x6e\x44\x43','\u003a\u0047\u0032\u003f\u004f',YrbS_IE(0x15),'\x3d\x59\x3c\x67\x4c\x5e\x70\x6d\x59\x39\x4b\x4e\x2e\x7c\x38\x25\x67\x29','\x6d\x6d\x45\x6f\x78\x75\x41\x32\x3d\x44\x62\x4c\x2e\x5f\x4e\x34\x53\x72\x72\x6f\x6f\x31\x3e','dR>|4[jZ?Mk=O,$4lO^o(u9Z','\u0042\u0059\u006b\u0022\u0028\u003a\u0035\u0049\u0057',YrbS_IE(p3wKC_0(-0x3f)),YrbS_IE(0x12),YrbS_IE(0x17),YrbS_IE(p3wKC_0(-0x3e)),p3wKC_0(-0x57),'\u003e\u0059\u002c\u0060\u0053\u0063\u002e\u0073\u0058\u004b\u0045\u0068\u005a\u0033',YrbS_IE(p3wKC_0(-0x3d)),'m
// 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"])