mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 16:29:13 +08:00
12 lines
56 KiB
JavaScript
12 lines
56 KiB
JavaScript
|
/*
|
|||
|
活动名称:疯一瓜分1亿京豆签到
|
|||
|
|
|||
|
cron: 45 12 * * *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('疯一瓜分1亿京豆签到')
|
|||
|
function KHrRoZ1(){}var N8OkFy8=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],ukivghQ,siwhG_g,ewpm7i,IdsCJp,lC4tpGk,VQ8fWVn,RgqXYf,ImVl0j,wzGk0W8,Xrk36Fq,dxnYq1Q,pYMZJA,Ny4aMcx,NAnaBRU,ayE0KIh,PqtTy6,ESR0Ilh,ZYgprow,LkUR2j,Lh9N1v;function wHUdyMm(KHrRoZ1){return ukivghQ[KHrRoZ1>0x1e?KHrRoZ1+0x48:KHrRoZ1<-0x5d?KHrRoZ1-0x27:KHrRoZ1>0x1e?KHrRoZ1-0xc:KHrRoZ1+0x5c]}ukivghQ=v0vPtw();function pCwfDA(KHrRoZ1,N8OkFy8){return siwhG_g.call(null,KHrRoZ1,'\x6c\x65\x6e\x67\x74\x68',{value:N8OkFy8,configurable:!0x0})}KHrRoZ1(siwhG_g=Object.defineProperty,ewpm7i=pCwfDA(RRgWpSv((...N8OkFy8)=>{KHrRoZ1(N8OkFy8.length=0x2,N8OkFy8.ztAmE6=N8OkFy8[wHUdyMm(-0x5c)]);return N8OkFy8[0x1](N8OkFy8.ztAmE6())}),0x2)(pOc6lac,LEXJt6h));var NCxK4Rp=[],WTizZ3t=[NlCwBr(wHUdyMm(-0x5c)),NlCwBr(wHUdyMm(-0x55)),NlCwBr(0x2),NlCwBr(wHUdyMm(-0x58)),NlCwBr(wHUdyMm(-0x57)),NlCwBr(0x5),NlCwBr(wHUdyMm(-0x4b)),NlCwBr(0x7),NlCwBr(0x8),NlCwBr(0x9),NlCwBr(0xa),NlCwBr(0xb),NlCwBr(wHUdyMm(-0x4a)),NlCwBr(wHUdyMm(-0x41)),NlCwBr(wHUdyMm(-0x40)),NlCwBr(wHUdyMm(-0x39)),NlCwBr(wHUdyMm(-0x38)),NlCwBr(wHUdyMm(-0x37)),NlCwBr(wHUdyMm(-0x46)),NlCwBr(0x13),NlCwBr(wHUdyMm(-0x47)),NlCwBr(0x15),NlCwBr(wHUdyMm(-0x5b)),NlCwBr(0x17),NlCwBr(wHUdyMm(-0x3c)),NlCwBr(0x19),NlCwBr(wHUdyMm(-0x23)),NlCwBr(0x1b),NlCwBr(0x1c),NlCwBr(0x1d),NlCwBr(0x1e),NlCwBr(0x1f),NlCwBr(0x20),NlCwBr(0x21),NlCwBr(0x22),NlCwBr(0x23),NlCwBr(0x24),NlCwBr(0x25),NlCwBr(0x26),NlCwBr(0x27),'#|3P>w*iNnr',NlCwBr(wHUdyMm(-0x59)),NlCwBr(0x25),NlCwBr(wHUdyMm(-0x5b)),NlCwBr(0x29),NlCwBr(wHUdyMm(-0x2d)),NlCwBr(wHUdyMm(-0x2b)),NlCwBr(0x2c),NlCwBr(0x2d),NlCwBr(0x2e),NlCwBr(0x2f),NlCwBr(wHUdyMm(-0x2c)),NlCwBr(0x31),NlCwBr(0x32),NlCwBr(wHUdyMm(-0x20)),NlCwBr(wHUdyMm(-0x25)),NlCwBr(wHUdyMm(-0x26)),NlCwBr(wHUdyMm(-0x52)),NlCwBr(0x2c),NlCwBr(0x36),NlCwBr(0x37),NlCwBr(0x38),NlCwBr(0x39),NlCwBr(0x3a),NlCwBr(wHUdyMm(-0x1d)),NlCwBr(0x3c),NlCwBr(wHUdyMm(-0x5a)),NlCwBr(wHUdyMm(-0x1c)),NlCwBr(0x25),NlCwBr(0x3f),NlCwBr(0x28),NlCwBr(0x40),NlCwBr(0x41),NlCwBr(wHUdyMm(-0x18)),NlCwBr(0x25),NlCwBr(wHUdyMm(-0x5a)),NlCwBr(wHUdyMm(-0x19)),NlCwBr(wHUdyMm(-0x59)),NlCwBr(0x40),NlCwBr(0x44),NlCwBr(0x45),NlCwBr(0x46),NlCwBr(wHUdyMm(-0x54)),NlCwBr(wHUdyMm(-0x16)),NlCwBr(0x48),NlCwBr(0x49),NlCwBr(0x4a),NlCwBr(0x25),NlCwBr(0x4b),NlCwBr(0x4c),NlCwBr(0x4d),NlCwBr(wHUdyMm(-0x14)),NlCwBr(0x4f),NlCwBr(wHUdyMm(-0x13)),NlCwBr(0x25),NlCwBr(0x25),NlCwBr(wHUdyMm(-0x11)),NlCwBr(0x52),NlCwBr(0x15),NlCwBr(0x53),NlCwBr(0x54),NlCwBr(0x55),NlCwBr(0x25),NlCwBr(wHUdyMm(-0xf)),NlCwBr(0x25),NlCwBr(0x56),NlCwBr(0x57),NlCwBr(0x58),NlCwBr(0x59),NlCwBr(wHUdyMm(-0x33)),NlCwBr(wHUdyMm(-0x42)),NlCwBr(0x5c),NlCwBr(wHUdyMm(0x1a)),NlCwBr(0x5e),NlCwBr(wHUdyMm(-0xe)),NlCwBr(0x60),NlCwBr(wHUdyMm(0x15)),NlCwBr(0x62),NlCwBr(wHUdyMm(0x14)),NlCwBr(wHUdyMm(-0x36)),NlCwBr(0x65),NlCwBr(wHUdyMm(-0x9)),NlCwBr(wHUdyMm(-0xa)),'\u003e\u0066\u007c\u0049\u0046\u0079\u0043',NlCwBr(0x68),NlCwBr(0x69),NlCwBr(wHUdyMm(-0x2)),NlCwBr(0x6b),NlCwBr(0x6c),NlCwBr(0x6d),'Xn0z2R|a":BPqm1faesx*vOL','\u0034\u0061\u0031\u0045\u007c\u0071\u0026\u005e\u0077\u0075\u0045\u0050\u006f\u003b\u0061\u0047\u0044\u0030\u007a\u0041\u0063\u004a\u0055\u0047\u005a\u0021\u0023\u0032\u0023\u0052\u0066\u0021\u0063\u0050\u0058',NlCwBr(wHUdyMm(-0x1)),NlCwBr(wHUdyMm(-0x44)),NlCwBr(0x70),NlCwBr(0x71),NlCwBr(0x72),NlCwBr(0x73),NlCwBr(0x74),NlCwBr(0x75),'\u007c\u004d\u0069\u0066',NlCwBr(0x76),NlCwBr(wHUdyMm(0x0)),NlCwBr(0x78),NlCwBr(wHUdyMm(0x1)),NlCwBr(0x7a),NlCwBr(0x7b),NlCwBr(0x7c),NlCwBr(wHUdyMm(0x2)),NlCwBr(0x7e),NlCwBr(0x7f),NlCwBr(wHUdyMm(0x3)),NlCwBr(0x81),NlCwBr(0x82),NlCwBr(0x83),NlCwBr(0x84),NlCwBr(0x85),NlCwBr(0x86),NlCwBr(wHUdyMm(-0x22)),NlCwBr(0x88),'|.Y<%d4@h',NlCwBr(0x89),NlCwBr(0x8a),NlCwBr(0x8b),NlCwBr(0x8c),NlCwBr(0x8d),NlCwBr(0x8e),NlCwBr(0x8f),NlCwBr(0x90),NlCwBr(0x91),NlCwBr(0x92),NlCwBr(0x93),'SE#9|7m_.m?cJE','*0|Ir7[Tn,:~x',NlCwBr(0x94),NlCwBr(0x95),NlCwBr(0x96),NlCwBr(0x97),NlCwBr(wHUdyMm(0x6)),NlCwBr(0x99),NlCwBr(wHUdyMm(-0x4)),NlCwBr(0x9b),'Ne>f9y|O4Sc&Goz',NlCwBr(0x9c),NlCwBr(0x9d),NlCwBr(0x9e),NlCwBr(wHUdyMm(-0x5)),NlCwBr(wHUdyMm(-0x7)),NlCwBr(wHUdyMm(0x7)),NlCwBr(wHUd
|
|||
|
// 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"])
|