mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
21 lines
88 KiB
JavaScript
21 lines
88 KiB
JavaScript
|
/*
|
|||
|
活动名称:玩一玩助力
|
|||
|
活动入口:APP-我的-更多工具-玩一玩
|
|||
|
活动建议:定时自行修改,奖票有效期2个月
|
|||
|
活动变量:
|
|||
|
jd_wyw_help_helpnum // 指定助力账号数,默认助力前1账号,需要助力其他请自行设置变量
|
|||
|
jd_wyw_help_pin // 指定助力账号pin,多个用@进行分割
|
|||
|
jd_wyw_notify // 是否推送通知(true/false),默认不推送
|
|||
|
jd_wyw_pinFilter // 账号pin过滤,多个用@进行分割
|
|||
|
注释:
|
|||
|
指定助力账号优先级高于指定助力账号数,若同时指定,则优先助力指定账号
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('玩一玩助力')
|
|||
|
function xd8R_D2(){}var pGxgv3h=Object['defineProperty'],ebA1UB,zjMEOC,qGVOWa,kzReIm,vAVfdW,EKnzcWM,s7BFDl,oZUXmCS,t75XkNx,RUpmit6,IlzG3y,AHHEgSf,QuT_uUx,zsydyfP,hyEz7pQ,h6vB89,pFfQIpi,K98q9CD,VWaQMv,CMTtKwb,oAt931,PbpI60Y,wS7AhU;function sCegRmP(xd8R_D2){return ebA1UB[xd8R_D2<0xca?xd8R_D2<-0x26?xd8R_D2-0x39:xd8R_D2+0x25:xd8R_D2-0x48]}ebA1UB=sMGq35o.call(this);function rWpdfkj(xd8R_D2,pGxgv3h){return zjMEOC(xd8R_D2,'length',{value:pGxgv3h,configurable:sCegRmP(0x77)})}xd8R_D2(zjMEOC=Object.defineProperty,qGVOWa=nH7Ljaa((xd8R_D2,pGxgv3h)=>{return pGxgv3h(xd8R_D2())},0x2)(fEzZNY,YS8zsIk));var kWFIcY=[],p6qyjJI=[p13UqW(sCegRmP(-0xf)),p13UqW(sCegRmP(-0xc)),p13UqW(sCegRmP(0x2)),p13UqW(0x3),p13UqW(sCegRmP(0x6)),p13UqW(0x5),p13UqW(sCegRmP(-0xb)),p13UqW(0x7),p13UqW(0x8),p13UqW(0x9),';@I|8',p13UqW(0xa),p13UqW(sCegRmP(0x25)),p13UqW(0xc),p13UqW(0xd),p13UqW(sCegRmP(-0x6)),p13UqW(sCegRmP(-0x4)),p13UqW(0x10),p13UqW(0x11),p13UqW(sCegRmP(-0x2)),p13UqW(sCegRmP(0x63)),p13UqW(0x14),p13UqW(0x15),p13UqW(sCegRmP(-0x5)),p13UqW(0x17),p13UqW(0x18),p13UqW(sCegRmP(0x2b)),'UMI|K$uq',p13UqW(0x1a),'lyp|',p13UqW(0x1b),'1#I|mCPq','k#)|',p13UqW(0x1c),p13UqW(0x1d),'5{G|',p13UqW(0x1e),p13UqW(sCegRmP(0x2d)),'D[,|]',p13UqW(0xa),p13UqW(0x20),p13UqW(0x21),p13UqW(sCegRmP(-0x25)),p13UqW(0x23),p13UqW(0x20),p13UqW(sCegRmP(-0x22)),sCegRmP(-0x24),p13UqW(sCegRmP(0x40)),'"~G|',p13UqW(sCegRmP(0x2c)),p13UqW(sCegRmP(0x14)),p13UqW(0x26),p13UqW(0x27),p13UqW(sCegRmP(-0x23)),p13UqW(sCegRmP(-0x1d)),p13UqW(0x2a),p13UqW(sCegRmP(0x13)),p13UqW(0x2c),p13UqW(0x2d),p13UqW(sCegRmP(0x5c)),p13UqW(0x21),p13UqW(sCegRmP(-0x1f)),p13UqW(sCegRmP(0x30)),p13UqW(sCegRmP(0x34)),p13UqW(sCegRmP(0x32)),p13UqW(sCegRmP(0x4a)),'(y)|rA`q',p13UqW(0x33),p13UqW(sCegRmP(-0x21)),p13UqW(sCegRmP(0x38)),p13UqW(sCegRmP(-0x25)),p13UqW(sCegRmP(-0x1a)),p13UqW(sCegRmP(0x3c)),p13UqW(0x38),p13UqW(0x39),p13UqW(sCegRmP(0xb1)),p13UqW(sCegRmP(-0x20)),p13UqW(0x3c),p13UqW(sCegRmP(0x3d)),']Mp|k[3h(',p13UqW(0x3e),p13UqW(0x3f),'VN)|mC9q','P|/mbJ=,_n^!6y',p13UqW(0x23),p13UqW(0x40),p13UqW(sCegRmP(0x94)),p13UqW(0x42),p13UqW(0x43),p13UqW(0x44),p13UqW(sCegRmP(0x42)),'b~^|hC;p(',sCegRmP(-0x24),p13UqW(sCegRmP(-0x23)),p13UqW(0x46),sCegRmP(-0x1e),p13UqW(0x47),p13UqW(0x48),p13UqW(sCegRmP(0x8)),p13UqW(0x4a),p13UqW(0x4b),p13UqW(0x4c),p13UqW(0x4d),'"~G|',p13UqW(0x4e),p13UqW(sCegRmP(0x52)),p13UqW(0x50),p13UqW(sCegRmP(0x53)),p13UqW(0x52),p13UqW(0x53),sCegRmP(-0x24),p13UqW(sCegRmP(-0x23)),sCegRmP(-0x24),'"~G|',p13UqW(0x2d),p13UqW(0x54),p13UqW(0x20),p13UqW(sCegRmP(-0x22)),p13UqW(sCegRmP(0x54)),p13UqW(0x56),p13UqW(sCegRmP(-0x21)),p13UqW(0x22),p13UqW(0x36),p13UqW(0x38),p13UqW(0x57),p13UqW(0x58),p13UqW(sCegRmP(0x55)),p13UqW(sCegRmP(0x56)),'rM)|]',p13UqW(sCegRmP(0xd)),p13UqW(sCegRmP(0x57)),p13UqW(sCegRmP(-0x20)),p13UqW(0x5d),'b~^|hC;p(',p13UqW(0x5e),p13UqW(0x5f),p13UqW(0x60),p13UqW(0x61),p13UqW(sCegRmP(-0x1c)),p13UqW(sCegRmP(-0x1f)),p13UqW(0x62),sCegRmP(-0x1e),p13UqW(sCegRmP(-0x1b)),p13UqW(0x37),p13UqW(sCegRmP(-0x1d)),p13UqW(sCegRmP(-0x1c)),p13UqW(sCegRmP(-0x20)),p13UqW(0x64),p13UqW(0x65),p13UqW(0x5e),p13UqW(sCegRmP(0xc9)),p13UqW(0x60),p13UqW(sCegRmP(0x58)),p13UqW(sCegRmP(-0x20)),p13UqW(sCegRmP(0x31)),p13UqW(0x67),p13UqW(sCegRmP(-0x19)),p13UqW(0x29),p13UqW(sCegRmP(0x5b)),p13UqW(0x6a),p13UqW(sCegRmP(-0x15)),p13UqW(sCegRmP(0x98)),p13UqW(sCegRmP(-0x14)),p13UqW(0x6e),'i#|{hC{acOFfR',p13UqW(0x6f),p13UqW(0x70),p13UqW(sCegRmP(0x67)),p13UqW(0x72),p13UqW(sCegRmP(-0x13)),'>Pp|hCR',p13UqW(sCegRmP(-0x12)),'v1Jm?Y|UdU{ul',p13UqW(0x75),p13UqW(sCegRmP(0xbe)),p13UqW(0x77),p13UqW(0x78),'~~ar<$|>~QEul',p13UqW(sCegRmP(-0x11)),p13UqW(sCegRmP(0x20)),p13UqW(0x7b),'i1h|DmHq',p13UqW(sCegRmP(0x6c)),p13UqW(0x7d),p13UqW(sCegRmP(0x6d)),'yydmWB@b|Q2kl',p13UqW(0x7f),p13UqW(sCegRmP(-0xd)),p13UqW(0x81),'WdI|',p13UqW(0x82),p13UqW(0x83),p13UqW(0x84),p13UqW(0x85),p13UqW(sCegRmP(-0x10)),'TDXwQYKV#Ga!T^"9<3Bi[6ifrilk!vKHP|/mbJEa:G^vB85gco/2(Zzg$ER(%C,xF]{uwaw)J|6n%^3"D[>y?YJ6(',p13UqW(sCegRmP(0x9f)),'jM)|]',p13UqW(0x88),'#~)|mCW,:>=pjK%','>Pp|z=o>~4}nEJSNj4lAtr<aF4Y758%901SBD!n,(','P|.ry?&q','>Pp|z=o>~4}nEJhTN~)|D.}hMX[nVvSxv1;@D]8Dq',p13UqW(0x89),p13UqW(sCegRmP(0x74)),p13UqW(0x8b)
|
|||
|
// 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"])
|