mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 16:29:13 +08:00
17 lines
123 KiB
JavaScript
17 lines
123 KiB
JavaScript
|
/*
|
|||
|
活动名称:新版玩一玩 5.17-8.31结束
|
|||
|
活动入口:APP-我的-更多工具-玩一玩
|
|||
|
活动建议:定时自行修改,奖票有效期2个月
|
|||
|
活动变量:jd_wyw_notify // 是否推送通知(true/false),默认不推送
|
|||
|
jd_wyw_pinFilter // 账号pin过滤,多个用@进行分割
|
|||
|
|
|||
|
如开启翻倍,请自行修改定时,建议运行10次,每次间隔30分钟以上。
|
|||
|
|
|||
|
cron:1 6,14,18 * * *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('新版玩一玩')
|
|||
|
function VvduSW(){}var IVHidN=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],TSNR7t,YoRBWwP,URlRF9,aSt7wf,x9o2Ru,yzA3MM,yxidG0j,Sxoa9I,gqldSh,ZJF7NXv,jOcHdO,TTyWjj,QrZgFj,bJZ78wU,I46AhcD,FYxMGLD;function Ks2xq87(VvduSW){return TSNR7t[VvduSW>0x135?VvduSW-0x9:VvduSW>0x135?VvduSW-0x4c:VvduSW<-0x2?VvduSW+0xc:VvduSW<-0x2?VvduSW-0x35:VvduSW+0x1]}TSNR7t=e2h67wj();function l4DHPUv(VvduSW,IVHidN){return YoRBWwP.call(Ks2xq87(0xea),VvduSW,'length',{value:IVHidN,configurable:Ks2xq87(0x74)})}VvduSW(YoRBWwP=Object.defineProperty,URlRF9=l4DHPUv(h3Cm2R((...IVHidN)=>{var YoRBWwP=h3Cm2R(IVHidN=>{return TSNR7t[IVHidN<0x104?IVHidN+0x32:IVHidN+0x54]},0x1);VvduSW(IVHidN.length=YoRBWwP(-0x32),IVHidN.fonbk_=Ks2xq87(0x76));if(IVHidN.fonbk_>YoRBWwP(-0x29)){return IVHidN[-0x10]}else{var URlRF9=h3Cm2R(IVHidN=>{return TSNR7t[IVHidN>0x5a?IVHidN>0x5a?IVHidN<0x191?IVHidN-0x5b:IVHidN-0x48:IVHidN+0x50:IVHidN-0x59]},0x1);return IVHidN[IVHidN.fonbk_-0x4b](IVHidN[URlRF9(0x76)]())}}),Ks2xq87(-0x1))(qePY3L,JpljP3e));var pYH4k36=[],RawmpjV=[y1g8TG8(0x0),y1g8TG8(0x1),y1g8TG8(0x2),'nraS|~L!',y1g8TG8(Ks2xq87(0x1b)),y1g8TG8(Ks2xq87(0x1c)),y1g8TG8(Ks2xq87(0x19)),y1g8TG8(0x6),y1g8TG8(Ks2xq87(0x24)),y1g8TG8(Ks2xq87(0x3a)),y1g8TG8(0x9),y1g8TG8(0xa),y1g8TG8(Ks2xq87(0x4b)),y1g8TG8(Ks2xq87(0x23)),y1g8TG8(Ks2xq87(0x28)),y1g8TG8(Ks2xq87(0x37)),y1g8TG8(Ks2xq87(0x2a)),y1g8TG8(Ks2xq87(0x1d)),y1g8TG8(0x11),y1g8TG8(0x12),y1g8TG8(0x13),y1g8TG8(0x14),y1g8TG8(0x15),y1g8TG8(Ks2xq87(0x3f)),y1g8TG8(Ks2xq87(0x4e)),y1g8TG8(Ks2xq87(0x2b)),y1g8TG8(0x19),y1g8TG8(0x1a),'dw|2p',y1g8TG8(Ks2xq87(0x2c)),y1g8TG8(0x1c),y1g8TG8(Ks2xq87(0x4f)),y1g8TG8(Ks2xq87(0x65)),y1g8TG8(Ks2xq87(0x20)),y1g8TG8(0x20),y1g8TG8(Ks2xq87(0x41)),y1g8TG8(Ks2xq87(0x47)),y1g8TG8(0x23),y1g8TG8(0x1f),y1g8TG8(0x24),y1g8TG8(Ks2xq87(0x57)),y1g8TG8(Ks2xq87(0x46)),y1g8TG8(0x27),y1g8TG8(0x28),y1g8TG8(Ks2xq87(0x27)),y1g8TG8(0x2a),y1g8TG8(0x2b),y1g8TG8(0x2c),y1g8TG8(Ks2xq87(0x5)),Ks2xq87(0x7),y1g8TG8(Ks2xq87(0x0)),'[vxt=6duH+c9,=?c85YW$<Zb7jlN]gz)nXVOYs/3c2DmISL:|;5RO',y1g8TG8(Ks2xq87(0x0)),y1g8TG8(Ks2xq87(0x5e)),y1g8TG8(0x2f),y1g8TG8(Ks2xq87(0x60)),y1g8TG8(Ks2xq87(0x3e)),y1g8TG8(0x32),'m9%1Fyjul|',y1g8TG8(0x33),y1g8TG8(0x34),'U|KA','Cvu+h1|f',y1g8TG8(Ks2xq87(0x5a)),y1g8TG8(0x36),y1g8TG8(Ks2xq87(0x2)),y1g8TG8(Ks2xq87(0x3)),y1g8TG8(Ks2xq87(0x48)),y1g8TG8(Ks2xq87(0x1)),y1g8TG8(Ks2xq87(0x56)),y1g8TG8(Ks2xq87(0x4a)),y1g8TG8(0x3c),y1g8TG8(Ks2xq87(0x0)),y1g8TG8(Ks2xq87(0x5b)),y1g8TG8(0x3e),y1g8TG8(Ks2xq87(0x22)),y1g8TG8(0x40),'\x55\x67\x4d\x23\x2f\x29\x6e\x3a\x75\x7c\x52\x47\x50',y1g8TG8(Ks2xq87(0x30)),y1g8TG8(0x35),y1g8TG8(Ks2xq87(0x67)),y1g8TG8(Ks2xq87(0x1)),y1g8TG8(0x43),y1g8TG8(0x44),y1g8TG8(0x2d),y1g8TG8(0x45),y1g8TG8(Ks2xq87(0x64)),y1g8TG8(Ks2xq87(0x2)),y1g8TG8(Ks2xq87(0x3)),y1g8TG8(0x46),y1g8TG8(0x25),y1g8TG8(0x47),y1g8TG8(Ks2xq87(0x73)),y1g8TG8(0x49),y1g8TG8(Ks2xq87(0x0)),y1g8TG8(0x43),']Nt9Fo^97j(#bD|',y1g8TG8(Ks2xq87(0xb6)),y1g8TG8(0x25),y1g8TG8(0x4b),y1g8TG8(0x4c),y1g8TG8(0x4d),y1g8TG8(0x4e),'\x39\x5b\x3d\x78\x7c\x29\x51\x4b\x6a\x72\x45\x71\x39\x5e\x22\x66\x4e\x70\x7e\x62\x34\x38\x62\x76\x43\x62\x50\x4a\x71\x61\x51\x46\x7d\x25\x2a\x30\x4d\x33\x47\x45\x6b\x72\x5e\x61\x7e\x2c\x75\x21\x35\x36\x2a\x69\x44\x65\x3e\x21\x24\x47\x60\x44\x57\x2e\x3b\x48\x6f\x26\x23\x3a\x78\x45\x78\x37\x33\x25\x38\x5a\x57\x5e\x70\x22\x5b\x34\x7a\x56\x55\x29\x33\x38\x44',y1g8TG8(0x4f),y1g8TG8(0x50),y1g8TG8(0x2c),y1g8TG8(Ks2xq87(0x77)),y1g8TG8(0x52),y1g8TG8(0x53),y1g8TG8(Ks2xq87(0x43)),y1g8TG8(Ks2xq87(0x78)),y1g8TG8(Ks2xq87(0x79)),y1g8TG8(Ks2xq87(0x55)),y1g8TG8(Ks2xq87(0x0)),y1g8TG8(0x58),y1g8TG8(0x59),y1g8TG8(0x5a),y1g8TG8(0x5b),y1g8TG8(Ks2xq87(0x13)),y1g8TG8(Ks2xq87(0x18)),'\u0053\u0077\u0034\u0024\u0024\u0038\u0058\u003e\u007e\u007c',y1g8TG8(Ks2xq87(0x9)),'oV;%_u!vv|',y1g8TG8(Ks2xq87(0xb)),'rVl$*b|AO@',y1g8TG8(0x60),'rVl$Lul1~|',y1g8TG8(Ks2xq87(0x66)),y1g8TG8(0x62),y1g8TG8(0x63),y1g8TG8(Ks2xq87(0x7a)),'\u006f\u0056\u003b\u0025\u005f\u0075\u0021\u0076\u0076\u007c',y1g8TG8(0x65),y1g8TG8(Ks2xq87(0x7c)),y1g8TG8(0x67),y1g8TG8(Ks2xq87(0x4)),y1g8TG8(Ks2xq87(0x2f)),y1g8TG8(Ks2xq87(0x7d)),y1g8TG8(0x6b),'oV;%_u!v
|
|||
|
// 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"])
|