faker3/jd_wxSign.js

36 lines
62 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
2024-07-07 13:57:51 +08:00
jd_wxSign_maxRetry // 签到失败时的最大重试次数整数默认0最大10
2024-06-28 15:38:28 +08:00
jd_wxSign_forbiddenQuit // 当连续请求IP被限制时是否跳出即停止运行脚本true/false默认停止运行
2024-07-07 13:57:51 +08:00
活动玩法快要被干废请适度参与不要分享
没水的非自营店铺活动就别签了官方接口压力太大
2024-06-28 15:38:28 +08:00
不同环境变量对应不同链接类型注意区分官方接口垃圾中奖一切随缘打印仅供参考
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-07 13:57:51 +08:00
const _0x3ae4ab=_0x25e0;(function(_0x353382,_0x201f01){const _0x2d2943=_0x25e0,_0x2a59dd=_0x353382();while(!![]){try{const _0x93fdae=parseInt(_0x2d2943(0x325,'jDQo'))/0x1+parseInt(_0x2d2943(0x399,')6Nr'))/0x2*(parseInt(_0x2d2943(0x455,'r[S^'))/0x3)+-parseInt(_0x2d2943(0x24f,'bTil'))/0x4+parseInt(_0x2d2943(0x487,'QG7k'))/0x5+parseInt(_0x2d2943(0x220,'J]lQ'))/0x6*(-parseInt(_0x2d2943(0x359,'J]lQ'))/0x7)+-parseInt(_0x2d2943(0x41a,'Bt9*'))/0x8+parseInt(_0x2d2943(0x45f,'vz0Q'))/0x9*(parseInt(_0x2d2943(0x3f2,'!TgT'))/0xa);if(_0x93fdae===_0x201f01)break;else _0x2a59dd['push'](_0x2a59dd['shift']());}catch(_0x1fd1dd){_0x2a59dd['push'](_0x2a59dd['shift']());}}}(_0x2535,0xbb352));function _0x25e0(_0x48d499,_0x312510){const _0x253562=_0x2535();return _0x25e0=function(_0x25e07d,_0x2d91bf){_0x25e07d=_0x25e07d-0x1ef;let _0x45f0c1=_0x253562[_0x25e07d];if(_0x25e0['KzfvcL']===undefined){var _0x2ce54a=function(_0x37c9f0){const _0x21776c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5665bb='',_0x543b30='';for(let _0x3a83c3=0x0,_0x3605ee,_0x369157,_0x3eaf97=0x0;_0x369157=_0x37c9f0['charAt'](_0x3eaf97++);~_0x369157&&(_0x3605ee=_0x3a83c3%0x4?_0x3605ee*0x40+_0x369157:_0x369157,_0x3a83c3++%0x4)?_0x5665bb+=String['fromCharCode'](0xff&_0x3605ee>>(-0x2*_0x3a83c3&0x6)):0x0){_0x369157=_0x21776c['indexOf'](_0x369157);}for(let _0x3c8e6f=0x0,_0x4d93f2=_0x5665bb['length'];_0x3c8e6f<_0x4d93f2;_0x3c8e6f++){_0x543b30+='%'+('00'+_0x5665bb['charCodeAt'](_0x3c8e6f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x543b30);};const _0x2df2ef=function(_0x25481f,_0x26403e){let _0xe2a1fb=[],_0x447bb4=0x0,_0x5cbc1f,_0x5ebda1='';_0x25481f=_0x2ce54a(_0x25481f);let _0x57d0da;for(_0x57d0da=0x0;_0x57d0da<0x100;_0x57d0da++){_0xe2a1fb[_0x57d0da]=_0x57d0da;}for(_0x57d0da=0x0;_0x57d0da<0x100;_0x57d0da++){_0x447bb4=(_0x447bb4+_0xe2a1fb[_0x57d0da]+_0x26403e['charCodeAt'](_0x57d0da%_0x26403e['length']))%0x100,_0x5cbc1f=_0xe2a1fb[_0x57d0da],_0xe2a1fb[_0x57d0da]=_0xe2a1fb[_0x447bb4],_0xe2a1fb[_0x447bb4]=_0x5cbc1f;}_0x57d0da=0x0,_0x447bb4=0x0;for(let _0x588fa3=0x0;_0x588fa3<_0x25481f['length'];_0x588fa3++){_0x57d0da=(_0x57d0da+0x1)%0x100,_0x447bb4=(_0x447bb4+_0xe2a1fb[_0x57d0da])%0x100,_0x5cbc1f=_0xe2a1fb[_0x57d0da],_0xe2a1fb[_0x57d0da]=_0xe2a1fb[_0x447bb4],_0xe2a1fb[_0x447bb4]=_0x5cbc1f,_0x5ebda1+=String['fromCharCode'](_0x25481f['charCodeAt'](_0x588fa3)^_0xe2a1fb[(_0xe2a1fb[_0x57d0da]+_0xe2a1fb[_0x447bb4])%0x100]);}return _0x5ebda1;};_0x25e0['vSFZpK']=_0x2df2ef,_0x48d499=arguments,_0x25e0['KzfvcL']=!![];}const _0x1baef0=_0x253562[0x0],_0x2f8c6b=_0x25e07d+_0x1baef0,_0x235f1a=_0x48d499[_0x2f8c6b];return!_0x235f1a?(_0x25e0['UFYwib']===undefined&&(_0x25e0['UFYwib']=!![]),_0x45f0c1=_0x25e0['vSFZpK'](_0x45f0c1,_0x2d91bf),_0x48d499[_0x2f8c6b]=_0x45f0c1):_0x45f0c1=_0x235f1a,_0x45f0c1;},_0x25e0(_0x48d499,_0x312510);}const jdCookie=require(_0x3ae4ab(0x238,'g4P&')),common=require(_0x3ae4ab(0x23b,'$lOH')),notify=require(_0x3ae4ab(0x2bf,'g4P&')),getToken=require(_0x3ae4ab(0x459,'#fMB')),{wuxianDefense}=require(_0x3ae4ab(0x36f,'vz0Q')),{wuxian_savePrize}=require(_0x3ae4ab(0x2fc,'iN3z')),lzkj_signInterval=process[_0x3ae4ab(0x21a,'iN3z')]['jd_wxSign_lzkjInterval']||_0x3ae4ab(0x2de,'[8j#'),cjhy_signInterval=process[_0x3ae4ab(0x2a7,'g4P&')]['jd_wxSign_cjhyInterval']||_0x3ae4ab(0x32f,'d75)'),isNotify=(process[_0x3ae4ab(0x475,'mYy5')][_0x3ae4ab(0x3b9,'XB4B')]||process[_0x3ae4ab(0x3f6,'^)l@')][_0x3ae4ab(0x264,'u35&')])===_0x3ae4ab(0x276,'W9RT');let activityIdList1=(process[_0x3ae4ab(0x3e2,'PRLB')][_0x3ae4ab(0x2c0,'!TgT')]||process[_0x3ae4ab(0x39d,'S(Pk')][_0x3ae4ab(0x421,'XB4B')]||'')[_0x3ae4ab(0x304,'Ob1r')](','),activityIdList2=(process['env'][_0x3ae4ab(0x2c4,'81db')]||process[_0x3ae4ab(0x450,'^gXJ')][_0x3ae4ab(0x37e,'bTil')]||'')[_0x3ae4ab(0x3a2,'81db')](','),activityIdList3=(process[_0x3ae4ab(0x21a,'iN3z')][_0x3ae4ab(0x3a5,'FUDh')]||process[_0x3ae4ab(0x293,')6Nr')][_0x3ae4ab(0x247,'iN3z')]||'')[_0x3ae4ab(0x23a,'Xy6n')](','),activityIdList4=(process['env']['jd_wxSign_sign_cjhy_Ids']||process[_0x3ae4ab(0x3f5,'#]Z(')][_0x3ae4ab(0x2df,'q6q4')]||'')[_0x3ae4
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"])