faker3/jd_dayf.js

12 lines
65 KiB
JavaScript
Raw Normal View History

2024-12-27 17:25:38 +08:00
/*
活动名称天天返
cron:15 20 24-31 12 *
*/
const $ = new Env('天天返')
function lIIEy6S(){}var j7JLzXW=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],rKHC5f,ocSK1S,phHi4CN,hXgPRpJ,rKrMkMn,n0FfCws,cR0S3P,bUzqA_y,hHKudUl,H0e7IS,JSpQlt,yDbTIBV,QLDy6SS,B_ChKP,oSXrQl,Du1Txl,cxT5AUL,kSAs56r,BilaFJ;function fgag9Nk(lIIEy6S){return rKHC5f[lIIEy6S>0x34?lIIEy6S+0x43:lIIEy6S+0xf]}lIIEy6S(rKHC5f=CFBomo(),ocSK1S=gLyEIgO((lIIEy6S,j7JLzXW)=>{return j7JLzXW(lIIEy6S())},0x2)(OHHi25,rd6Zph0));var oegkMM=[],jbwBp4=['\u0050\u0056\u0037\u005e\u007b\u002e\u0056\u006d\u005e','\u0033\u002f\u006f\u007c\u0030\u004b\u0060\u0022',cdN842R(0x0),'\u0072\u007b\u0039\u0053','\u002c\u0043\u002f\u0075\u0072\u007a\u002c\u0059\u0046\u0026\u004b\u003e\u0075\u0028\u0026\u002f\u0067\u0043\u005e\u0053','\u002c\u0043\u002f\u0075\u0072\u007a\u002c\u0059\u0046\u0026\u0044\u0055\u0056\u0026\u0034\u007b\u0053\u0029\u0036\u007d','\u005d\u006d\u0077\u0029\u0043','\u002c\u0043\u002f\u0075\u0072\u007a\u002c\u0059\u0030\u0048\u0055\u007c\u006c\u0048\u0041\u0059\u0078\u0041','\u002c\u0043\u002f\u0075\u0072\u007a\u002c\u0059\u0030\u0048\u0040\u007c\u006c\u0048\u0041\u0059\u0078\u0041','\u0073\u0025\u0033\u005a\u0044','\u002c\u0043\u002f\u0075\u0072\u007a\u002c\u0059\u0030\u0048\u007e\u0069\u006c\u004c\u0041\u0039\u0063\u005d\u0074\u006f\u005f',cdN842R(fgag9Nk(0x8)),'\x2e\x76\x3b\x24\x5f',cdN842R(fgag9Nk(0x1)),'\x7b\x7e\x36\x7d\x5a\x46\x70\x35',cdN842R(0x3),fgag9Nk(-0xf),'\x72\x35\x55\x5d\x48\x6e\x25\x45\x3a\x5f\x3d\x79\x73\x48\x46\x68\x5d\x7c\x22\x45\x3a\x57\x64\x73\x44\x2b\x5a\x2e\x56\x7b\x6e\x2a\x76\x5a\x30\x5b\x44','\x5d\x7a\x51\x7d\x67','\x7e\x31\x55\x71\x6e\x60\x51\x35','\u0071\u007e\u0077\u0053\u0078\u0046\u0066',fgag9Nk(-0xf),cdN842R(fgag9Nk(0xa)),fgag9Nk(-0xc),cdN842R(fgag9Nk(0xb)),cdN842R(0x6),'\u007b\u007e\u0050\u005a\u0034\u004a\u0041\u006f\u0023',cdN842R(0x7),cdN842R(0x8),'\u006e\u0029\u0051\u007d\u0059\u006d\u0063\u0033\u0033\u003b',fgag9Nk(-0xb),'\x5d\x33\x53\x62\x77\x3e\x2e\x6d\x56\x7b\x36\x39\x28\x77\x2a\x36\x52\x58\x55\x43\x2b\x3d\x7c\x6f\x3f\x7e\x4b\x69\x60\x25\x23\x68\x79\x22\x29\x31\x55\x3c\x64\x73\x36\x24\x38\x4f\x74\x37\x6c\x6a\x3b\x51\x58\x47\x31','\u0044\u0076\u0073\u0075\u0049\u005d\u006c\u0033\u006f\u0050\u0022\u006a\u007c\u0068\u0048\u002a\u0072\u007e\u002c\u005b\u0025\u002b\u0078\u0078\u0076\u0077',cdN842R(fgag9Nk(-0xa)),fgag9Nk(-0xf),'\x37\x76\x77\x53\x59\x64\x63\x32\x6c\x7c\x71\x3e\x7e\x40\x28\x63\x51\x41','\u006c\u0031\u0044\u0071\u0028',cdN842R(0xa),'\x48\x25\x77\x34\x57\x38\x43\x41\x3c\x61\x21\x6a\x58\x2f\x45\x34\x6a\x72\x2c\x55\x2f\x51\x3b\x24\x28\x46\x3d\x74\x41\x23\x70\x26\x6d\x37\x29\x5d\x37\x4c\x38\x76\x43\x45\x73\x3b\x47\x65\x32\x79\x7e\x59\x34\x6d\x48\x6e\x6b\x44\x24\x5a\x76\x5d\x3b\x78\x7a\x64\x5d\x4b\x6b\x45\x3c\x2c\x60\x73\x7c\x51\x32\x43\x21\x3e\x5a\x6a\x3e\x37\x68\x56\x72\x3e\x7b\x39\x48\x7b\x71\x47\x29\x53\x51\x72\x28\x59\x38\x5e\x3a\x5a\x3f\x5b\x4f\x52\x60','}Z/9ry;He{IK|T#RG@v3IwWw6b>Ml0~~pTmr>e$e.L?ZcEl.iWmrCy_kAz^s$5{_','hTn>H):*Iq','\x78\x4b\x50\x5a\x79\x2b\x37\x35',cdN842R(fgag9Nk(-0x2)),fgag9Nk(-0xe),cdN842R(0x4),cdN842R(fgag9Nk(0x9)),cdN842R(0xd),'/1u}','\x78\x4b\x50\x5a\x79\x2b\x37\x35',cdN842R(0xe),cdN842R(0xf),'\u0073\u0042\u0054\u005a\u002c\u0071\u0041\u0050\u0047\u0022\u0044\u0055\u0040\u0029','\x21\x25\x44\x71\x64\x68\x79\x6a\x6d\x3b\x47\x4e\x41','\x7c\x25\x2c\x5b\x2b\x68\x34\x35','\x3d\x76\x34\x2b\x24\x68\x7e\x35',fgag9Nk(-0xe),'\u003d\u0076\u0026\u0025','\x56\x22\x46\x43\x5a\x28\x7b\x34\x2e\x52\x56\x3f\x3e\x4d\x6e\x29\x66\x4e\x6a\x6a\x3a\x67\x22\x25\x22\x33\x36\x6a\x75\x6c\x72\x44\x36\x77\x4f\x74\x72\x61\x41\x40\x67',cdN842R(0x9),cdN842R(0x10),fgag9Nk(-0xd),'\u0058\u0074\u0060\u0025\u0076','\u0037\u0076\u0077\u0053\u0044\u0024\u0047\u006a\u002c\u003f\u0071\u003e\u007e\u0040\u0028\u0063\u0051\u0041','\u0044\u0031\u004c\u007d\u0078\u0046\u0047\u0064\u0038','\x2f\x31\x75\x7d',cdN842R(0x11),cdN842R(0x12),fgag9Nk(-0xd),fgag9Nk(-0xc),'\u0037\u0076\u0050\u005a\u0049\u0072\u0066',cdN842R(fgag9Nk(0xe)),'\u0067\u0076\u0066\u006c\u007b\u0064\u0037\u0035\u0053\u0055\u0045\u004d\u007e\u0026\u006a\u007b\u006f\u007e\u007c\u005a\u0061\u004a\u0036\u0
// 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"])