faker3/jd_doudou.js

12 lines
93 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
活动名称豆豆一次性
cron:1 1 1 1 *
*/
const $ = new Env('豆豆一次性')
function OHKBIbH(){}var i4ciyAC=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],ZRMk_Rn,v7cGcdD,lQ1tGlG,nMFkaT0,SqrF5zX,FDgxbC5,eMI24L,mlA3QdI,bmOL5Ha,mPPD2v,jG_fLL,o4sNpwz,N38SEq,UkYHbO,OxqWSYk,ENaZrQ,aBFbxu;function Yhive7(OHKBIbH){return ZRMk_Rn[OHKBIbH<0x3e?OHKBIbH+0x60:OHKBIbH>0x3e?OHKBIbH-0x3f:OHKBIbH-0x1d]}ZRMk_Rn=yVFeebU();function ytVksWp(OHKBIbH,i4ciyAC){return v7cGcdD(OHKBIbH,Yhive7(0x4a),{value:i4ciyAC,configurable:Yhive7(0xb4)})}OHKBIbH(v7cGcdD=Object.defineProperty,lQ1tGlG=Pqzm4L((OHKBIbH,i4ciyAC)=>{return i4ciyAC(OHKBIbH())},0x2)(Gm0gWo,wTyfsoL));var KnTYdD=[],MbxTydl=[GvoLYq(Yhive7(0x4f)),GvoLYq(Yhive7(0x52)),GvoLYq(Yhive7(0x50)),GvoLYq(0x3),GvoLYq(0x4),GvoLYq(Yhive7(0x53)),GvoLYq(0x6),GvoLYq(0x7),GvoLYq(Yhive7(0x4e)),'&&>|(fe',GvoLYq(0x9),GvoLYq(0xa),GvoLYq(0xb),GvoLYq(0xc),GvoLYq(Yhive7(0x5d)),GvoLYq(0xe),GvoLYq(Yhive7(0x59)),GvoLYq(Yhive7(0x60)),GvoLYq(0x11),GvoLYq(Yhive7(0x5a)),GvoLYq(0x13),GvoLYq(0x14),GvoLYq(0x15),GvoLYq(Yhive7(0x71)),GvoLYq(Yhive7(0x5e)),GvoLYq(0x18),GvoLYq(0x19),'P_#K#b|!E$',GvoLYq(0x1a),GvoLYq(0x1b),GvoLYq(Yhive7(0x72)),GvoLYq(0x1d),GvoLYq(0x1e),GvoLYq(0x1f),'\u0049\u0047\u005a\u0040\u003f\u004c\u0039\u005e\u004a\u005f\u006b\u0068\u0070\u003f\u0066\u0061\u0040\u003d\u0030\u005e\u004a\u007e\u0050\u0070\u005b\u007c\u006e\u004d\u0041\u0022\u004c\u0078\u0045\u006e\u0029\u0028\u005b',GvoLYq(Yhive7(0xb0)),GvoLYq(Yhive7(0x74)),GvoLYq(Yhive7(0x75)),GvoLYq(Yhive7(0x76)),GvoLYq(0x24),'os3|.we',GvoLYq(Yhive7(0xab)),GvoLYq(0x26),GvoLYq(Yhive7(0x7e)),GvoLYq(Yhive7(0x43)),GvoLYq(0x29),'@7u#jwMvA"y.2jxyDQZ$|k=%{1+dC9Kah0&`Z5Ppy,}Vm/r>BgQo`',GvoLYq(Yhive7(0x49)),GvoLYq(Yhive7(0x82)),GvoLYq(Yhive7(0xc1)),GvoLYq(Yhive7(0x83)),Yhive7(0x41),GvoLYq(0x2d),GvoLYq(0x2e),GvoLYq(0x2f),GvoLYq(0x30),GvoLYq(Yhive7(0x8c)),GvoLYq(Yhive7(0x8d)),GvoLYq(0x33),GvoLYq(Yhive7(0x90)),GvoLYq(0x35),GvoLYq(0x36),GvoLYq(Yhive7(0x57)),'MfX|g',GvoLYq(Yhive7(0x40)),GvoLYq(0x39),GvoLYq(0x3a),GvoLYq(Yhive7(0x66)),'y@9nv|o>60+',GvoLYq(Yhive7(0x3f)),GvoLYq(0x3d),'kE;c0|?G',GvoLYq(Yhive7(0x3f)),GvoLYq(Yhive7(0x7f)),GvoLYq(0x3f),GvoLYq(0x40),GvoLYq(Yhive7(0x40)),GvoLYq(0x41),GvoLYq(0x42),GvoLYq(0x43),GvoLYq(0x44),GvoLYq(0x45),')Z>%d)|cM:',':B%Uywa~XheJqKs|',GvoLYq(0x46),GvoLYq(0x38),GvoLYq(0x47),GvoLYq(0x48),GvoLYq(0x49),GvoLYq(0x40),GvoLYq(0x4a),GvoLYq(0x4b),GvoLYq(0x4c),GvoLYq(Yhive7(0x94)),GvoLYq(Yhive7(0x93)),GvoLYq(0x4f),GvoLYq(0x50),'\x4b\x2a\x52\x6e\x64\x7c\x4b\x3a\x39\x3a\x33\x77\x57\x66\x4f\x22',GvoLYq(Yhive7(0x109)),'h|/nERO5ZX',GvoLYq(0x52),GvoLYq(0x53),'\u0026\u007c\u0039\u0025\u0026\u0034\u003b\u0078',GvoLYq(0x54),GvoLYq(Yhive7(0xa2)),GvoLYq(0x56),GvoLYq(0x23),GvoLYq(0x57),GvoLYq(Yhive7(0x68)),GvoLYq(Yhive7(0xa4)),GvoLYq(0x5a),GvoLYq(0x29),Yhive7(0x48),'/E3|M,N{Y0I(1Y1lu6',GvoLYq(Yhive7(0x67)),'=9](|aXG',Yhive7(0x41),GvoLYq(Yhive7(0x46)),GvoLYq(Yhive7(0x45)),GvoLYq(0x5d),GvoLYq(0x5e),GvoLYq(0x29),'/ETn9|AG',GvoLYq(0x5f),GvoLYq(Yhive7(0x4b)),GvoLYq(0x61),GvoLYq(0x62),GvoLYq(0x63),GvoLYq(0x64),GvoLYq(Yhive7(0x42)),GvoLYq(Yhive7(0x4d)),GvoLYq(Yhive7(0xae)),GvoLYq(Yhive7(0xaf)),GvoLYq(0x29),'[EpHF@r7%:0>=a?xI1](9|NNEj',GvoLYq(Yhive7(0x42)),GvoLYq(Yhive7(0x85)),GvoLYq(0x31),GvoLYq(0x33),GvoLYq(Yhive7(0x4c)),GvoLYq(0x69),GvoLYq(Yhive7(0x44)),GvoLYq(Yhive7(0x43)),GvoLYq(0x24),GvoLYq(0x6b),GvoLYq(0x2c),GvoLYq(Yhive7(0x86)),GvoLYq(0x6a),GvoLYq(Yhive7(0x43)),GvoLYq(Yhive7(0x79)),GvoLYq(0x6e),GvoLYq(0x6f),GvoLYq(0x70),GvoLYq(0x71),GvoLYq(0x72),GvoLYq(0x73),GvoLYq(0x24),GvoLYq(0x24),GvoLYq(0x74),GvoLYq(Yhive7(0xb5)),GvoLYq(0x76),GvoLYq(0x77),'cE!uA,2:|S^>7]gA/Es',GvoLYq(Yhive7(0xb6)),GvoLYq(0x6b),GvoLYq(0x79),GvoLYq(0x7a),GvoLYq(Yhive7(0xb7)),'kE;c0|?G',GvoLYq(0x7c),'Vs+|op]GuZL3V1F"N6',GvoLYq(0x7d),GvoLYq(0x7e),GvoLYq(Yhive7(0x58)),GvoLYq(0x80),GvoLYq(Yhive7(0xb8)),'0gA<dE|x[`0(}g$',GvoLYq(0x68),GvoLYq(0x29),'kA09Fq"g|',GvoLYq(0x82),GvoLYq(0x83),GvoLYq(0x84),GvoLYq(Yhive7(0xb9)),GvoLYq(Yhive7(0x6f)),GvoLYq(0x87),GvoLYq(0x88),'\u007c\u0041\u0029\u0028\u0064\u007c\u005f\u0062\u0043\u0042\u0072\u0069\u0062\u0070\u0037\u005d',GvoLYq(0x89),'\x7c\x41\x29\x28\x64\x7c\x68\x47',GvoLYq(0x8a),GvoLYq(0x8b),GvoLYq(Yhive7
// 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"])