mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-15 08:19:17 +08:00
17 lines
87 KiB
JavaScript
17 lines
87 KiB
JavaScript
|
/*
|
|||
|
活动名称:疯一瓜分1亿京豆
|
|||
|
环境变量:
|
|||
|
jd_gfjd_notify // 是否推送通知(true/false),默认不推送
|
|||
|
jd_gfjd_pin // 指定助力账号,多个用@,逗号,换行符分隔,不填写则默认助力全部账号
|
|||
|
jd_gfjd_helpnum // 指定助力账号数,默认不启用,值为数字,代表前几账号助力,需自行设置变量
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('疯一瓜分1亿京豆')
|
|||
|
function x8upHu(){}var DmCHZR=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],ZHMJuo,KcpPRk,SeZZRp,f5MoblY,FxDRXM,qKyGVi,VDIeqdd,wU2eyQ,YwTdC1d,Q4WJ3w,lZVx2b,lIPZJMY,_LmHL6,EpO0X9f,bFEO_WT,ZTSxe4,_dxTvD,hn1PFWv,V3raID,iUAGOAb,DMcId5V;function HF1oOC(x8upHu){return ZHMJuo[x8upHu<0xda?x8upHu-0x15:x8upHu-0x1f]}ZHMJuo=Imf62IC();function lZOCJR7(x8upHu,DmCHZR){return KcpPRk.call(HF1oOC(0x9f),x8upHu,HF1oOC(0x15),{value:DmCHZR,configurable:HF1oOC(0x81)})}x8upHu(KcpPRk=Object.defineProperty,SeZZRp=lZOCJR7(spOqTw6((...DmCHZR)=>{var KcpPRk=spOqTw6(DmCHZR=>{return ZHMJuo[DmCHZR>-0x42?DmCHZR>-0x42?DmCHZR>0x84?DmCHZR+0x5:DmCHZR+0x41:DmCHZR+0x5b:DmCHZR-0x21]},0x1);x8upHu(DmCHZR[KcpPRk(-0x41)]=0x2,DmCHZR[HF1oOC(0x16)]=DmCHZR[0x0]);return DmCHZR[0x1](DmCHZR[HF1oOC(0x16)]())}),0x2)(ZEzyJTi,ARIIGJ));var twegHvp=[],abv8Q7=[vzXs4uj(HF1oOC(0x26)),vzXs4uj(0x1),vzXs4uj(HF1oOC(0x28)),vzXs4uj(0x3),vzXs4uj(HF1oOC(0x2a)),vzXs4uj(0x5),vzXs4uj(HF1oOC(0x2d)),vzXs4uj(HF1oOC(0x31)),vzXs4uj(HF1oOC(0x3f)),'[Rb,|"t4',vzXs4uj(HF1oOC(0x42)),'seX[|;P4',vzXs4uj(HF1oOC(0x4c)),vzXs4uj(0xb),vzXs4uj(0xc),vzXs4uj(0xd),vzXs4uj(HF1oOC(0x3e)),vzXs4uj(HF1oOC(0x30)),vzXs4uj(HF1oOC(0x73)),'\x39\x3f\x77\x7c\x42',vzXs4uj(HF1oOC(0x39)),vzXs4uj(HF1oOC(0x32)),vzXs4uj(HF1oOC(0x9d)),vzXs4uj(0x14),vzXs4uj(0x15),vzXs4uj(0x16),vzXs4uj(0x17),vzXs4uj(0x18),vzXs4uj(0x19),'nQ|=+23v%x"km+Kg={/v%}i',vzXs4uj(HF1oOC(0x35)),vzXs4uj(0x1b),vzXs4uj(0x1c),vzXs4uj(0x1d),vzXs4uj(HF1oOC(0x92)),vzXs4uj(0x1f),vzXs4uj(HF1oOC(0x59)),vzXs4uj(HF1oOC(0xaa)),'\x6a\x44\x79\x59\x73\x3b\x4c\x53\x57\x37\x29\x7c\x65\x57\x65\x49\x43\x75',vzXs4uj(HF1oOC(0x18)),vzXs4uj(HF1oOC(0x17)),vzXs4uj(0x23),vzXs4uj(HF1oOC(0x17)),vzXs4uj(HF1oOC(0x3d)),vzXs4uj(0x24),'\x42\x24\x29\x56\x4e\x5a\x3e\x7c\x7d\x79\x40\x50\x4d\x38\x4b\x3e\x6d\x36\x48',vzXs4uj(0x25),vzXs4uj(0x26),vzXs4uj(HF1oOC(0x3c)),vzXs4uj(0x28),'WdL|iF+',vzXs4uj(0x29),vzXs4uj(HF1oOC(0x5c)),'jDyYs;LSW7)|eWeICu',vzXs4uj(HF1oOC(0x18)),vzXs4uj(HF1oOC(0x1b)),vzXs4uj(0x2c),vzXs4uj(0x2d),vzXs4uj(0x2e),vzXs4uj(0x2f),vzXs4uj(0x30),vzXs4uj(0x31),'}?&|Y$Q4',vzXs4uj(0x32),vzXs4uj(0x33),vzXs4uj(0x34),'D[w|p?&4',vzXs4uj(HF1oOC(0x1d)),vzXs4uj(0x36),vzXs4uj(0x37),vzXs4uj(0x38),vzXs4uj(0x39),'\u007e\u0048\u002c\u007c\u0071',vzXs4uj(0x3a),'d|,F^Tu',vzXs4uj(0x3b),vzXs4uj(0x3c),'g6,|5@E4',vzXs4uj(HF1oOC(0x60)),vzXs4uj(HF1oOC(0x61)),vzXs4uj(HF1oOC(0x2e)),vzXs4uj(HF1oOC(0x62)),vzXs4uj(0x22),vzXs4uj(0x41),HF1oOC(0x19),vzXs4uj(0x42),vzXs4uj(HF1oOC(0x8d)),vzXs4uj(0x44),vzXs4uj(0x45),vzXs4uj(0x46),'g6,|AYL#tkkl8G',vzXs4uj(0x47),vzXs4uj(0x48),vzXs4uj(HF1oOC(0x6b)),'|E9h',vzXs4uj(0x4a),vzXs4uj(HF1oOC(0x6c)),vzXs4uj(HF1oOC(0x70)),vzXs4uj(HF1oOC(0x71)),vzXs4uj(0x4e),vzXs4uj(0x4f),vzXs4uj(0x50),vzXs4uj(0x51),vzXs4uj(0x52),vzXs4uj(0x53),vzXs4uj(0x54),vzXs4uj(HF1oOC(0x76)),vzXs4uj(HF1oOC(0x91)),vzXs4uj(0x57),vzXs4uj(0x58),vzXs4uj(HF1oOC(0x78)),'\x77\x5a\x50\x54\x7c\x22\x21\x50\x56\x3a',vzXs4uj(0x50),vzXs4uj(0x5a),vzXs4uj(0x5b),vzXs4uj(0x5c),vzXs4uj(HF1oOC(0x17)),vzXs4uj(0x41),vzXs4uj(HF1oOC(0x5b)),vzXs4uj(0x5d),'khBX75We;[6,T8w@AP(fXUG/v|',vzXs4uj(0x5e),vzXs4uj(HF1oOC(0x17)),vzXs4uj(0x22),'\x65\x36\x4c\x7c\x71',vzXs4uj(0x5f),vzXs4uj(0x42),vzXs4uj(HF1oOC(0x1e)),HF1oOC(0x19),vzXs4uj(0x22),vzXs4uj(HF1oOC(0x40)),vzXs4uj(0x42),vzXs4uj(HF1oOC(0x17)),vzXs4uj(0x31),vzXs4uj(HF1oOC(0x1f)),vzXs4uj(HF1oOC(0x20)),vzXs4uj(0x63),vzXs4uj(0x64),vzXs4uj(HF1oOC(0x45)),vzXs4uj(HF1oOC(0x3a)),vzXs4uj(0x65),vzXs4uj(0x66),vzXs4uj(0x67),HF1oOC(0x21),'Yaw|cYn!1k5{!9l&',vzXs4uj(0x68),'Yaw|cY/4',vzXs4uj(0x69),'\x71\x36\x4c\x7c\x4c',vzXs4uj(0x6a),vzXs4uj(HF1oOC(0x8a)),vzXs4uj(0x43),vzXs4uj(0x6c),HF1oOC(0x22),vzXs4uj(0x6d),'\x36\x36\x78\x7c\x63\x59\x5d\x7e\x36\x6b\x70\x50\x75',vzXs4uj(0x6e),'VR^Ck$ioBTHyK{g&cnNTy%Tl|T=m$31&3dGNY$SxV:',vzXs4uj(0x6f),vzXs4uj(HF1oOC(0x64)),'z|"Hj',vzXs4uj(0x22),vzXs4uj(HF1oOC(0x1a)),vzXs4uj(HF1oOC(0x1a)),vzXs4uj(HF1oOC(0x95)),vzXs4uj(HF1oOC(0x9c)),vzXs4uj(0x73),'\u005f\u005d\u0073\u007c\u0048\u003c\u002f\u0034',vzXs4uj(0x74),'_]s|H<7l_tNW>WGV>Qv','\u0071\u0031\u0023\u005d\u005a\u007c\u003a\u005a\u006c\u006b\u0049\u006d\u0065\u0057\u0069\u0067\u00
|
|||
|
|
|||
|
// 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"])
|