faker2/jd_wyw.js

17 lines
49 KiB
JavaScript
Raw Normal View History

2024-06-28 07:27:40 +00:00
/*
活动名称新版玩一玩 5.17-8.31结束
活动入口APP-我的-更多工具-玩一玩
活动建议定时自行修改奖票有效期2个月
2024-07-02 15:08:43 +00:00
活动变量jd_wyw_notify // 是否推送通知true/false默认不推送
2024-06-28 07:27:40 +00:00
jd_wyw_pinFilter // 账号pin过滤多个用@进行分割
如开启翻倍请自行修改定时建议运行10次每次间隔30分钟以上
cron:1 6,14,18 * * *
*/
const $ = new Env('新版玩一玩')
2024-07-07 05:57:43 +00:00
const _0x2f3cfe=_0x5dcd;(function(_0x23d573,_0x11ec7d){const _0x30e9c1=_0x5dcd,_0x21244e=_0x23d573();while(!![]){try{const _0x539fe4=-parseInt(_0x30e9c1(0x25a,'mOe6'))/0x1*(parseInt(_0x30e9c1(0x321,'kKxt'))/0x2)+-parseInt(_0x30e9c1(0x2cb,'vY51'))/0x3+parseInt(_0x30e9c1(0x301,'6G@A'))/0x4*(-parseInt(_0x30e9c1(0x306,'u%y5'))/0x5)+parseInt(_0x30e9c1(0x26f,'xFUL'))/0x6*(-parseInt(_0x30e9c1(0x289,'fzwV'))/0x7)+parseInt(_0x30e9c1(0x264,'KgId'))/0x8+parseInt(_0x30e9c1(0x2cc,'i7OB'))/0x9*(-parseInt(_0x30e9c1(0x205,'KgId'))/0xa)+parseInt(_0x30e9c1(0x20e,'KgId'))/0xb;if(_0x539fe4===_0x11ec7d)break;else _0x21244e['push'](_0x21244e['shift']());}catch(_0x475ca0){_0x21244e['push'](_0x21244e['shift']());}}}(_0x5ae4,0xb5f6e));const jdCookie=require(_0x2f3cfe(0x37c,'6]kf')),notify=require(_0x2f3cfe(0x2b7,'u5Z^')),common=require('./utils/Rebels_jdCommon'),{H5st}=require('./utils/Rebels_H');let turnlinkId=_0x2f3cfe(0x24c,'m6[F'),superlinkId=_0x2f3cfe(0x286,'6G@A'),taskThreads=process[_0x2f3cfe(0x2f3,'&stA')]['jd_wyw__threads']||'1';const runInterval=process[_0x2f3cfe(0x252,'TWxU')][_0x2f3cfe(0x2a0,'Skx9')]||_0x2f3cfe(0x388,'KomN'),isNotify=(process[_0x2f3cfe(0x2f1,'Vo0J')]['jd_wyw_notify']||process['env']['jd_wyw_Notify'])===_0x2f3cfe(0x1fb,'0pqK'),pinFilter=(process[_0x2f3cfe(0x2a5,')ZF4')][_0x2f3cfe(0x337,'iK#Q')]||'')[_0x2f3cfe(0x2c2,'fzwV')]('@');let turnNum=process[_0x2f3cfe(0x324,'Yq^S')][_0x2f3cfe(0x2b6,'KgId')]||'50',turnmaxTime=process[_0x2f3cfe(0x260,'xByI')][_0x2f3cfe(0x3d3,'d47F')]||'2',shareCodes=[],needRemoveCodes=[];H5st[_0x2f3cfe(0x228,']Imx')]=![];let cookiesArr=Object[_0x2f3cfe(0x2c7,'Skx9')](jdCookie)[_0x2f3cfe(0x33e,'6G@A')](_0x1a8e2f=>jdCookie[_0x1a8e2f])[_0x2f3cfe(0x20c,'3e)B')](_0x1d294f=>_0x1d294f);!cookiesArr[0x0]&&($[_0x2f3cfe(0x2eb,'mOe6')]($[_0x2f3cfe(0x255,'3e)B')],_0x2f3cfe(0x219,'C5E8')),process[_0x2f3cfe(0x2db,'7L$W')](0x1));function _0x5ae4(){const _0x544d3e=['pCo9FW','W50VWOK','zsDjea','D8oipCoM','5yUU5yINha','Bmk6bG','qSkAsW7dRNXFEY5CurCLwxBdUxinCKqeW5m','pgxcM3/cJ8kpWRFcKCobu8kKov8','WR7cH8oFBa','hNjC','WQ7cNmofkSoEWRqmW7VcJCod','CqBcLSoa','zM1mW60','WPJdIdNdL8keW6/dRG','W4ddPKpdGMqm','zr3cKCkv','BJXzbsHEuMOzW7tcUGJcOe0EW4GEd8kYo8kApbdcUW','l8kzdG','egCJ','B8kQWOS','F8owtrK','vuBdH8oJ','W6JcRc/dJCkaWQn2W6RcJSonW5FdImkTW54','iutdJCoyW7FcLmo+nrddGhW+W6u','5lM45PwM6l+O5P6D5OMB5yYz772t5BAp5OUB5y2p','yrxcN8kpWQFdG8kmdbpdVG','vHrSWQpcUmkFWOzK','pwOW','WO5gWObworzJDCoeWQG','WOvKW5aNW7PR','WO3cLmoeE8kCW5LiW5NdLmkUW7eAqq','W7GEyxO','W7/dJCoqW6XmW7RdUg9gmW','5OQ85y2m5OMy5yUf77YP5BEL5OMC5yY3','W7vHmsJdICkArCojnG','t2miW7Gm','y8oBimo9WOjDFSkRW53dUtO','5Q6F5OUl5yMK776q57Eg6k+h','WP5GW5C0','x1xdSvG8','W7VdHCoEW7y','WQFcH8oBFsK7W44u','aLW1','WQRcLmompCosWQCYW6lcUSkcAGRdTaTvD3jU','5lMf5yQq5yQs6kgE5AA16lEX77+Q','WRpcKmohimoPWRu+W6pcK8ktsbBdSd9qE0H0vCotha','dfOObY/cVNe','sqfXWQFcN8omW4qUWQbmW67dI8kpWR3cKd7dP8oSW6btkmkuWQK','WONcNColACkqW6jmW5hdV8kEW7COuhrAW7S','FCkLWPrC','cLiMjq','h2OrEJftqxK','bgefDZztD34osCkJ','WORcICoxFSkXW7rDW4/dMCk+W7CcrNLm','DNjeW6hcIeW','W6WnFghcTmopW4j/jSodCWFcPmoiW4W','v8klhtPVvmolW59Li0KNEmoqtXpcOMxdKmoVWQjNW5Lc','zW0arc0dsXOwW6VdOuxcVHStW7r2gCkRzCo+oG','WRtcH8ogAa','57+E5yc+566y','WQD7B8kSW6CtfqRdQSoNb2e','k8oVW65Jc8kTWOyIWPJcK8oX','gHlcTrPP','fwSCDrbwv2e','v8oknNSYxSokW4a','kCo6lSo1','pSkprb3dILJdGaaBjqjsW44eW5RcNmkfW7C','6AAj5Q2g6lYG5yEa5Rs+5yUk77+u6lEd6ygx','bheCuYPt','WO1omt4','W7iOi8o5','ECkMgCoBa8oTW5/cOCkRWPpdKW','57+Y5yoz6Ao25y235Awx6lAm7763','vtJdMSoEWOFdNSoFWOeJWOC','hXlcSG','vI3dMSowWOtdISoYWOyU','w8kEhsS','nMaJWPFdImotW6NdJd9XgG','57Yf57Yh5lU16AAg6Akm5AAK6lsi776L','AaBcLCoCBbxcUConcCoyuf7cO8oDW5ZcKa','bgddUmksWRTTtW','vKFdHSoIEZRcG8kWgq','WQXcjI5aExT7W6ZdS8kyWQu','W5JdP2/dGhepacldOuddGmotWR5LW4DI','WPriWOq','i8kbqWO','5OMv5yYr5Asv6lwV772R','EWBcJ8oe','wvvM','qGDGWRBcMmkt','E8oweLdcKrNdHtWbkcv5','5Pk95lIV5PcF5Aw76lsf77+o','576n5ycj6Ao05y+a5Aw16lss77Y+','W4xdOLNdG1WrmHJdUW','WO7cK8ovr8kqW7TjW5ddL8kj','WR0MzSoOWQ5iW60YgCo9WRS/fq','WRtcM8ogiCodWP81','5OM25y2s5AAf6lAU77Yp','r1pdOG','cvyMatlcQhTUzSkzW4G','r2OcW7mSWR/dUMNdNmkBW7inW7j8W6pdJ8k4WPtdL8ksWOK','DCoaj8oMWOT1Dq','vCosu8kZrCkYamo9
2024-06-28 07:27:40 +00: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"])