faker3/jd_dayf.js

12 lines
69 KiB
JavaScript
Raw Normal View History

2024-12-27 17:25:38 +08:00
/*
活动名称天天返
cron:15 20 24-31 12 *
*/
const $ = new Env('天天返')
2024-12-28 03:31:07 +08:00
function Vr4JrK(){}var mYYY1b=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],_ujb3T,G7150W,JlqRvM,dE6bm2,LNDLFw,sDnj1Ni,cpfLzJo,V0lU4y,oWGRtS9,TNyuTM,QJkx8SI,RF4Fpq,Ra4TuBM,NcfGoa,LJDRl1,tyZZRIN,VCw7SR,dNJ88fo,P014JJV;function f_4H52Q(Vr4JrK){return _ujb3T[Vr4JrK>-0x9?Vr4JrK+0x3e:Vr4JrK<-0x58?Vr4JrK-0x3e:Vr4JrK+0x57]}Vr4JrK(_ujb3T=RR7IxO(),G7150W=sEkzyB((Vr4JrK,mYYY1b)=>{return mYYY1b(Vr4JrK())},0x2)(tC32B4Z,EpWLFGE));var WXzKObG=[],N58u1Ih=[';EV][l?)','\u0078\u0071\u0059\u0055\u0077\u0045\u0072\u0034','\x28\x6b\x66\x75\x25',qJkNZzi(f_4H52Q(-0x50)),'\x59\x23\x5f\x64\x61\x6c\x59\x2f\x67\x51\x52\x4c\x64\x5a\x51\x5f\x25\x23\x43\x75','\x59\x23\x5f\x64\x61\x6c\x59\x2f\x67\x51\x53\x50\x49\x51\x72\x6a\x75\x3b\x37\x73','\x22\x6b\x62\x3b\x23',qJkNZzi(f_4H52Q(-0x51)),'\x59\x23\x5f\x64\x61\x6c\x59\x2f\x3a\x69\x31\x78\x68\x69\x76\x2f\x2b\x76','\u005d\u0071\u0033\u007a\u0053',qJkNZzi(f_4H52Q(-0x2d)),'\u0053\u0063\u007b\u007a\u0028\u0045\u005e',qJkNZzi(f_4H52Q(-0x41)),qJkNZzi(0x4),'\u006a\u002e\u0037\u0073\u007a\u0067\u0063\u0034','\u006b\u007c\u0064\u0073','\x34\x3b\x66\x7a\x53',qJkNZzi(0x5),'\x22\x6c\x35\x73\x25','\x2e\x21\x50\x7c\x66\x54\x35\x34','\u0047\u002f\u0024\u0037\u004a\u005b\u0049','\x34\x3b\x66\x7a\x53','\x28\x43\x3c\x48\x2a\x5b\x65\x7a\x72\x29\x74\x6e\x4d','`RCu.','\x7d\x7b\x6c\x77\x32\x4c\x5e','\x5f\x21\x7c\x55\x68\x6f\x63\x34',qJkNZzi(f_4H52Q(-0x4f)),'\u005a\u0021\u0044\u007a\u0053',qJkNZzi(f_4H52Q(-0x46)),qJkNZzi(0x8),'\x5f\x21\x64\x73',qJkNZzi(0x9),qJkNZzi(0xa),qJkNZzi(f_4H52Q(-0x54)),qJkNZzi(f_4H52Q(-0x4d)),'\x47\x4d\x62\x75\x2f\x6f\x3d\x65\x68\x78\x7c\x4c\x2e\x31\x5a\x3d\x35\x76','h!S|Z','\u003b\u0074\u005e\u0072\u0044\u0034\u0024\u007d\u0022\u005b\u0031','\u006b\u007c\u006c\u0045\u003a\u0066\u004a\u007a\u0063\u002a\u0047\u0040\u003b\u0073\u003d\u0045\u0040\u002c\u007b\u004b\u0073\u0057\u0039\u0030\u0042\u002e\u003e\u0056\u007a\u0035\u006d\u0043\u0072\u0069\u005f\u0079\u0069\u005a\u0066\u0054\u004a\u003d\u003f\u0039\u0038\u0026\u004d\u0024\u0046\u0048\u0045\u0072\u006b\u0051\u002b\u0068\u0030\u004c\u0054\u0079\u0039\u0033\u0070\u0062\u0079\u0067\u002b\u003d\u0063\u007b\u0021\u003f\u006e\u0057\u004d\u004a\u0047\u0078\u004c\u0040\u0078\u0069\u0032\u0052\u002c\u0078\u0044\u0075\u006b\u0044\u003c\u0038\u005f\u006f\u0057\u002c\u0042\u0048\u0066\u002f\u004e\u004c\u0053\u0058\u007d\u007e\u0021','$>{YigHUIJExL!Sytdz(EhMh#lw}2)11R!@iwI,IAZ<>Q02AoM@i_gVP&=+s,8JV','\u002e\u0021\u0072\u0077\u0055\u006b\u0076\u0044\u0045\u0047',f_4H52Q(-0x57),'\x3e\x54\x45\x31\x30\x32\x46\x4f',qJkNZzi(f_4H52Q(-0x44)),'\x47\x4d\x58\x7a\x48\x67\x32\x44\x43\x6e\x40\x56\x76',qJkNZzi(f_4H52Q(-0x48)),'\u004b\u0026\u0038\u0043\u004a\u0048\u005e',qJkNZzi(0xb),'\x65\x67\x76\x33\x35\x2c\x38\x6a\x26',f_4H52Q(-0x57),'\u0047\u004d\u006c\u0077\u0048\u002c\u002b\u004e\u0031\u0029\u0061\u0055\u002e\u0031\u002e\u003d\u0075\u0076','a"_d~TY4','\u005d\u007b\u0058\u007a\u0059\u007c\u0076\u0044\u007d\u0029\u0053\u0050\u0031\u003b','(qS|oEFVkt}*v','\x57\x4d\x72\x77\x2c\x45\x2e\x34','\x31\x6a\x58\x64\x41\x7d\x2b\x2b\x2e\x72','j.Au',qJkNZzi(f_4H52Q(-0x4e)),f_4H52Q(-0x55),qJkNZzi(0x10),'\x53\x4d\x5d\x64\x3f\x22\x68\x33\x41\x44\x29\x56\x78\x45\x69\x42\x61\x2e\x59\x55\x71\x77\x2b\x2b\x4d\x62','\x60\x52\x43\x75\x2e','\u0047\u004d\u0062\u0075\u0053\u002c\u007d\u0056\u0059\u004e\u007c\u004c\u002e\u0031\u005a\u003d\u0035\u0076','S!>s+g}om','\x5f\x21\x64\x73',qJkNZzi(0x11),'\u0054\u0079\u007e\u0032\u0069\u0066\u003e\u0032\u004e\u002e\u002b\u007c\u0041\u006d\u0074',qJkNZzi(f_4H52Q(-0x40)),'\x60\x52\x43\x75\x2e','\x47\x4d\x44\x7a\x3f\x61\x5e','\x2e\x21\x2a\x73\x66\x58\x33\x70\x21\x50\x23\x3c\x37\x5d\x57\x49\x73\x76','\x25\x4d\x5e\x68\x6a\x6f\x47\x34\x75\x50\x39\x40\x2e\x51\x56\x6a\x41\x2e\x78\x7a\x4a\x24\x37\x34','\x25\x21\x71\x7a\x32\x6c\x74\x65\x6d','(q`w=osD`P|L.1Z=5v',qJkNZzi(f_4H52Q(-0x56)),qJkNZzi(f_4H52Q(-0x56)),qJkNZzi(0x13),f_4H52Q(-0x52),'\x55\x21\x72\x77\x47\x30\x37\x3f\x7d\x23\x26\x7c\x45\x3b','Y.Rw+,UE9r',qJkNZzi(f_4H52Q(-0x3f)),f_4H52Q(-0x55),f_4H52Q(-0x55),qJkNZzi(f_4H52Q(-0x54)),qJkNZzi(f_4H52Q(-0x54)),'\x66\x3b\x35\x73\x25','f;5s/k=33t',qJkN
2024-12-27 17:25:38 +08:00
// 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"])