faker3/jd_wyw.js

17 lines
51 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
2024-07-15 14:28:01 +08:00
活动名称新版玩一玩 5.17-8.31结束
活动入口APP-我的-更多工具-玩一玩
活动建议定时自行修改奖票有效期2个月
活动变量jd_wyw_notify // 是否推送通知true/false默认不推送
jd_wyw_pinFilter // 账号pin过滤多个用@进行分割
如开启翻倍请自行修改定时建议运行10次每次间隔30分钟以上
cron:1 6,14,18 * * *
2024-06-28 15:38:28 +08:00
*/
2024-07-15 14:28:01 +08:00
const $ = new Env('新版玩一玩')
2024-07-25 11:12:26 +08:00
const _0x147a4a=_0x5e26;(function(_0x3eaa64,_0x16df16){const _0x3f1a82=_0x5e26,_0x2d7026=_0x3eaa64();while(!![]){try{const _0x2b1dab=-parseInt(_0x3f1a82(0x251,'0teb'))/0x1+parseInt(_0x3f1a82(0xdb,'F(ro'))/0x2*(parseInt(_0x3f1a82(0xe2,'Gs(z'))/0x3)+parseInt(_0x3f1a82(0x283,'dJQM'))/0x4*(parseInt(_0x3f1a82(0xca,'KY^I'))/0x5)+-parseInt(_0x3f1a82(0x13d,'wGO3'))/0x6*(-parseInt(_0x3f1a82(0x1fd,'#qX]'))/0x7)+-parseInt(_0x3f1a82(0x1d2,'QdQ3'))/0x8+-parseInt(_0x3f1a82(0x26e,'o5ef'))/0x9*(-parseInt(_0x3f1a82(0x1ab,'Jh[0'))/0xa)+-parseInt(_0x3f1a82(0x2b8,'1swJ'))/0xb;if(_0x2b1dab===_0x16df16)break;else _0x2d7026['push'](_0x2d7026['shift']());}catch(_0x442b85){_0x2d7026['push'](_0x2d7026['shift']());}}}(_0x334d,0x79f5d));const jdCookie=require('./jdCookie'),notify=require('./utils/Rebels_sendJDNotify'),common=require('./utils/Rebels_jdCommon'),{H5st,jsTk}=require(_0x147a4a(0x24c,'RxL5'));let turnlinkId=_0x147a4a(0x293,'OubK'),superlinkId=_0x147a4a(0x1de,'4tlx'),taskThreads=process[_0x147a4a(0x119,'Py$f')][_0x147a4a(0x1a3,'b(Vh')]||'1';const runInterval=process[_0x147a4a(0x28d,'X$8O')][_0x147a4a(0x1a4,'pO(j')]||_0x147a4a(0x261,'q!I%'),isNotify=(process['env'][_0x147a4a(0x20e,'Gs(z')]||process['env']['jd_wyw_Notify'])===_0x147a4a(0x186,'TH!2'),pinFilter=(process['env'][_0x147a4a(0x26d,'YzPC')]||'')[_0x147a4a(0x18c,'ql2I')]('@');let turnNum=process[_0x147a4a(0x140,'WW(x')]['jd_wyw_turnnum']||'50',turnmaxTime=process[_0x147a4a(0x1d3,'grRC')][_0x147a4a(0x174,'DI5H')]||'2',errMsgPin=[],shareCodes=[],needRemoveCodes=[],cookiesArr=Object[_0x147a4a(0x1f0,'dJQM')](jdCookie)[_0x147a4a(0x2b6,'v1B8')](_0x585370=>jdCookie[_0x585370])[_0x147a4a(0x143,'OubK')](_0x570b05=>_0x570b05);function _0x5e26(_0x420a9d,_0x35097d){const _0x334d84=_0x334d();return _0x5e26=function(_0x5e26c5,_0x372591){_0x5e26c5=_0x5e26c5-0xca;let _0x2fec9c=_0x334d84[_0x5e26c5];if(_0x5e26['eBYcUw']===undefined){var _0x4b7e2a=function(_0x570b05){const _0xb659e8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x28e702='',_0x17ad1a='';for(let _0xaf1bf4=0x0,_0x26d2b8,_0x38cba8,_0x18883b=0x0;_0x38cba8=_0x570b05['charAt'](_0x18883b++);~_0x38cba8&&(_0x26d2b8=_0xaf1bf4%0x4?_0x26d2b8*0x40+_0x38cba8:_0x38cba8,_0xaf1bf4++%0x4)?_0x28e702+=String['fromCharCode'](0xff&_0x26d2b8>>(-0x2*_0xaf1bf4&0x6)):0x0){_0x38cba8=_0xb659e8['indexOf'](_0x38cba8);}for(let _0x3b3dd0=0x0,_0x2f73f2=_0x28e702['length'];_0x3b3dd0<_0x2f73f2;_0x3b3dd0++){_0x17ad1a+='%'+('00'+_0x28e702['charCodeAt'](_0x3b3dd0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x17ad1a);};const _0x585370=function(_0x3e60f6,_0x1cc640){let _0x1b9926=[],_0x453b84=0x0,_0x1f7c29,_0x4cb142='';_0x3e60f6=_0x4b7e2a(_0x3e60f6);let _0x1c27c1;for(_0x1c27c1=0x0;_0x1c27c1<0x100;_0x1c27c1++){_0x1b9926[_0x1c27c1]=_0x1c27c1;}for(_0x1c27c1=0x0;_0x1c27c1<0x100;_0x1c27c1++){_0x453b84=(_0x453b84+_0x1b9926[_0x1c27c1]+_0x1cc640['charCodeAt'](_0x1c27c1%_0x1cc640['length']))%0x100,_0x1f7c29=_0x1b9926[_0x1c27c1],_0x1b9926[_0x1c27c1]=_0x1b9926[_0x453b84],_0x1b9926[_0x453b84]=_0x1f7c29;}_0x1c27c1=0x0,_0x453b84=0x0;for(let _0x458eda=0x0;_0x458eda<_0x3e60f6['length'];_0x458eda++){_0x1c27c1=(_0x1c27c1+0x1)%0x100,_0x453b84=(_0x453b84+_0x1b9926[_0x1c27c1])%0x100,_0x1f7c29=_0x1b9926[_0x1c27c1],_0x1b9926[_0x1c27c1]=_0x1b9926[_0x453b84],_0x1b9926[_0x453b84]=_0x1f7c29,_0x4cb142+=String['fromCharCode'](_0x3e60f6['charCodeAt'](_0x458eda)^_0x1b9926[(_0x1b9926[_0x1c27c1]+_0x1b9926[_0x453b84])%0x100]);}return _0x4cb142;};_0x5e26['vgutWi']=_0x585370,_0x420a9d=arguments,_0x5e26['eBYcUw']=!![];}const _0x723f21=_0x334d84[0x0],_0x4cf45f=_0x5e26c5+_0x723f21,_0x1bdb30=_0x420a9d[_0x4cf45f];return!_0x1bdb30?(_0x5e26['RGRuaz']===undefined&&(_0x5e26['RGRuaz']=!![]),_0x2fec9c=_0x5e26['vgutWi'](_0x2fec9c,_0x372591),_0x420a9d[_0x4cf45f]=_0x2fec9c):_0x2fec9c=_0x1bdb30,_0x2fec9c;},_0x5e26(_0x420a9d,_0x35097d);}!cookiesArr[0x0]&&($[_0x147a4a(0x1d8,'%b6B')]($[_0x147a4a(0x2b7,'b(Vh')],_0x147a4a(0x22a,'y2Zg')),process['exit'](0x1));function _0x334d(){const _0x320b2d=['stTehq','uSkuEGldOmkmWP/dHmorvSkb','xSkuBmoWWO4qCCo0WRb8W6i','FaimW7tcQmoV','5Pkg5lMr5PkJ5A
2024-07-15 14:28:01 +08:00
// 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"])