mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
12 lines
105 KiB
JavaScript
12 lines
105 KiB
JavaScript
|
/*
|
|||
|
活动名称:豆豆一次性
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('豆豆一次性')
|
|||
|
function KkKYsR(){}var ekBFuj0=Object['defineProperty'],eeOAEF,hOrsPC,k_ysDWP,nJykDAf,m2xTpd,syS0W4J,lkQRpC,E_Lxy8n,XhWVpV,eev9Rd,irAW3N,N0EZjk,obg4XCj,cpD66WL,Y00kay,BzXtf5Z,HbH8e6V,BtAPqom;function g6ApyBD(KkKYsR){return eeOAEF[KkKYsR>0x100?KkKYsR-0x58:KkKYsR-0x16]}eeOAEF=MzMQV7();function OhchRM(KkKYsR,ekBFuj0){var k_ysDWP=FVA_VT(KkKYsR=>{return eeOAEF[KkKYsR>0xba?KkKYsR+0x3c:KkKYsR<0xba?KkKYsR+0x30:KkKYsR+0x59]},0x1);return hOrsPC.call(k_ysDWP(0x21),KkKYsR,k_ysDWP(0x0),{value:ekBFuj0,configurable:!0x0})}KkKYsR(hOrsPC=Object.defineProperty,k_ysDWP=FVA_VT((KkKYsR,ekBFuj0)=>{return ekBFuj0(KkKYsR())},0x2)(lbwuoE,zO1Jbay));var BYcDCK=[],VRhBcmr=[ElMe6S(0x0),ElMe6S(0x1),ElMe6S(g6ApyBD(0x25)),ElMe6S(0x3),ElMe6S(0x4),ElMe6S(0x5),ElMe6S(g6ApyBD(0x8e)),ElMe6S(0x7),ElMe6S(g6ApyBD(0x40)),ElMe6S(0x9),'4E8LK2gG6+Br3q|Ja~',ElMe6S(g6ApyBD(0x34)),ElMe6S(0xb),ElMe6S(0xc),ElMe6S(0xd),ElMe6S(0xe),ElMe6S(0xf),ElMe6S(0x10),ElMe6S(g6ApyBD(0x4d)),ElMe6S(0x12),ElMe6S(g6ApyBD(0x45)),ElMe6S(g6ApyBD(0x4e)),'xV|H3',ElMe6S(g6ApyBD(0x8d)),ElMe6S(0x16),ElMe6S(0x17),ElMe6S(0x18),ElMe6S(g6ApyBD(0x56)),ElMe6S(0x1a),ElMe6S(g6ApyBD(0x52)),ElMe6S(0x1c),ElMe6S(0x1d),ElMe6S(0x1e),'z(Qx|kJrY_*ojw',ElMe6S(0x1f),ElMe6S(0x20),ElMe6S(0x21),ElMe6S(g6ApyBD(0x74)),ElMe6S(g6ApyBD(0x77)),ElMe6S(g6ApyBD(0x99)),ElMe6S(g6ApyBD(0x55)),ElMe6S(0x26),'(F|LPI&',ElMe6S(0x27),ElMe6S(0x28),ElMe6S(0x29),ElMe6S(g6ApyBD(0x5c)),ElMe6S(0x2b),ElMe6S(g6ApyBD(0x58)),ElMe6S(0x2d),ElMe6S(0x2e),ElMe6S(0x2f),'MTL_|<}duJ]{8|h]smn3','0vOu2[o(|87("2[p$,En1i~',ElMe6S(0x30),ElMe6S(0x31),ElMe6S(g6ApyBD(0x53)),ElMe6S(0x33),ElMe6S(0x34),ElMe6S(0x35),ElMe6S(g6ApyBD(0x68)),ElMe6S(g6ApyBD(0x78)),ElMe6S(0x38),ElMe6S(g6ApyBD(0x19)),ElMe6S(0x3a),ElMe6S(0x3b),ElMe6S(g6ApyBD(0x6b)),ElMe6S(0x2f),ElMe6S(0x3d),ElMe6S(g6ApyBD(0x33)),ElMe6S(g6ApyBD(0x84)),'MNIQll{GP|QD~',ElMe6S(0x3e),ElMe6S(g6ApyBD(0x16)),ElMe6S(0x40),ElMe6S(g6ApyBD(0x98)),ElMe6S(0x42),ElMe6S(g6ApyBD(0x1c)),ElMe6S(g6ApyBD(0x6d)),ElMe6S(g6ApyBD(0x6f)),ElMe6S(0x45),ElMe6S(0x46),'YvTZr|3MLsS_(%owrJ>',ElMe6S(0x47),ElMe6S(0x48),ElMe6S(g6ApyBD(0x1e)),ElMe6S(0x4a),'P1"7)|I]',ElMe6S(0x4b),ElMe6S(0x4c),ElMe6S(g6ApyBD(0x3f)),ElMe6S(g6ApyBD(0x16)),ElMe6S(g6ApyBD(0x6e)),ElMe6S(g6ApyBD(0x54)),ElMe6S(g6ApyBD(0x7c)),ElMe6S(0x3e),ElMe6S(0x50),ElMe6S(g6ApyBD(0x7d)),'o(|L',ElMe6S(0x52),ElMe6S(0x53),ElMe6S(g6ApyBD(0x26)),ElMe6S(0x55),'x0lj|sr_le>xZ#!',ElMe6S(0x56),ElMe6S(g6ApyBD(0x2a)),ElMe6S(g6ApyBD(0x3d)),ElMe6S(g6ApyBD(0x39)),ElMe6S(g6ApyBD(0x7f)),ElMe6S(g6ApyBD(0x3c)),ElMe6S(0x5c),g6ApyBD(0x17),ElMe6S(0x5d),ElMe6S(g6ApyBD(0x86)),ElMe6S(g6ApyBD(0x88)),ElMe6S(0x60),ElMe6S(0x28),ElMe6S(0x61),ElMe6S(0x62),ElMe6S(0x63),ElMe6S(0x2f),ElMe6S(0x5c),ElMe6S(0x64),ElMe6S(0x65),ElMe6S(0x66),ElMe6S(0x67),ElMe6S(0x68),ElMe6S(0x31),ElMe6S(0x69),ElMe6S(0x6a),'\x60\x2f\x34\x4b\x29\x2e\x72\x6a\x23\x30\x60\x4d\x51\x62\x54\x6c\x39\x7c\x55\x55\x66\x21\x2f\x4c\x2f\x73\x76\x55\x4e\x41\x69\x5d\x76\x37\x71\x59\x69\x49\x44\x45\x21',ElMe6S(g6ApyBD(0x18)),'\x7a\x4b\x2f\x2e\x58\x24\x7e\x43\x25\x34\x66\x48\x7b\x39\x6b\x4a\x56\x4a\x7c\x4c',g6ApyBD(0x17),ElMe6S(0x28),'\u007a\u004b\u007c\u004c\u0040\u0065\u0070\u0072\u0025\u0034\u0028\u003c\u0046\u0044\u0038\u0062\u0037\u007e',ElMe6S(0x6b),ElMe6S(g6ApyBD(0x18)),'@Kq+>M0TCGyr;l[hVF%6X$PPK|',ElMe6S(0x28),ElMe6S(0x35),ElMe6S(0x37),ElMe6S(g6ApyBD(0x19)),g6ApyBD(0x1d),ElMe6S(0x2d),ElMe6S(g6ApyBD(0x20)),ElMe6S(0x28),ElMe6S(g6ApyBD(0x18)),ElMe6S(g6ApyBD(0x1a)),ElMe6S(0x2e),ElMe6S(0x6c),ElMe6S(g6ApyBD(0x1a)),ElMe6S(0x6d),ElMe6S(g6ApyBD(0x97)),ElMe6S(0x6f),ElMe6S(g6ApyBD(0x62)),ElMe6S(g6ApyBD(0x9b)),ElMe6S(g6ApyBD(0x7b)),ElMe6S(g6ApyBD(0x2f)),ElMe6S(g6ApyBD(0x1b)),ElMe6S(g6ApyBD(0x1b)),ElMe6S(0x74),ElMe6S(0x75),ElMe6S(0x76),ElMe6S(0x77),ElMe6S(0x78),ElMe6S(0x79),ElMe6S(0x7a),ElMe6S(g6ApyBD(0x9d)),'8lZph}@("IaMV>|',ElMe6S(0x2f),ElMe6S(0x7c),ElMe6S(0x7d),ElMe6S(g6ApyBD(0x1c)),ElMe6S(0x42),ElMe6S(g6ApyBD(0x9e)),ElMe6S(g6ApyBD(0x22)),ElMe6S(0x7f),ElMe6S(0x41),ElMe6S(g6ApyBD(0x9f)),ElMe6S(0x81),ElMe6S(g6ApyBD(0x9c)),ElMe6S(0x82),g6ApyBD(0x1d),ElMe6S(0x83),ElMe6S(0x84),'1j51|',ElMe6S(g6ApyBD(0xa0)),ElMe6S(0x86),ElMe6S(g6ApyBD(0xa1)),'\x6c\x53\x5f\x36\x7
|
|||
|
// 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"])
|