faker3/jd_wxSign.js

39 lines
130 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>
2024-08-15 13:13:18 +08:00
https://cjhy-isv.isvjcloud.com/signNew/signActivity?activityId=<活动id>&venderId=<商家id>
2024-06-28 15:38:28 +08:00
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多个用英文逗号分割
2024-08-15 13:13:18 +08:00
jd_wxSign_signNew_cjhy_Ids // 超级会员新签到有礼活动id多个用英文逗号分割必须同时配置商家id格式为 "<活动id>:<商家id>"
2024-06-28 15:38:28 +08:00
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默认不推送
2024-08-15 13:13:18 +08:00
jd_wxSign_maxRetry // 签到失败时的最大重试次数整数默认0最大10
2024-06-28 15:38:28 +08:00
jd_wxSign_forbiddenQuit // 当连续请求IP被限制时是否跳出即停止运行脚本true/false默认停止运行
2024-08-15 13:13:18 +08:00
活动玩法快要被干废请适度参与不要分享
没水的非自营店铺活动就别签了官方接口压力太大
同时配置商家id可以加快签到速度但不全是必须的仅适用于 cjhy 类型的活动格式为 "<活动id>:<商家id>"用冒号分割
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-08-15 13:13:18 +08:00
function dspoGQ(){}var GcGwxg=Object['defineProperty'],eJWEvyg,WmXO3C,MiLVfy,zHgXf8,WYqAngV,LyrvGUa,up_LbM,pWrFX1o,T3fuNpH,kPcRUy,wl19cN,u4vwpM,ybcqBBM,qu3YMI,ILRxPJ,gFtWxli,Pf2IZz;function RQTvCjH(dspoGQ){return eJWEvyg[dspoGQ>0x120?dspoGQ+0x45:dspoGQ<-0x1b?dspoGQ+0x2e:dspoGQ+0x1a]}eJWEvyg=j4ZTrRG.call(this);function wMZBWUi(dspoGQ,GcGwxg){var MiLVfy=K1YmLas(dspoGQ=>{return eJWEvyg[dspoGQ>0x12e?dspoGQ-0x40:dspoGQ>0x12e?dspoGQ+0x27:dspoGQ>0x12e?dspoGQ-0x24:dspoGQ>-0xd?dspoGQ+0xc:dspoGQ+0x4f]},0x1);return WmXO3C.call(null,dspoGQ,MiLVfy(0x26),{value:GcGwxg,configurable:!0x0})}WmXO3C=Object.defineProperty;var id2PaVm=[],H0mjva=['7tgP0I`Ml','40^bN]exm','|H5nl.;+t','C/}jAQ%p','mCj5cWb8b^p7(x','ZaT%;','5^k2P61/',',^PF',';bDE}}n{du)p/`','/[i(C','98,~>ugR','{TClkVDu3]&','[K$@h','yVfJO',RQTvCjH(-0x1a),'c0e8i%_T@P5M5z&c','c0e8i%12a6RvplGWO1;e','kWdr','zKy|6_mMUGYRTO{dRa<JQ+T[KP*','*kol','zKy|6_mMUGYR(a6[)a<JQ+T[KP*','qkolK','zKy|6_|B','}LL}"}WN','*aiZb','}LL}r5WN',';$|QA','}LL}K?LN','8S=Jd%0N','@HAwv1eN','jKEr','9@!$B/4gU0CLsncZ','AiVQ(?F','zKy|6_mMUGYRgU8[zDf*]|u2?Ka{B','9@!$B/mMfK.','zKy|6_mMUG5','k*_]Q+_Tr^0','RJQJc7uM>^!','(hwhj/4gU0CLsncZ','zKy|6_mMUGYRgU8[zD/].@j4?Ka{B','(hwhj/mMfK.','zKy|6_mMUGYRgU8[*WzvK/W>8<TRofMW','(hwhj/mMfKIL1?r','zKy|6_mMUGYRTO{dlGsJ~?xEX','}LL}~#bN','x+<htvqN','}LL}:+WN','~CTJ5`LN','V,1Q(?F','7Vl}Z+F','zKy|6_mMUGYRjUbmDnt5d7F','tSPwh','Bl~J','WafJQ+iN',')*eJ','2ETHf','kN6!UI$m:hsq;U+?!u<m:j~;A}QtHWI.SQ`ZA','!%TJg',RQTvCjH(-0x19),'NlIQA','GSor[~p38u*@a,OpTB','8xA*O',',W/e]yGN','bSor',RQTvCjH(-0xb),RQTvCjH(-0xe),RQTvCjH(0x8),'mxIQA',RQTvCjH(-0x1a),'!|rno@tx[79I5}c*v{5H7R23Q1$51$d?#xG6qNW9|+IIM^2q!S8Hf@Yly7#Po5b*O?^y}m}N','3a=J','!|I)yG+noO?kI5Fu)b1n','_p;)k[zZ%wG!]G#?uQ<m&cB','0|q?}mJf7|&>Sh=~_G=4{BB','N`,KBWIfQ1%Mf@Q~:Q(N','!|I)yG+noO~','ax6*I1TN','*aorb+F','sSL}w?aN',',WbZ&_F','c*_]S5A||P','GS%}twWN',RQTvCjH(0x10),'k!cen1zN','GSYQ2kF','3bBRq','GSYQ3y1TC','&M|fi"L(W','&M|fi"G','~Hh}x~F','Cl=JZw[N','vgb=:MIlR','i;J6=KVP',':/Y&$,@P',':/Y&$,a^^q','lhUp=,Wac@3(XZ','Vj56K,Wac@3(XZ','GS/Qt+dYE^5MB','h0Era','yV%}d@F','cx*Z8~iN','WaYQLvB]X','OxYQA',RQTvCjH(-0x5),'d!orP?&7aeUyLODS5*z5D@a[6Gs6I;xz',RQTvCjH(-0x19),RQTvCjH(-0x4),'TS0}f%[bC',RQTvCjH(0x5),'7p>zUIG6v)e&D+}Q`E"SYd>V','sSL}w?aN',RQTvCjH(-0xf),RQTvCjH(0xc),'c*_]S5A||P',',W/e]yGN','cxeJ','L/=S:QMxc8L!vp|?{o44`I/r/#j4%^RfjT;0R+,m#qsk6}B3^|%)@U;m(}lB',RQTvCjH(0x6),RQTvCjH(-0x16),'?V)Qj0N`C','ZxEr^}A||P','b1p*7ZPY|L_!]{.dRWov4vF','iJ/QA;1T8ufu&0K','b1p*a',RQTvCjH(-0x15),RQTvCjH(-0xc),'"#BT23eY[5"[#FM87;`[H','b1p*}5XAcKB3,l','AS;e2!LN','Vm;wf.7j',RQTvCjH(-0x14),'uT;9*U%~`NHDUV|:AHqJb)"q=Iu',RQTvCjH(-0x18),'Q|>Ro0`6]:qzh>WP;*!<rnC[oPEY7]BtC:q^r(QVG,p2+2hPglW','"#BT?',':lRvCQpo>so<4IV%M9&|.;)OjYt>Q]E','$@<m(%19"Ea}%,ezPaYBjsbY#r','gx$Qd%P3C','wtZb','4VEr','O0t5Ev3pC',']{^TWp}g',RQTvCjH(-0x17),'$@<m(%rg','/2<g8kCi','p|<gjWMi','$@<m(%19X','SU6}&LDRO','|#>Ov3kEk',RQTvCjH(-0x18),'C_oEf{]ycWT%.oFu;2+(}m3`fu0)Uc&c8S=Jd%j4Lw1nF','{G<gr*ct}+','KG<d)ls]RnUPl/"BfU[Z6IS[|w','Ch^`Y&9yvIy<~+El5]Mqb_!g6[mv&{n',';27g_=D~O','4VEr','$@<m(%19"Ea}%,ezPaYBjsbY#r$','#mQS','b1p*}5MN',RQTvCjH(-0x17),',W/e]ybbaL','c*_]S5A||P','cxeJ','L/=S:QMxc8L!vp|?{o44`I/r/#j4%^RfjT;0R+,m#qsk6}B3^|/n|mfZ)Av','bS%]Z+qN3G5',RQTvCjH(-0x16),'?V)Qj0N`C','d!orP?AB','6mu].@0N','1An5&QhN','n<(vLvWN',',K*+bw[N','ZxEr^}KN','Lg^Z9ZPY|L_!]{.d}HOQ)`?P*=*','iJ/QA;hN','5+g1!`LN','Lg^Zb',RQTvCjH(-0x15),']aJ*>$_TvP]va,^gud.vh',']aJ*>$_TvP]va,^gud.vh','Lg^Z?5XAcKB3,l','AS;e2!8|C','r<zZ@#P]C','"a/Q&$XYX','AS;e2!8|]Y<M![_Wl<TJz7rTaLA','cxeJ','C_oEf{]ycWT%.oFu;2+(}m~Y=G%~7%0chB!Qu{lepPh>pU7Wfxr.dXF',']aJ*n55pX','AS;e2!8|]Y<M![_Wl<TJz7rTaL','Unf&)@5y/7y;3o~!^|)I','{>F.0XJDY8}','AS;e2!LN',RQTvCjH(-0x11),'*a;Q(?0N','gx$Qd%P3C',RQTvCjH(-0x13),'4VEr','O0t5Ev3pC','AS;e2!LN','[x;Q:kUN',RQTvCjH(-0x14),'AS;e2!8|]Y<M![_Wl<TJz7rTaLA',RQTvCjH(-0x19),'C_oEf{]ycWT%.oFu;2+(}m~Y=G%~UcXd3WT@}?C[,G1~f5.frF',RQTvCjH(-0x10),RQTvCjH(-0x12),'Unf&)@5y/7y;3o~!^|0"GdsQzTV/@bY','gx$Qd%P3C',RQTvCjH(-0x13),'4VEr',RQTvCjH(-0x12),'AS;e2!8|]Y<M![_Wl<TJz7rTaLA','cxeJ','C_oEf{]ycWT%.oFu;2+(}m~Y=G%~Uc&c8S=Jd%j4Lw1nF',RQTvCjH(-0x8),'Unf&)@5y/7y;3o~!^|
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"])