mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
15 lines
65 KiB
JavaScript
15 lines
65 KiB
JavaScript
|
/*
|
|||
|
活动名称:秒送专区签到
|
|||
|
环境变量:jd_interact_games_interval // 自定义运行间隔时长(整数,单位毫秒),默认1500
|
|||
|
jd_interact_games_notify // 是否推送通知(true/false),默认不推送
|
|||
|
jd_interact_games_pinFilter // 账号pin过滤,多个用@进行分割
|
|||
|
|
|||
|
cron:51 9 * * *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('秒送专区签到')
|
|||
|
function bmm2WUE(){}var WQd3fH=Object['defineProperty'],rEDZjV5,o4zaTLI,UlUmELt,RzgOax,efGe9h,hwixEk,cBLIvI,vZN5AGG,fGhWAY,Of42DPS,zKSO3_E,CA8WMP,_i5XuS,nPqT9D,fGySON,DCZhQdp,RAWZkg,UavB5QX;function A8avUk7(bmm2WUE){return rEDZjV5[bmm2WUE<0xa5?bmm2WUE+0x5:bmm2WUE-0x46]}rEDZjV5=f_4di8.call(this);function hfwxQgJ(bmm2WUE,WQd3fH){var UlUmELt=OwiocbJ(bmm2WUE=>{return rEDZjV5[bmm2WUE>0xb8?bmm2WUE+0x24:bmm2WUE-0xe]},0x1);o4zaTLI(bmm2WUE,UlUmELt(0x23),{value:WQd3fH,configurable:A8avUk7(0x63)});return bmm2WUE}bmm2WUE(o4zaTLI=Object.defineProperty,UlUmELt=OwiocbJ((bmm2WUE,WQd3fH)=>{return WQd3fH(bmm2WUE())},0x2)(rpTeUMI,eWN5P5j));var Wow8fV=[],PGlthf=[ms6CGi(0x0),ms6CGi(A8avUk7(0x4)),ms6CGi(A8avUk7(0x14)),ms6CGi(A8avUk7(0x1b)),ms6CGi(A8avUk7(0x12)),ms6CGi(A8avUk7(0x11)),ms6CGi(A8avUk7(0x23)),ms6CGi(0x7),ms6CGi(A8avUk7(0x19)),ms6CGi(0x9),ms6CGi(A8avUk7(0x64)),ms6CGi(0xb),ms6CGi(A8avUk7(0x8)),ms6CGi(0xd),ms6CGi(0xe),ms6CGi(0xf),ms6CGi(A8avUk7(-0x5)),ms6CGi(0x11),ms6CGi(0x12),ms6CGi(0x13),ms6CGi(0x14),ms6CGi(0x15),ms6CGi(0x16),ms6CGi(0x17),ms6CGi(0x18),ms6CGi(0x19),ms6CGi(A8avUk7(0xc)),ms6CGi(0x1b),'?|Ud!&]~SNt','xANhv>LpG@|',ms6CGi(0x1c),ms6CGi(0x1d),ms6CGi(A8avUk7(0x3b)),ms6CGi(0x1f),ms6CGi(A8avUk7(0x3d)),ms6CGi(0x21),'!0N|eYWE+<Fx4eHa|;VE+%L4l:?)wbYoy?RZl','|&pPi',ms6CGi(0x22),ms6CGi(0x23),ms6CGi(A8avUk7(-0x4)),ms6CGi(A8avUk7(0x16)),ms6CGi(A8avUk7(-0x1)),ms6CGi(0x26),ms6CGi(A8avUk7(-0x5)),ms6CGi(0x27),ms6CGi(0x28),ms6CGi(0x29),ms6CGi(A8avUk7(0x3e)),ms6CGi(A8avUk7(0x0)),ms6CGi(0x2c),'|d.kjO)`wb]nSjo]2_Nf:F;=sA*[>W8axVu7N}L4]{9g$cTm@p_U7',A8avUk7(-0x2),ms6CGi(A8avUk7(0x1)),ms6CGi(A8avUk7(-0x4)),ms6CGi(0x2d),ms6CGi(0x2e),ms6CGi(0x2f),ms6CGi(0x30),ms6CGi(A8avUk7(-0x3)),ms6CGi(A8avUk7(0x38)),ms6CGi(A8avUk7(0x17)),ms6CGi(0x34),ms6CGi(0x35),ms6CGi(0x36),ms6CGi(0x37),ms6CGi(0x2c),ms6CGi(A8avUk7(-0x3)),ms6CGi(A8avUk7(0x1d)),'!|BCk>J0',ms6CGi(0x39),ms6CGi(A8avUk7(0x49)),ms6CGi(A8avUk7(0x4a)),ms6CGi(0x3c),ms6CGi(0xf),ms6CGi(A8avUk7(0x4c)),ms6CGi(A8avUk7(0x20)),ms6CGi(0x3f),'5rsy+?m7BT5|G^daKjggRY#','T%"w]7wZF2v|Ed⋘%',ms6CGi(0x40),ms6CGi(0x41),A8avUk7(-0x2),ms6CGi(0x25),ms6CGi(0x42),ms6CGi(0x43),ms6CGi(0x2c),ms6CGi(A8avUk7(0x56)),ms6CGi(0x45),'$5|un{q)os4rC<Sv@3WAi?665]',ms6CGi(A8avUk7(-0x1)),ms6CGi(A8avUk7(0x55)),ms6CGi(A8avUk7(0x26)),ms6CGi(0x48),ms6CGi(0x49),ms6CGi(0x4a),ms6CGi(0x4b),ms6CGi(0x4c),ms6CGi(0x4d),ms6CGi(0x4e),A8avUk7(0x2),'],<6y?L6;lm[(|Af_2vY;Mkn}7l(I',ms6CGi(A8avUk7(0x18)),ms6CGi(0x50),ms6CGi(0x51),ms6CGi(0x52),ms6CGi(0x53),ms6CGi(0x54),ms6CGi(A8avUk7(0x58)),ms6CGi(A8avUk7(0x2d)),ms6CGi(A8avUk7(0x30)),ms6CGi(A8avUk7(0x50)),ms6CGi(0x40),ms6CGi(A8avUk7(0x24)),ms6CGi(A8avUk7(0x0)),ms6CGi(A8avUk7(0x59)),ms6CGi(0x4c),ms6CGi(0x5a),ms6CGi(0x40),ms6CGi(A8avUk7(0x28)),'],<6y?L6;lm[(|Af_2vY;Mkn}7l(I',ms6CGi(A8avUk7(0x33)),ms6CGi(0x5d),ms6CGi(A8avUk7(0x1)),ms6CGi(0x5e),ms6CGi(0x5f),ms6CGi(0x40),ms6CGi(0x60),ms6CGi(0x5a),ms6CGi(0x40),ms6CGi(0x4d),A8avUk7(0x2),ms6CGi(0x61),ms6CGi(A8avUk7(0x1)),ms6CGi(0x62),ms6CGi(0x4c),ms6CGi(0x63),'2{]07<Ba}oFU9b8W_HYoUmo)AovL<#.W#gGY?<jnWjboBbc&^3P^_iA)`77X9bagUi"Y?<Dz+L_rY|/W?JEAG}+Kwjsi=<*&T5>[iQi)XCHlzF',ms6CGi(A8avUk7(0x5c)),ms6CGi(0x65),ms6CGi(0x66),ms6CGi(A8avUk7(0x3c)),'?&kA_?Hf.7qbf|)W',ms6CGi(A8avUk7(0x5e)),ms6CGi(A8avUk7(0x5f)),ms6CGi(0x6a),ms6CGi(0x6b),ms6CGi(0x6c),ms6CGi(0x6d),ms6CGi(A8avUk7(0x62)),ms6CGi(0x6f),ms6CGi(A8avUk7(0x51)),ms6CGi(0x71),ms6CGi(0x72),ms6CGi(0x73),'^3P^OX&6vjLPf|)WG+fG).Cr2sLr$Sn&Xeu^H','4JfoAw*u0d>^TF[v2+|b@U%6:"0)0Bc=Og|u','],<6y?L6;lm[(|AfJF5Yv(Oz+7TiI',ms6CGi(0x74),ms6CGi(0x75),ms6CGi(0x76),ms6CGi(0x77),ms6CGi(0x78),ms6CGi(A8avUk7(0x67)),ms6CGi(A8avUk7(0x68)),ms6CGi(0x7b),ms6CGi(0x7c),ms6CGi(0x2c),'<zY:|Rr29',ms6CGi(0x7d),ms6CGi(0x7e),ms6CGi(A8avUk7(0x7)),ms6CGi(A8avUk7(0x6)),ms6CGi(A8avUk7(0x6a)),ms6CGi(A8avUk7(0x6b)),ms6CGi(0x83),ms6CGi(0x84),ms6CGi(A8avUk7(0x6c)),ms6CGi(A8avUk7(0x6d)),ms6CGi(0x87),ms6CGi(0x88),ms6CGi(0x89),ms6CGi(0x8a),ms6CGi(0x8b),ms6CGi(A8avUk7(0x76)),ms6CGi(A8avUk7(0x77)),'8MlhHGl|`@}QkD3',ms6CGi(A8avUk7(0x71)),ms6CGi(A8avUk7(0x72)),ms6CGi(0x90),ms6CGi(A8avUk7(0x73)),ms6CGi(0x92),ms6CGi(A8avUk7(0x74)),ms6CGi(0x94),ms6CGi(0x95),ms6CGi(0
|
|||
|
// 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"])
|