faker3/jd_wxSign.js

32 lines
59 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称批量店铺签到 · 超级无线/超级会员
活动链接https://lzkj-isv.isvjd.com/sign/signActivity2?activityId=<活动id>
https://lzkj-isv.isvjd.com/sign/sevenDay/signActivity?activityId=<活动id>
https://cjhy-isv.isvjcloud.com/sign/signActivity?activityId=<活动id>
https://cjhy-isv.isvjcloud.com/sign/sevenDay/signActivity?activityId=<活动id>
环境变量jd_wxSign_sign_lzkj_Ids // 超级无线签到有礼活动id多个用英文逗号分割
jd_wxSign_sevenDay_lzkj_Ids // 超级无线7日签到活动id多个用英文逗号分割
jd_wxSign_sign_cjhy_Ids // 超级会员签到有礼活动id多个用英文逗号分割
jd_wxSign_sevenDay_cjhy_Ids // 超级会员7日签到活动id多个用英文逗号分割
jd_wxSign_lzkjInterval // 自定义超级无线活动签到间隔时长整数单位毫秒默认500ms
jd_wxSign_cjhyInterval // 自定义超级会员活动签到间隔时长整数单位毫秒默认1000ms
jd_wxSign_lzkjFilter // 账号pin过滤跳过不跑多个用户名用@分割
jd_wxSign_cjhyFilter // 账号pin过滤跳过不跑多个用户名用@分割
jd_wxSign_notify // 是否推送通知true/false默认不推送
jd_wxSign_maxRetry // 签到失败时的最大重试次数整数默认0
jd_wxSign_forbiddenQuit // 当连续请求IP被限制时是否跳出即停止运行脚本true/false默认停止运行
不同环境变量对应不同链接类型注意区分官方接口垃圾中奖一切随缘打印仅供参考
2024-06-30 22:17:24 +08:00
脚本无法跳过黑号响应擦肩请主动设置过滤账号以免造成堵塞
此脚本为批量签到工具本如果你只参与一个活动并想看到更详细的活动信息那么请使用另一个脚本 jd_shopSign.js
2024-06-28 15:38:28 +08:00
2024-07-02 23:09:05 +08:00
cron:1 1 1 1 * jd_wxSign.js
2024-06-28 15:38:28 +08:00
*/
const $ = new Env('批量店铺签到(超级无线/超级会员)')
2024-07-08 11:15:08 +08:00
function _0x48a8(){const _0x4132e9=['WPyocmoZW7i','cWqVgCkQhSkSW57dRWRdRmkiWO8RWPXgW4BdUY3dJSkSECoK','W5dcLguXtmosW6xdK3fQESk3jG','ggdcVNDKWOJcOgFcN8kX','FZieWQ7cPmo1W6CjDa','W59EdCo1nchdIeaQWQRcOCoR','WPqEW78zWQxcKfPciq','8kcnRcFLRl7NI6tcIa','WQSmWPVdQCooAKybW6i','WOJdIJ9OdSkpWRBdMq','BvddLSkSWR1cW6XDWOhdRSkRW6FcQmkwWPPKmtxdKSkXibKSyW','fSkmWR/dUq','tSowp8kuW6hdRmoerSoWWOO','keFdOmk8WQS+W7zFWPNdLmk2W4BcV8kkW5TxkgpdVSk7lr8atmklWRddTq','W4Lfgmo0aX7dN1WRWOBcTCoP','f8kIW4fm','WQyhWPG','W4CjWP8','WOKxWRO','W4SzWOZdNWfJWRddHSokW7O','hSkMW5HQW47dQSkHbmowWPeOF8kKWR4','h0tcQh8RWPbCWOG0WQvEFedcNbnMWQNcVCkgjMG8vSoZWOC2B8oi','W4RdJCoQWP1OzCoMtKJcIG','W70PD8kHFNtdISoocLvS','bGuepmk3pSk1W5BdRYBdUSkIWOCQWQHmW4K','uutcQwuPWPzfWPqpW64','WPhcNCkbWRjnWRSW','WQ/cNSkNnbeIaWVcOmok','kEw6JUIUVoEMHEMAKoEyVUA1PUwiPo++Ra','WQRMIkdKUQqt','CCoNEW','BItcGvSsW4zmwW','u8kjWQih','W5FcVCkeW6OWB8kvWOS','rGzGeCkg','W5CLW7uAWRhcGmkO','WRFcJYxcLXG6tCoh','W5BdKLC','WOFcO8k3q8oyrSogxmk2','W78GA8kXr2JdISoXm0zN','W4RcUWBdMf3cJbWrx8kbW4NdJYz0Aq','ltO7joEURowjVEMuSEMyRCk7DCoe','WQ8gWPZdQCosAue','gCkDWQldSaL5dSoGW4dcR8ohAwxdOtWn','DSoOFSoZWPFdVv4','lsdcQ8ohWRm8','lLNdLmkHW74eW6XoW5NdOSk2W5xcO8klWPTWjNC','dHuekmk+lmkI','DCo5hSk3s8oEWQHSW5jkW4/dOg4','fmkcWRu','W5pcI8kBWQzcW7mMubjEFIrXaCoLW4WoWPBdOSo0WRRcNSoEW6RdJSoGWRe','fwZcRq','nmkGtSoHimkBW7rW','5Bsg56645RI1bUwMLa','EdKiWR7cS8oIW7GjCbddJmokuNpcQCkPoCk0W5rHbq','W58as8krv07dT8oWeq','W6BdTNhdQG','W5qYW6uqWRZcGmkOqSoeW4xdLSkc','WPH+vmoxAbO','W5JdH8o5WPPxySoMuNpcMmoQsmkjWPPAWRlcOa','W5GVW5C','zIlcKf09W5nXv28','W44UW4Wq','W5bevSk+WQ9WnCoaW6RcRmkEW6y','WP3cM8kgWQHAWRuHtdbcyau','v0RdSGSyW6a','cSkQW4ThW7ldSmkPdSowWRq6','WO8EW7KaWRJdJrWlna3dL8oWAudcLCkfWPxcSmkEzsTfEmo/WO8Z','amktWOfuW49AW6OZBq','mIRcQmof','nmkSsSo9fSkBW4TPW7K','mKRdKCkFWRWgW7Pw','g8kmyCouW4pdICo6Aa','W4RcSr3dMa','ys7cLLKQW45vr0Hc','WOadW6SeWOxcLL5b','tW55fmk7W48PW4RdMSk9WPe','W57cUWtdVLZcPXybzCkKW4hdHd1e','W4muWPhdGIDJWQRdQ8oSW7vpW54','W5nFmmoX','k00w','6i+15y+1WP/cH8kjmSoEFCkKW5tcLCoQWOFdJ+wMHoI0TU+9Ia','c8keWRxdSJrZaSoX','gmkeC8ob','ub11emkMW58SW7NdK8kVWOldJCkwW7z0W4qQW4ldQ0y','WRjwA8oQCbRcNmoaWOtdOYBdQgeu','44k05lM45lU/6lAI5y6u','wexdTbu','WOqBWQKTWOhcT1VdQdVdI2Kd','DZ8zWRpcL8oUW6eFuWFdOq','WOpdL8kPWRKfyNxcNW','omkDiCoyWQRcJCkvWR8VkW','W43dQ8kserCEmZdcGmoH','qFcNPPC','h0tcSMeYWPbFW4iNW6LAFeFcVdzKWR7cHSkke2mjwW','hSkeDmofW5JdMSo7','z8o8BSo1WQFdVee','5lMV5Aw16ykL55YU','xpggNPJVUQ8','gCklCq','77YO5yYQ6ioi5lQe5yob','WRqPrmkmWPZcJCoQfGJdHL/dOa','uSo0fCkzFCoCyCklvW','W5/cTXZdIvBcUG','pvWptW','yuFcUSkxWQVcSfiW','W7xdRSoSqxZdNt40','WOVcMCkBWRu','WPxcPCkGwmolw8oItmkrWOy','ACoMxmo7gSkdW6GVW4vDW7/dOgbZlhfFgg7cQW','prlcOSkVWR3cVvi','fCkEWRu','zSoeCW','z8oGASo4WOVdOuyBW5XdpSodWO0UmrvT','u8oWgmkpD8of','kCkmW799','WRClgSoV','BSokymki','W7P9mavcxa','WOddL8kGWOmVE2lcNSoJW4ZcTqG','44gP5lQV5lUw6ls45y+L','W5ZcPHNdIq','WOWpbG','WOFcR8kZx8oOqG','WQmgWPZdT8oEFva7','W5FdJLC','W7pIN7zo','4P6fsUESKowkVUEZH+wEOE+9Lf1Ay3fCWQFdOCk3W7mOvCkxvmkoW5ldNfNVV64U','rmosW5WoWP5BW7yyCSksqW','z8oSE8oZWQZdI1mhW7fgnSoiWRCsla','WPLVvColAGNcHCo0WPG','mYdcTSovWQSG','WPqdW6OEWPNcKKjrpqtdImoCk1VcHmkrW5lcVCkiFq','W7JdVg/dVmk1WPWB','8lM2Qo+7GCoS5lUv5lIo5lQg','W4/dGCoWWPe','vK7cSxG6WO0','W5TFzmk3W6uAeW','D3xdGY0PW5VdVCkvWOFdPG','eGKxamkBi8kXW5ZdSYpdVSknWRWSWQ5aW58','WPFcQCkMqG','vbv7cG','WQtcHd0','WQ/cJY7cLY8TySoriruEW5iwhSo2W74bW7/cTG','W4FdI8oWWPnQza','xeRdQc8dW6FdICkSWQVdVMKnW5zD','WOdORARMS4VLPilOTjFcNokFJ3e','WOJdRHVdTKtcOHGE','W7NdVhldQmkGWPm','W4/dGCo9WOfZACo8qW','sf/dSauy','fCklBSouW4JdMSoLySoZ','WOL3WPGHWRpcTSkNySoM','6i+o5y+vWPfssmk+WPvBWOxcIIyoW5SO5AAs6lwq','c8keWRxdSIvOhCo7W5VcJCoAiq','6iYI5y2ppmo/WR3cLsRcJmoXtdddQUwLVUI2So+8Tq','W6SRASk8','W4hdGCo3WPO','e8kNW7nEW5NdLSkJcSoDWPG6ESk2WRvNrhbEeZ3dRuiq','W7T8lW','W719oXiBvtZcIJTf','thDl','W4ldGmo9WPHRAmo3ra','m8kRWQbU6lAm5y+K6l2d5RQXomoExG','zYJcLNmZW4Hkv2rWW4NcMSommW','v0ddUW','W5Tpc8oZmaxdMuOnWRlcTSoR','WQ0MpSogW5iAjSoKW4dcTq','u2Xnd8kuW6m','eSkaWPTsW79HW6G','l0ldJW','WQtcMdNcNa8fyCoqnWCrW6C','W6KqWQNcOSkuW4aaWQDuFIykW4ddVCoCqSokWRRcKra','W4LhfSoQfbNdGW','WO0tbG','W5ddICoMwfFdKG','DSkYW7HPACoTWO0','W47dUmoSv2ddMt4+W41AW4pcNmksa0NdOmkXWPrSWP
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"])