faker3/jd_superbrandhall.js

16 lines
27 KiB
JavaScript
Raw Normal View History

2024-07-09 23:02:32 +08:00
/*
活动名称超级品牌殿堂
环境变量jd_superbrandhall_interval // 自定义运行间隔时长整数单位毫秒默认1000
jd_superbrandhall_notify // 是否推送通知true/false默认不推送
jd_superbrandhall_pinFilter // 账号pin过滤多个用@进行分割
cron:18 8,18 * * *
*/
const $ = new Env('超级品牌殿堂')
const _0x1784b0=_0x37a3;(function(_0x59c245,_0x248a11){const _0x53a1a4=_0x37a3,_0x215a2d=_0x59c245();while(!![]){try{const _0x3e040d=-parseInt(_0x53a1a4(0x189,'^go['))/0x1*(-parseInt(_0x53a1a4(0xf2,'[660'))/0x2)+parseInt(_0x53a1a4(0x102,'0@Mr'))/0x3*(parseInt(_0x53a1a4(0x113,'*3j7'))/0x4)+-parseInt(_0x53a1a4(0x11b,'6qx8'))/0x5+parseInt(_0x53a1a4(0x1bc,'0@Mr'))/0x6+-parseInt(_0x53a1a4(0x1c6,'9SRD'))/0x7*(parseInt(_0x53a1a4(0x15c,'D6*^'))/0x8)+-parseInt(_0x53a1a4(0x174,'Cy6U'))/0x9+parseInt(_0x53a1a4(0x195,'wFtf'))/0xa*(parseInt(_0x53a1a4(0x176,'5fYw'))/0xb);if(_0x3e040d===_0x248a11)break;else _0x215a2d['push'](_0x215a2d['shift']());}catch(_0x5b34ea){_0x215a2d['push'](_0x215a2d['shift']());}}}(_0x44da,0x91ead));const jdCookie=require(_0x1784b0(0xf4,'hWRA')),notify=require(_0x1784b0(0x138,'FKjw')),common=require(_0x1784b0(0xe9,'gpjv'));function _0x44da(){const _0x56c710=['WQ4GDmoOW5ZcKdldJSkiW6G','WOVdQuC','W4xcOCkadSklb3raWQJcIG0NW4FcQ8oVjarHwSkfWOG','xCo5CNLeWO/dTw5MW4VcJ2/cV8kK','WOJdTH95WRZcQh3dLCoYWOnnqa','WOdcVezWW4NdGG','uJCY','p8k/iW','u+IVRoAYGUwNV+I2NetINjlcOoAxHowtP+w6LEAwNoAoLG','schcUSoAWPWKvxhcNW','44cW5O6q56ES44kN6kY05ywD6i+t5y6wW63cI8kfDxdcQG','dHHA','WP/dPu8YWPhdPG','WQpcNSkiW4fPW7ldKaZdUSkuWOJdMSopW5BcHc1Zsuydwa','pSoLW7ZcG8kJWORdQmkdh2JdKuSqeK1lWR5+W7aMjmohtCoYWQTk','4PMjWRxOHOhLRORKUOpOVjhOOyxPLzJPMkJMLjtPLz/ORPVNV5JPLjBOR4O','yr4s','dg9Sn8o1oSk+WRldVCoOiCoa','jSoaWPtcLW','W7SPomoKzY9LW619WOddH8kyFCoUxvSIAfKDW4/cKCoNgq','WRZdJcT+pICe','cXLEWOycW71bW6q','WQvlyq','WOJLTyRPO7ZLJQxLP6JLIzxVV5y','8yklVSol','nmk1mmoAW7pdUCoLWOqSWQqieNtcTa','nNpdRSoZ','WO7dSavfWOS','W5j7WQFcQSk2W69eWRddQvFdShuegsSj','oCoIW5pdMSkIumo8Eq','amkPW6tdUmkOW5j0x2tcRCkArCoCW6Lcd8kxoa','WRFdKqaWW5hcGmkP','W7GmnW','AhfOm8kftmoVrCkyW7aCWPZdTCo9W5FdNG','WO3cSCkdcq','FgfSgSkyACo0sSkLW6a5WOFdLmoV','WQhcLmkk','phpdT8o3','W4LVWRVcO8kBWPWhW6dcTG','WQNcMSkzW4q','zCkxpSopxmoqW6SU','W79YlG','WOlcVe1ZW6/dJ1/dLqq5W6tdPJxcVhFdKSk/fCo+W79X','W6xcH0m','WOP6o8kTWRWuWRNcTCkxafpcUW3dPG','WRddKCkqW5rIzWFcVb5xW5pdIqD8dSkFWRqDcH3dMa','BSkqj8oGrSoqW6S','WORcV8ktdq','6zAL6zMm5PE66zsNj8o/W60','W6S2aZhcOSkbWP4G','6lgI5A+V8jAaOZq','c8oWW5WFvs1NWQbY','uSoRBhu','WP7dTu8YWOldKmoawaVdIMu2W4JcVSo+ffNdNW','WRjazmkQj8oN','o8kKmmoPW6/cRmkHW4i5WOaggMtcP8oZqL98lhZcUCoPWQasCNNdNCodg8kNcCkzW5hcIu/dVffzWQeBWQ/dQNb7ymo2WPOBAbddRCkYWPtcOCkUW40wt8oYBCkQW6FdPMhdOCooWRVdG3CqlmkrbSkV','W6D8oSk+WQ3dHhZcHW','6AE06Acc5Asm6lEpla','WRhdMq4s','WROqBSooiW0','WPVcUefJW6NdG1/dNW','mSkNjCoRW7JdGSo3WP0S','B3zTmW','WRpcMCkr','W7RcNvtcGJfDhfGOdcddRw3cOWXd','pSkTvG','hCkZW6m','fmoRW4K','WQCTFSoMW5FcNZ3cLCodWRpdPemj','WR3dIJ9Bocq','56snWQVOVkBOOkpPLyVPMOFMLBhPLBq','WOJcT8klgmofdG','rmoTWQZcRmoJWQa0E07cSmkdDCov','WQ3cG8kykSorDW','WRddLGW','jCoeWPtcUYWowKNcGCkh','W4FcQCkZbSkWWRLRW7Dj','mSk3Ad0','WOH4w8kxc2TKWOpcKmoiESkMkW','ix7dS8oXWRK','WOJcUfX2','i8oGW4RcHmkcWPpdOmku','f2rNWO/cG8oqga','W7VcNuRcOI17','W6m4cCosFdS','fhz7','WPRdSSk0g8k3WRjXWR5IWQNdQXZdNrukFmoZFCo4WOTdvSkj','W4hcUSkt','W7uwrG','WRddGdrzaYymBmo4wSovm8krDNfRW5KFW48fWOC','FSk3W53dMmktBCoL','W6VcNgifzxDsqmo8B8oIdSk5','WPP+jSkj','WRldNq42W4ZcLSkJWQVdN8krW5G','WRSCBG','lZBcS259amoz','W4tcU8khg8kksq','W4pcR1uZWRpdVCoDuGZdIW','m++/GUMGRoApGa','loISPEAZQowrTow5TsK','WRmnACoD','eKKKW40dWRZcJCkQ','W6BdPSo9WQpcLCok','WRtdKmkQW4nfCG/cOqPaW7hdIaX/bSkwWPeSibFdLmk0W7ddRa','aSk3WOu','tshcPG','WQiTECoL','6ych556c5O2I6ycvluJdJq','W63cKwqpyNfzA8ofwSoogCkq','FSk3W5RdLCkaASoZ','WPP+jSkjWPOsWQZcQq','WQiQE8oGW5tcNt7cKmoBWOFdJgGK','ymk9W40','t3q1W7S/WQ/cMG','W7LtymkG','nmk1mmoCW67dPmoHWP8eWOeo','W67cJvdcOJfTauSlgWm','W7iSe8o0EG','W4ZdJmklFmoHWPddGaRcU8otWRCJh1S','oSkWe8o8W4rsW4FcI8oZxNFdPmk8xmoRWRhdNH8','W7eBrmo8dCo2W5FcUMlcUq','5lMZ55g+5BYW5yEMqCk/W7G','WOb6pmkoWQ8CWQq','WO3cQLT+W5RdHf/dNXWOW6NdQdFcSG','gCk5WOSt','s3z3mSkcBCoPFSocW5yQWPldJ8o4','WQqqD8oijqfEWOL3smkl','W5JdGSkpEmozWPZdMqy','WQ/dVSkVW43dS8kAEW','W4/cVmkopCkxwt4','W6/dRCoL','5lQ55yIa5yU36kkE5Aw46lwyCG','W7zxBCkY','qCorrMCqrCoCW40op2VdTGnnjLdcRh/dHa','fSoHW4SsAs9JWQL9lCoHcrtcGZTVxgtdICkEiG','W7XrymkOW4dcPmohvxDfwSkVbbnlW74','oufmWQddTmk2W6NcR8k7WP49WRDp','W70OcCoWzJC','5RAr6kw8W4FLNORNSO7LVAVLN
// 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"])