faker3/jd_dpqd_main.js

18 lines
25 KiB
JavaScript
Raw Permalink Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称批量店铺签到活动查询
活动链接https://h5.m.jd.com/babelDiy/Zeus/2PAAf74aG3D61qvfKUM5dxUssJQ9/index.html?token=<token>
2024-07-14 21:16:07 +08:00
环境变量jd_dpqd_tokens // 活动令牌,多个用英文逗号,@&,换行分割
2024-06-28 15:38:28 +08:00
查询活动信息主脚本IP限制严重建议使用代理请勿频繁运行
自动去重并过滤无效活动默认过滤垃圾奖品活动
运行后会在本地目录生成缓存文件以用于签到脚本使用
2024-07-14 21:16:07 +08:00
cron:1 1 1 1 *
2024-06-28 15:38:28 +08:00
*/
const $ = new Env('批量店铺签到(活动查询)')
2024-07-14 22:58:54 +08:00
const _0x260733=_0x2f24;(function(_0x47e18d,_0x34907f){const _0x2c8edf=_0x2f24,_0x599ad1=_0x47e18d();while(!![]){try{const _0x32e78d=-parseInt(_0x2c8edf(0x101,'(S75'))/0x1+-parseInt(_0x2c8edf(0x132,'USqL'))/0x2*(parseInt(_0x2c8edf(0x141,'USqL'))/0x3)+parseInt(_0x2c8edf(0x127,'Zhs^'))/0x4*(-parseInt(_0x2c8edf(0x124,'[A()'))/0x5)+parseInt(_0x2c8edf(0x14f,'9K@F'))/0x6+-parseInt(_0x2c8edf(0x174,'Kl(F'))/0x7+-parseInt(_0x2c8edf(0x121,'g@Vr'))/0x8+parseInt(_0x2c8edf(0x13c,'wNu4'))/0x9*(parseInt(_0x2c8edf(0xfc,'PUuV'))/0xa);if(_0x32e78d===_0x34907f)break;else _0x599ad1['push'](_0x599ad1['shift']());}catch(_0x518f65){_0x599ad1['push'](_0x599ad1['shift']());}}}(_0xadca,0x2e3da));const common=require(_0x260733(0x155,'6)oz')),{H5st,jsTk}=require(_0x260733(0x1a3,'PUuV'));let tokensList=(process[_0x260733(0x11d,'9K@F')][_0x260733(0x13f,'lMEf')]||'')[_0x260733(0x16f,'INOA')](/[,@&|\n]+/g)[_0x260733(0x158,'eeyC')](Boolean);function _0xadca(){const _0x6784c3=['BXaChSkRzmkCWPSeaapdKa','oezjESo7oSkr','W7RdVJrq','WOXaWPvNW7WdW5y','wqxcVa','D8o5ESoHW67cISoAtbT7iYRdUCoTWRLzD2HkWQPW','5l2x5Ocd5yUw','WQ/ORyhMSR3LKkRLUOaF','WOaDW78','EmkooSk3rxRdTCo9WRy','ESoQya','W6pdGu8','WO3ORPNMSltLPANOTy4i4P+YWPO','77+j5BsC5y6h5A+u','emotW4xdM8kRda','iXdcG8kxWRC','uXVdSGZdId/dQwi5s8kOemkZWQBdPW','8jsyLM3MNjlORyBMTj7LIOBKV4dMGRVLPjpOTR984P6fpW','W7aYA8kPzG','WRi+WOj7AmkaWOFcLG','B8kzj8kffuxdQa','W69UWOT/u8kL','wbhdOq','WOaxW7yNbh4','kmkgWOdcICo4','W57dQqSf','xZ/dUmkn','W78WCSkNEmoNdSoLWPP2','C8oRCq','cdG0W7e+W6JdI8oa','WObeWRy','tmo9omombHhcTmkxWPna','FCotW5/dQSkbnHVcQ8oIW6VdGJNdNq','W6DQWPf5','FEE7U+ADSU+8OUs6MEATTUAuNEEbSEACTEwrNtpcNW','W4BcMmkHWQbMDq1W','EqBcTa','W59fxtmOvvBcSq','W7RdISk0W75ErmoSWOpcMXtdKSkA','naFcNSk9WQbJDu5Ifr4mwhq','WPWdzG','iaRcHCkDWPXTyfi','5yEa57QP5y+G','W6VdL8kgWPq','sCo8kq','5lUV5lIk54IA5QgK5B+Z6zwY6k2A','wmo3W5S','W5Pewq','uJxdPCkIiLCWD8ojW5RcGSonz3X7','W6SnW50PqexdPa','z8oJD8o2W6lcL8oC','bKtdQwddGSoDW78','W4BcMmo3W7iAdYffW7jCWRO5','W47dV8kJWQfmvbW','WONdSmknW7NcOWldQa','pmkiWOijuIxcVXVdHwWMW4yr','eg3cSmoqWRFdLCkNeSkbnh3dQSoDW6BdHcDIW5VdVx4lW5bwW4NcOSoow8kaWOjgW70QhSoYfLSuWQNcKmop','uG/cRW/cKmkhWQzxl8kFh8ozW7bSDa','k8kmWOdcUq','ChTgcCopmer1W6KoB8kGWRG','stpdTa','jSkyWRrr','xHRdMsNdMZRdPeSKumk6pmkZWRm','h3hcQ8oyWOddMSkWfmk3mMS','W69RWO54mdRdP8oVFSkmW6ddLq','WQ48W4KMDxK','W7b/WPDXsCkQWOZcHgS','W6tdUdbB','WRK+W4i8','WOzRW4u','WQVcGse','jsuv','eCoZWOyb','cEw7LUITK+EMJUMyS+EzM+A1VUwlOo++SG','sJBdT8kaW7ZcHSk8cSkDneddQW','WOuCW6WLaLv4W5HPe2tcUgfDdvJcRSk/W4K2','aSo+AKmvW6WAW7XeWRap','WPFdUSkPW7m','j8kXnfOgdSkQWPJdTr8FWPRcKa','ye3cIry/','W7n+WPzW','WQtcNSo3','FEIVN+AXR+wKN+I2T3FINAJdQoAwSowsT+w7MEAxPEApTW','W69NWOP/pd7dQ8oMFmkmW5RdNW','lqpcIae+WRm2z8o6wLVcMuLnmI9UgmkHzCoQWPdcHG','4P2eW5ZOHyNMN6hOV7dOOBRPG5VLIR7KUytPLy3ORyuQ','W4pdVqudxrZcVa','WRpcO8oimuKP','lv1ErG','xW7cHcRcG8kcWQT+nSkzd8o+W6PvFSoAW6m','BmkDj8kS','s8oyoq','5BMT6zkJ5zkW56wO77YtW48','WPHHW5mEkJCE','oeZdU1jDbrpcGYZcNG','eCoVWOabjCoPW5VdIhS','vmoUWPWWmCkOWPRcNbD6oNbsv8oqlCoMWR5mW5G','W4VcR8keW7FdNCoUWRtdVq','hCo1WOmBmmkQ','WP8RW4/dLxRcIW','W59GWOfmW4OS','ot8bwq','W6hdGv8','W5dcQ8ksW5/dNCoQWPJdTq','cNFcTSoCWQVdK8kTamkN','iXFcMCkf','nu1msSo3jCkh','WQCeWQdcJ3tcLq','W4tdOqSf','C03cJXq6WQWbkCoCxG','W7FdPSo4W6Gj','W7S7D8k1DCoPdW','W7jzW6q','W6VdN8kmWOr7sSoVWRK','W54pgZ1grXZdK10Bgq','WOSNW4iWWOP8W788oSoXW69z','DuNcKXeYWQ0mla','5y2U6yEK54Qi5OgE57Qo5P2UdSo/WOTFWOHkbSo/CXu','W6JdUCoZ','wbVdQcRdNYm','WOPcWR8udCkloa','5RE65yUE5BsC5lUfqa','qmoskG','Fmkzimk5','A1JcIquKW6vQz8oacHFcKqTucwTPnmkJjW','WRRNJkFLO6xLJRJPH7FVVBu','WPaQW6NdT2lcIxG','lsSlqG','pISBrq','5lMS55kW5B+/5yAulH/dMG','W6FdUt1qeW','5B+W5AAN5PE36zEt77Yb','WQOyWRq','WOLfWQC','W5DisJyRweFcU8oLfSoua07cSq','cNFcPCobWRddHW','WR7cMHVcQgxdGSo9W6pcJWJcULFcGG','W6xdTCoGW6GlWQLfumotW5q','iSoHzLGm','WPCjDwz4eSokpq0zW5v7CCkLlG','5Q6E5Pwr562C5yIN','bYqJW6X2W5FdJ8kjyCo3gCkvWPxdGXBdUa','fwZcOW','zmktna','p0BdUq','4P6MjoImLEwoVEA1TowlRos+I+AcKEwNS+I2PW','y8keeYeaWPbYW5vzWPbQfSkz','W4ldVqGLvGS','WRlcKXxcPghdJ8o2WRtdHhm','W6pdS8oGW4aEWRryx8oZW4tcUCoRuCkQWOm','W5NdUZabvaBcQW','WRK2W5pdRgZcGMldJJijzX8','W6pdMCky','W6u7Ca','WQ4RW5O9CvNdQSoytq','5
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"])