mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-13 02:59:15 +08:00
33 lines
100 KiB
JavaScript
33 lines
100 KiB
JavaScript
|
/*
|
|||
|
活动名称:批量店铺签到 · 超级无线/超级会员
|
|||
|
活动链接: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),默认停止运行
|
|||
|
|
|||
|
不同环境变量对应不同链接类型注意区分,官方接口垃圾,中奖一切随缘,打印仅供参考
|
|||
|
脚本不判断黑号(响应擦肩),请主动设置过滤
|
|||
|
此脚本为批量签到工具本,与 jd_shopSign.js 功能一致
|
|||
|
|
|||
|
cron: 7 7 7 7 * jd_wxSign.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('批量店铺签到(超级无线/超级会员)')
|
|||
|
|
|||
|
var iil='jsjiami.com.v7';const Iiii1i11=lI1iI1i1;(function(liI1lil,i1lIil1l,iIIIiII1,iIi1l11i,IlllIli,iillllI1,lillIIi){return liI1lil=liI1lil>>0x9,iillllI1='hs',lillIIi='hs',function(illIllII,II1l11li,IilliiIl,i1iI1li1,iIii1iii){const IiIilIl=lI1iI1i1;i1iI1li1='tfi',iillllI1=i1iI1li1+iillllI1,iIii1iii='up',lillIIi+=iIii1iii,iillllI1=IilliiIl(iillllI1),lillIIi=IilliiIl(lillIIi),IilliiIl=0x0;const i1Illill=illIllII();while(!![]&&--iIi1l11i+II1l11li){try{i1iI1li1=-parseInt(IiIilIl(0x5ee,'8QZC'))/0x1*(parseInt(IiIilIl(0x21c,'iS11'))/0x2)+-parseInt(IiIilIl(0x3de,'Nnfc'))/0x3+parseInt(IiIilIl(0x234,'Kcbe'))/0x4*(parseInt(IiIilIl(0x632,'iS11'))/0x5)+parseInt(IiIilIl(0x3d0,'y(Bn'))/0x6+parseInt(IiIilIl(0x423,'^8aq'))/0x7+parseInt(IiIilIl(0x3af,'Siyo'))/0x8+-parseInt(IiIilIl(0x23c,'i8Nd'))/0x9;}catch(i111ll1I){i1iI1li1=IilliiIl;}finally{iIii1iii=i1Illill[iillllI1]();if(liI1lil<=iIi1l11i)IilliiIl?IlllIli?i1iI1li1=iIii1iii:IlllIli=iIii1iii:IilliiIl=iIii1iii;else{if(IilliiIl==IlllIli['replace'](/[VptMhbKxGYdWOIQeREw=]/g,'')){if(i1iI1li1===II1l11li){i1Illill['un'+iillllI1](iIii1iii);break;}i1Illill[lillIIi](iIii1iii);}}}}}(iIIIiII1,i1lIil1l,function(li1ilil,l1iill11,lIll11l1,IIIII11,iI1illl,l1ii1l1,Ill11I11){return l1iill11='\x73\x70\x6c\x69\x74',li1ilil=arguments[0x0],li1ilil=li1ilil[l1iill11](''),lIll11l1=`\x72\x65\x76\x65\x72\x73\x65`,li1ilil=li1ilil[lIll11l1]('\x76'),IIIII11=`\x6a\x6f\x69\x6e`,(0x172029,li1ilil[IIIII11](''));});}(0x18e00,0x4930c,I1IiIlI,0xc9),I1IiIlI)&&(iil=I1IiIlI);const jdCookie=require(Iiii1i11(0x23d,'Nnfc')),common=require(Iiii1i11(0x502,'fRRE')),notify=require(Iiii1i11(0x58a,'Jm5H')),getToken=require(Iiii1i11(0x50b,'0gZB')),{wuxianDefense}=require(Iiii1i11(0x209,'^8aq')),{wuxian_savePrize}=require(Iiii1i11(0x27f,'iS11')),lzkj_signInterval=process[Iiii1i11(0x2cb,'jbNv')][Iiii1i11(0x6e2,'J]Am')]||Iiii1i11(0x3c4,'Rlb@'),cjhy_signInterval=process[Iiii1i11(0x616,'y(Bn')][Iiii1i11(0x35c,'8QZC')]||Iiii1i11(0x5ae,'cWDb'),isNotify=(process[Iiii1i11(0x2fa,'C[Id')][Iiii1i11(0x6d5,'J]Am')]||process[Iiii1i11(0x3e5,'g1%&')][Iiii1i11(0x1b5,'jdsB')])===Iiii1i11(0x559,'DLmO');let activityIdList1=(process[Iiii1i11(0x38e,'DLmO')][Iiii1i11(0x2a0,'jbNv')]||'')[Iiii1i11(0x38a,'jdsB')](','),activityIdList2=(process[Iiii1i11(0x49f,'X$BI')][Iiii1i11(0x6a8,'X$BI')]||'')[Iiii1i11(0x3d6,'^8aq')](','),activityIdList3=(process[Iiii1i11(0x20f,'NW%V')][Iiii1i11(0x5de,'J]Am')]||'')[Iiii1i11(0x3a3,'Siyo')](','),activityIdList4=(process[Iiii1i11(0x21b,'0yGO')][Iiii1i11(0x3cb,'5Zo2')]||'')[Iiii1i11(0x2fc,'Um4#')](','),lzkjFilter=(process[Iiii1i11(0x5c0,'YA8M')][Iiii1i11(0x281,'NW%V')]||'')[Iiii1i11(0x680,'o4Jc')]('@'),cjhyFilter=(process[Iiii1i11(0x35d,'c[^n')][Iiii1i11(0x4bb,'l^0j')]||'')[Iiii1i11(0x2de,'y(Bn')]('@');const forbiddenQuit=!(process[Iiii1i11(0x362,'l46S')][Iiii1i11(0x211,'0gZB')]===Iiii1i11(0x4a8,'^)gJ'));let signFailMaxRetryTimes=process[Iiii1i11(0x616,'y(Bn')][Iiii1i11(0x45a,'o4Jc')]||'0';const maxForbiddenRetryTimes=0x5;let cookie='',originCookie='',activityCookie='';const cookiesArr=Object[Iiii1i11(0x35a,'jDKE')](jdCookie)[Iiii1i11(0x24b,'cWDb')](IIlllIII=>jdCookie[IIlllIII])[Iiii1i11(0x63e,'g1%&')](iIIli1li=>iIIli1li);!cookiesArr[0x0]&&($[Iiii1i11(0x355,'^)gJ')]($[Iiii1i11(0x556,'Dw]5')],Iiii1i11(0x46f,'X$BI')),process[Iiii1i11(0x693,'Dw]5')](0x1));!(async()=>{const II1iI1Ii=Iiii1i11,l1iIIlIi={'bbwsG':II1iI1Ii(0x671,'C[Id'),'jxEgt':function(iii1IiIl,llIIl1){return iii1IiIl>llIIl1;},'LFXXa':function(iIliIlIl,iil1Ii1i){return iIliIlIl>iil1Ii1i;},'bkmCu':function(lII111I1,IIIIl1I1){return lII111I1>IIIIl1I1;},'OgHRD':function(i1lll111,ilii1I1l){return i1lll111(ilii1I1l);},'WidJL':function(l1liiiI1,I1I1iliI){return l1liiiI1>I1I1iliI;},'sDGtn':function(l1I1I1Il,lIIiii1I){return l1I1I1Il===lIIiii1I;},'rQQXG':II1iI1Ii(0x32a,'fL^A'),'pindF':II1iI1Ii(0x305,'jdsB'),'ztqrd':function(iiiI1iI1,ii1I1l1){return iiiI1iI1<=ii1I1l1;},'cZDVM':function(iilIii1l,II1il1II){return iilIii1l<=II1il1II;},'SXzlP':II1iI1Ii(0x345,'Lsgw'),'nmPNj':II1iI1Ii(0x36e,'!xI9'),'SLlnH':II1iI1Ii(0x683,'P)jg'),'rMcOw':function(iiiIIiI,iilIIi11){return iiiIIiI
|
|||
|
|
|||
|
// 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"])
|