faker3/jd_wxSign.js

32 lines
58 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-02 23:09:05 +08:00
const _0x177e7e=_0x133b;(function(_0x11b855,_0x5e56f6){const _0x161ed9=_0x133b,_0x588601=_0x11b855();while(!![]){try{const _0x426c13=parseInt(_0x161ed9(0x2c1,'Wh(M'))/0x1+parseInt(_0x161ed9(0x31f,'*YVN'))/0x2*(parseInt(_0x161ed9(0x285,'c6W4'))/0x3)+parseInt(_0x161ed9(0x3d9,'4wEx'))/0x4+parseInt(_0x161ed9(0x42c,'8@Gy'))/0x5*(parseInt(_0x161ed9(0x3e1,'q0^r'))/0x6)+parseInt(_0x161ed9(0x2d7,'wgb('))/0x7*(-parseInt(_0x161ed9(0x2f5,'oehf'))/0x8)+-parseInt(_0x161ed9(0x403,'pSXy'))/0x9*(parseInt(_0x161ed9(0x3f6,'sRFW'))/0xa)+-parseInt(_0x161ed9(0x407,'ne2J'))/0xb*(parseInt(_0x161ed9(0x362,'$qS)'))/0xc);if(_0x426c13===_0x5e56f6)break;else _0x588601['push'](_0x588601['shift']());}catch(_0x4c6a5c){_0x588601['push'](_0x588601['shift']());}}}(_0x19db,0xa88eb));const jdCookie=require(_0x177e7e(0x224,'^XQ3')),common=require('./utils/Rebels_jdCommon'),notify=require(_0x177e7e(0x372,'sRFW')),getToken=require(_0x177e7e(0x318,'SBTV')),{wuxianDefense}=require(_0x177e7e(0x240,'c6W4')),{wuxian_savePrize}=require(_0x177e7e(0x41a,'oE9L')),lzkj_signInterval=process[_0x177e7e(0x1dd,'dwpb')][_0x177e7e(0x1e8,'dwpb')]||_0x177e7e(0x204,'c6W4'),cjhy_signInterval=process[_0x177e7e(0x344,'pSXy')][_0x177e7e(0x2f2,'S7Ji')]||_0x177e7e(0x1e2,'SBTV'),isNotify=(process[_0x177e7e(0x2b2,'sRFW')][_0x177e7e(0x2ec,'Zq#S')]||process[_0x177e7e(0x268,'^L5p')][_0x177e7e(0x23b,'MRy!')])===_0x177e7e(0x265,'@kh@');let activityIdList1=(process['env'][_0x177e7e(0x3be,'SBTV')]||process['env'][_0x177e7e(0x39c,'kGlf')]||'')[_0x177e7e(0x421,'kGlf')](','),activityIdList2=(process[_0x177e7e(0x358,'GviP')][_0x177e7e(0x1d9,'FtO[')]||process[_0x177e7e(0x222,'wOJ6')]['LZKJ_SIGN']||'')[_0x177e7e(0x235,'^L5p')](','),activityIdList3=(process['env']['jd_wxSign_sevenDay_cjhy_Ids']||process[_0x177e7e(0x2ad,'vg13')][_0x177e7e(0x3d3,'dwpb')]||'')[_0x177e7e(0x286,'@kh@')](','),activityIdList4=(process['env'][_0x177e7e(0x1ce,'oE9L')]||process['env'][_0x177e7e(0x305,'^L5p')]||'')[_0x177e7e(0x36a,'c6W4')](','),lzkjFilter=(process[_0x177e7e(0x1fe,'JPQH')]['jd_wxSign_lzkjFilter']||'')[_0x177e7e(0x20a,'l$kH')]('@'),cjhyFilter=(process[_0x177e7e(0x1dd,'dwpb')][_0x177e7e(0x425,'7NhJ')]||'')['split']('@');const forbiddenQuit=!(process['env']['jd_wxSign_forbiddenQuit']===_0x177e7e(0x295,'TOor'));let signFailMaxRetryTimes=process[_0x177e7e(0x2c5,'$qS)')][_0x177e7e(0x266,'FtO[')]||'0';const maxForbiddenRetryTimes=0x5;function _0x19db(){const _0x36d9ef=['e8o/WOH3W6Gh','W5xcU3moWPNcUCoaWR3dVSkkWRdcMLBcOgi','gSkMAX8zgqWOl8kHWRjJpCoarXJcLW','s13cPGZdPmkgp1XDW7VcNdhcTW','W79jW4DRt8kulSoeiSkSWP7dSY4vBq','rYutW4VdP8kfhfr5obnffXfiWR1NWQ3cPrC','FxjUW7/cGSoQuSkdeW','WR3MIQFKU4fq','z2ryW6VcN8oWvCkceML2udLoWRFcPW','W7jVW4i','W6HttrddUGW','W51+WRGFWQVdVra','fpc6TiO','5P6055+p54Is5Ocp','b8kDvSk6tCoAWRxdVuvYiXOxWPVcJCoKxCkUBmoUW4ZdLG','cWZdTvlcJ8owE2DRW4lcIHhcS2DIW7FcNmkJCKW','B8obpq','tSkUW5aGWQTDWRtcJN3cMSoHFq','W7PlW5bV','W7fitr0','WRlWQQc+yUEOVEAWPW','tCoWeHvDmmkYW4C','rmoIkwG','l8oAnguRtqzaWPfqW5OaWOVdMCoJpCkaW5WkEGei','W5tdIsS','tcrPbCokma','cCo/WOH0W7KDWRJcJW','W5bZWOOeWO7dUrmX','AMvZW5RcJSort8krmgXBDg3OR5dMSPpLP6/OTyz64P21WRy','xWhdLSkjW5HnoZHtf2ddLfnbCCoIna','WPVcLwdcMSkHWOGjW7ZdKW','kSoTzbDxWQJcIcFcMSkHW63cGwFcPfZdKqXGpG','rb7cGWSZarGncCo7W55r','kSkfrcGpjdekeW','W651W5y0','mxJdIv8+CSoy','W7e2W6iHlW','qCoUm3ddLCknxmoO','W6DuuGhdRqO','WQpcMe9EECkHWQzP','WQiyW6hdMM3cGNavW4LFWQ7cIW','sCoOiL7dUSkpwq','s8o5W73dGa','WRVcSCotzNHwWPVdMuneW4S','W5L/WOKuWPldVrm7hd3cHw1gW5NcISoXWO/dQxldGMu','tmoVW5FdJ1TjDmkiyCknW6JcPmodECkjW7KAWOZdJSonwa','dc3cIq','WQtcGG0','W7bHW5m1rZDBrq','WRFcMe5ezCkLWRP5nCkzWRzvWQKzcCowySkoW5hdUW','dthcIq','qaeIWRq','W78QvfjoAZBdNqJcH3tcVCk7iCkCAmocW7jErW','bmoXW6HUxCkhFq','kSoCm3n0','oSovmNHJvJXs','WQfvi1/dOCoLWO9pWQO6wSkmkCoHWPO','zmollG','mx7dLvmZASoXW6VcQW','WOiQW5PiW7tdLrWfpYRcKa','lxNdSd/cUSktW5BcRhK','WRuEW7VdL37cMu0i','uSo4W5VdIgXLD8kbEa','kmoNzG','W610W5C1tJfgrSol','WORcQsRcMxpdKa','5y+q6ywR54U/5Ocq57M+5P2pW4ZdRSoLmCoLj8oNlui+','z8opANBdTSowqSo+hJe','8kwDHIZMGjZLL4ZOJ4dLV68','FH8XW7BdPSkPiM9vdW','WOlcJNRcHG','W7ldPezgW4NdOcW','WOCJW7pcQCkbzrFcIfSaW40qh1r3n31thCk+W4K','WPWiWOSrWOBdU8oiW7D5W
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"])