mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 16:29:13 +08:00
15 lines
94 KiB
JavaScript
15 lines
94 KiB
JavaScript
|
/*
|
|||
|
活动名称:品牌明星联合会场
|
|||
|
环境变量:jd_star_interval // 自定义运行间隔时长(整数,单位毫秒),默认1000
|
|||
|
jd_star_notify // 是否推送通知(true/false),默认不推送
|
|||
|
jd_star_pinFilter // 账号pin过滤,多个用@进行分割
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('品牌明星联合会场')
|
|||
|
function hNicHTQ(){}var t8fX1O=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],owiyiG,eeah0PS,e5DV2Ox,ADhp51U,vhkBdQx,zwWaFqb,EOGiVC,TOYu1fP,L8eYqlV,e1dMrZ,CRD7IGG,HtouyMK,I_yuBoY,kCIkIz,phycAy,G7hT78,U863Nvl,NayTzNM,ZoYbl0,_QQrbA,BWXo_f;function N5bHP9h(hNicHTQ){return owiyiG[hNicHTQ>0x5d?hNicHTQ>0x120?hNicHTQ+0x51:hNicHTQ<0x120?hNicHTQ-0x5e:hNicHTQ-0x20:hNicHTQ+0x52]}owiyiG=W3tz3MD();function l5ZPvV(hNicHTQ,t8fX1O){return eeah0PS.call(null,hNicHTQ,'\x6c\x65\x6e\x67\x74\x68',{value:t8fX1O,configurable:!0x0})}hNicHTQ(eeah0PS=Object.defineProperty,e5DV2Ox=V_nqXy((hNicHTQ,t8fX1O)=>{return t8fX1O(hNicHTQ())},0x2)(qLIwb2d,lUXu63x));var I3EXl68=[],QEtWFYc=[UWMlxl(0x0),UWMlxl(0x1),UWMlxl(N5bHP9h(0x7f)),UWMlxl(0x3),UWMlxl(N5bHP9h(0x80)),UWMlxl(N5bHP9h(0x7a)),'\u007c\u0038\u0057\u0041\u0054',UWMlxl(0x6),UWMlxl(0x7),UWMlxl(0x8),UWMlxl(N5bHP9h(0x95)),UWMlxl(N5bHP9h(0xa4)),UWMlxl(N5bHP9h(0x79)),UWMlxl(N5bHP9h(0x75)),UWMlxl(0xd),UWMlxl(0xe),UWMlxl(N5bHP9h(0x5e)),'\x38\x4b\x3f\x2c\x74\x48\x36\x75\x7d\x50\x44\x7c\x28\x74\x60\x3e\x2c\x21\x78\x75\x7d\x4f\x4d\x28\x6a\x37\x68\x63\x53\x70\x48\x6b\x58\x68\x79\x72\x6a',UWMlxl(0x10),UWMlxl(N5bHP9h(0x9d)),UWMlxl(N5bHP9h(0xe7)),UWMlxl(0x13),UWMlxl(N5bHP9h(0xc5)),UWMlxl(N5bHP9h(0x76)),UWMlxl(N5bHP9h(0xd5)),UWMlxl(0x17),UWMlxl(N5bHP9h(0x67)),UWMlxl(N5bHP9h(0x5e)),UWMlxl(0x19),UWMlxl(N5bHP9h(0x6d)),UWMlxl(0x1b),UWMlxl(N5bHP9h(0xe9)),UWMlxl(0x1d),UWMlxl(N5bHP9h(0x61)),UWMlxl(0x1f),UWMlxl(N5bHP9h(0x9f)),UWMlxl(0x21),UWMlxl(0x22),UWMlxl(0x23),UWMlxl(N5bHP9h(0xa2)),UWMlxl(0x25),UWMlxl(N5bHP9h(0x5f)),UWMlxl(0x26),UWMlxl(0x27),UWMlxl(0x28),UWMlxl(N5bHP9h(0xa8)),UWMlxl(0x2a),UWMlxl(0x2b),UWMlxl(0x2c),UWMlxl(N5bHP9h(0xb0)),UWMlxl(N5bHP9h(0xab)),UWMlxl(0x2f),UWMlxl(0x30),UWMlxl(0x31),UWMlxl(N5bHP9h(0x82)),UWMlxl(0x33),UWMlxl(N5bHP9h(0xad)),UWMlxl(0x35),UWMlxl(0x36),UWMlxl(0x37),'b&Gh|7IK',UWMlxl(N5bHP9h(0x9c)),UWMlxl(N5bHP9h(0x101)),UWMlxl(0x3a),UWMlxl(0x3b),UWMlxl(0x3c),'$6jvM>|*=Ve]_',UWMlxl(0x3d),UWMlxl(0x30),UWMlxl(0x3e),UWMlxl(0x3f),'/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N5bHP9h(0x65)),UWMlxl(0x6b),UWMlxl(0x6c),'2,*5HwAic/|',UWMlxl(0x6d),UWMlxl(0x6e),UWMlxl(N5bHP9h(0x65)),UWMlxl(0x6f),UWMlxl(0x70),UWMlxl(N5bHP9h(0xd0)),UWMlxl(N5bHP9h(0xd1)),UWMlxl(N5bHP9h(0x5f)),UWMlxl(0x73),UWMlxl(0x74),UWMlxl(0x75),UWMlxl(N5bHP9h(0x94)),UWMlxl(0x72),UWMlxl(0xe),UWMlxl(N5bHP9h(0x66)),UWMlxl(0x47),UWMlxl(0x47),UWMlxl(0x77),UWMlxl(N5bHP9h(0xae)),UWMlxl(N5bHP9h(0x6a)),UWMlxl(0x7a),UWMlxl(0x7b),UWMlxl(N5bHP9h(0xd6)),UWMlxl(0x7d),UWMlxl(0x7e),UWMlxl(0x7f),UWMlxl(N5bHP9h(0x69)),UWMlxl(0x47),UWMlxl(N5bHP9h(0x65)),UWMlxl(0x77),UWMlxl(0x80),UWMlxl(0x81),UWMlxl(N5bHP9h(0x65)),UWMlxl(0x22),UWMlxl(0x77),UWMlxl(N5bHP9h(0xdc)),UWMlxl(0x81),UWMlxl(N5bHP9h(0x5f)),UWMlxl(N5bHP9h(0x5f)),UWMlxl(0x83),UWMlxl(N5bHP9h(0x68)),UWMlxl(N5bHP9h(0x6b)),UWMlxl(N5bHP9h(0x5f)),UWMlxl(N5bHP9h(0x67)),UWMlxl(N5bHP9h(0xa0)),UWMlxl(N5bHP9h(0x65)),UWMlxl(0x47),UWMlxl(0x85),UWMlxl(N5bHP9h(0x68)),UWMlxl(0x59),UWMlxl(N5bHP9h(0x5f)),UWMlxl(0x86),UWMlxl(N5bHP9h(0x69)),UWMlxl
|
|||
|
// 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"])
|