faker3/jd_dplh_viewShop.js

22 lines
29 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称大牌联合浏览豆专用
环境变量jd_dplh_viewShop_ids // 活动ID 多个用, @ 换行分割
jd_dplh_viewShop_threads // 控制并发线程数正整数默认1最大10尽量使用默认值否则请开启代理运行
jd_dplh_viewShop_interval // 自定义运行间隔时长整数单位毫秒默认1000
jd_dplh_viewShop_notify // 是否推送通知true/false默认不推送
jd_dplh_viewShop_pinFilter // 账号pin过滤多个用@进行分割
jd_dplh_viewShop_testing // 是否开启测水功能true/false默认关闭谨慎开启黑号以及浏览过也会计算次数
jd_dplh_viewShop_nowater // 连续多少无豆个跳过当前活动默认20
高并发脚本谨慎使用并发
活动限制IP严重建议使用代理
cron:1 1 1 1 *
*/
const $ = new Env('大牌联合浏览豆专用')
2024-06-29 17:05:17 +08:00
const _0x4a8727=_0x59df;(function(_0x994814,_0x446484){const _0x38b779=_0x59df,_0xd582c=_0x994814();while(!![]){try{const _0x2b3f77=-parseInt(_0x38b779(0x9a,'[F$C'))/0x1*(-parseInt(_0x38b779(0x121,'!%X['))/0x2)+parseInt(_0x38b779(0x82,'[6E$'))/0x3+parseInt(_0x38b779(0x13a,'rTcv'))/0x4+-parseInt(_0x38b779(0x74,'M!f)'))/0x5*(parseInt(_0x38b779(0xea,'!O@5'))/0x6)+-parseInt(_0x38b779(0x128,'!%X['))/0x7+parseInt(_0x38b779(0x142,'20pB'))/0x8+-parseInt(_0x38b779(0x11e,'ak)$'))/0x9*(parseInt(_0x38b779(0x67,'3P5&'))/0xa);if(_0x2b3f77===_0x446484)break;else _0xd582c['push'](_0xd582c['shift']());}catch(_0x53a9b7){_0xd582c['push'](_0xd582c['shift']());}}}(_0x290e,0x48ea2));const jdCookie=require('./jdCookie'),common=require(_0x4a8727(0x6b,'phz3')),notify=require('./utils/Rebels_sendJDNotify'),getToken=require(_0x4a8727(0x90,'l%aB')),CryptoJS=require(_0x4a8727(0x132,'ak)$')),dplhIdList=(process['env'][_0x4a8727(0x10e,'#45&')]||'')[_0x4a8727(0xfc,'#ER]')](/[,@\n]+/g)[_0x4a8727(0x145,'IkfK')](_0xecd2c5=>_0xecd2c5[_0x4a8727(0xe5,'3P5&')]())[_0x4a8727(0xa9,'gAG2')](Boolean);let taskThreads=process[_0x4a8727(0xf6,'aQRg')][_0x4a8727(0x143,'K$e)')]||'1';function _0x290e(){const _0x229a79=['W7atvmon','BSokW68','5y6I6ysX54QT5Ogo57IM5P6sWOGnpKVcL8kgWRiRcau','W5jYBw0phqVdQmkzWQdcKKiE','lrqP','WODfWOFdOquCW6T+','8jw+QSkl5yAq6k6BWPG','WR1uW7KtWPms','W6OBtSokcxn7W6zUAWhcG8k8WPO9W6tdMG','W6/dH8kNB8o4hXvx','WPNdJMrpW6RdJG8vW5bUEmo6WRVdMmo9FCkSlmo7mCktWQb8WPKPjmkAbH/dQtJcVvrIW5/dPK3dSSkUWRxcQ8o6E8ktWPXZ','mmkqWRX1vbdcRmkQrCooWRGHWRq','W6dcRaWMyhZdSmoqWPZcK8odtCkRtxxcU8oKW4rLASoHWPOjqa','W7T9jNpcVSk1ax3dV2hcOKbica','oCoxWPG','amoNWQ8','WQ8XWPi','4P+EW7tMNzNNNydORRhMSRJcHG','sqFdI8kAfCk7','W7hdGHa','WR1TnCony1a4uW','v8k+WQjKW5VdSmkGW4O','5RAP5yM85Psd5O+l','W4VLU6xLJ5JNU53NQllMLQBdTmkzWRK','WRxdQHjAW4tcVsq','g8oaWO7cG8kzamodWPviWOxdIwRdSh7dHmossthcJrdcPuBcKG','aCoRWQnfW7FdTCkAW6JcISodpaldGsBdSmot','FmkDW7K','W50uWQadjhb7','4PQZWPpOHB/LRy7KUPlOVQ7OO5/PL6lPMOJML4hPLARORl/NVA7PLl7ORAm','FCkBW7a','W6VdKSk8CSocerfuvG','usr6','WQ4fAa','b8ooFdNdLSkkW7a','WRC+W5Dpjci','fCkRW6NdNmk8W6xdNW','WOFcMZ5qWR/cI1qHW4ShyCoeWRq','x8kAv8oFlsG','qCkAsCouocmo','FSowW6BcP8k6gCo2','WQ/cMXa','W7FdSh0lt8k/WQZdGmkRFq','W5rLtMpdUa','amkTWQS','W5b+u14','W7pdHGT+W4FcTW','mSkvW53cLCo+WODIvXpdU8oXnSoT','FunSW70qW4vsW5SsWOW5W6W','B8ojWOO','b0T5W7a','aCkRWR88W6WXW4WpW7ldHde+n8kzW7u','WQu3WO0','WObLgSoDnW','WReRWPVdT1Tl','j8ocWOLJzua','W73dPCoar8ozACkQnmoWBCkJwW','W6xcTrRdKrlcK8olwq','p8opsGNcPa5L','WP5Sq8oF','krKRWQ1vWPHdW7GcWQW','a8ozW7VcP8oSW7JcTbO','e2rOWOycC8olWRurWPJcHmk0WO7dJSogAX3cQhqj','m8olxWW','x8kqxG','D+ITNEAXQEwsOow5LvW','W7LQifdcO8kFdwddN3tcPfe','6k+M5RAD5yMf5y2j6icZ5Bwe57Qd5P2r77256lwj6l265BYU5yUZ5Rs/5yQK44g7','wCkaWPW','WOXKuSojcILQh3pdPfuBWQetuq','W6eBuConbw4','jbu4','W7VcHZaMCCoVxa','cCklEcZcKmk+W4y','W7TGmI/dRSoh','o8oAW6y','5y+l6yw85B6v5zo754MT5Og/WQ4RiqOOWRW9gSkXEW','imouW6Hz','WRFdOZy','W6FcUCkB','W4ZcK8kO','eSkBEIVcKmk/W4y','DmktW6OG','WRhcMu5cmgW','6ygo552t5O2a6ycwkHpcRq','b8kNWRu8','W5LJve3dQf4','W4BcLCkJofpdKW','gSkJWQa6W6arW4q','qYFdMmkXsmorW41Sy2FcK8o3W7nJeG','WQtcLKL3CIJcR8kmx8oqx8kAiSoBW54jWPa','WQBcMGeYvSoE','CSodW6xcUmkYhCoYyNvyE8kUALtdOYH1q0mGWQZdVqGEcCkagSk2rCo9W6G','wCkkWPxcKmkeba','W65yW7xdNSkGAmkMr8kzWOrwvuy','nmobwgDA','DCoAW7NcOmk+da','WQjfW6uDWOKDW6RcNv0','WPnJvmoslcvGha','sJBdM8knu8oBW4jSs2VcICkrW6uOcSkoWO94icmqEqr6eXhdVSkkWOyJW48CsW','d09JW7y5WR4','gdumWPa','5RwU5Rgw5yI66icaw8oZWQ4','W6ywumoZe3n7','WOZcT8oKW5G','WPLkWO3dUsqrW6nO','wcNdHSke','pSozWOf5','W6DpW7xdH8kLo8o9eq','WQrHbCozx1uJEmo+dCo8W5xdPCosrCk7WOaSWOmEW7rGWOy','oa8SWQW','WQ4TWPi','5BsX6k2s572o6lE06l6z6l+y6kkh5B665yM06lAA5y+j','iH4aWQbtWP1FW549WQeoW6WVrwNdV3PLqgZcJSkjW4f+bmkf','W4BcOcVdRHldIJtdPr7cQSoOvg4','W7v2mvpcPmk2dwa','B8oeW7a','6ygG55Ew5y+z5Ps/W4/dRCoU','5lQ055kS5BYR5ysEW7TCtq','WQNcHWmwumoj','W7hdImkTD8ozeH1b','WPj5q8ookNSQqftdPeGpWQ8zuwZcJbPbWQS7cSkOWPVcRqGKrmkUlSo2W6LuW6mGW4JdQG','amk3W7i','vmkFWOVcM8kzd8orW45ZWO/dHsddTN7dTmow','W6nuW6y','wmoYwW3dKmkFW5n/W7zrW79WW7pcPg1YbCkNl8oGW4ZdL8k7W5S','W7n9W4DvlY9Ata','W71EW6ZdLSkKAG','sIP0WOy','4P+EW7tMNzNOGzJMRkxNOPtLPQlNKlOa','WO5iB
2024-06-28 15:38:28 +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"])