mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
33 lines
96 KiB
JavaScript
33 lines
96 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_wxSignPoint_sign_lzkj_Ids // 超级无线签到有礼活动id,多个用英文逗号分割
|
|||
|
jd_wxSignPoint_sevenDay_lzkj_Ids // 超级无线7日签到活动id,多个用英文逗号分割
|
|||
|
jd_wxSignPoint_sign_cjhy_Ids // 超级会员签到有礼活动id,多个用英文逗号分割
|
|||
|
jd_wxSignPoint_sevenDay_cjhy_Ids // 超级会员7日签到活动id,多个用英文逗号分割
|
|||
|
jd_wxSignPoint_lzkjInterval // 自定义超级无线活动签到间隔时长(整数,单位毫秒),默认500ms
|
|||
|
jd_wxSignPoint_cjhyInterval // 自定义超级会员活动签到间隔时长(整数,单位毫秒),默认1000ms
|
|||
|
jd_wxSignPoint_lzkjFilter // 账号pin过滤(跳过不跑),多个用户名用@分割
|
|||
|
jd_wxSignPoint_cjhyFilter // 账号pin过滤(跳过不跑),多个用户名用@分割
|
|||
|
jd_wxSignPoint_notify // 是否推送通知(true/false),默认不推送
|
|||
|
jd_wxSignPoint_maxRetry // 签到失败时的最大重试次数(整数),默认0
|
|||
|
jd_wxSignPoint_forbiddenQuit // 当连续请求IP被限制时是否跳出即停止运行脚本(true/false),默认停止运行
|
|||
|
|
|||
|
不同环境变量对应不同链接类型注意区分,官方接口垃圾,中奖一切随缘,打印仅供参考
|
|||
|
脚本不判断黑号(响应擦肩),请主动设置过滤
|
|||
|
此脚本与 jd_wxSign.js 功能完全一致只是变量不同,推出此本的目的是为了满足需要将积分签到活动分开跑的需求
|
|||
|
|
|||
|
cron: 7 7 7 7 * jd_wxSignPoint.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('批量店铺积分签到(超级无线/超级会员)')
|
|||
|
|
|||
|
var iil='jsjiami.com.v7';const llIIlIII=iiII1ii;if(function(li1lIilI,i1Ii1i11,l1llIlil,lIIllii1,IIli1liI,l1lllIii,llI11lii){return li1lIilI=li1lIilI>>0x2,l1lllIii='hs',llI11lii='hs',function(l11i1Il1,Iii1lii,ii1ii1Il,iI1lil1,i11llIII){const iI11iIi=iiII1ii;iI1lil1='tfi',l1lllIii=iI1lil1+l1lllIii,i11llIII='up',llI11lii+=i11llIII,l1lllIii=ii1ii1Il(l1lllIii),llI11lii=ii1ii1Il(llI11lii),ii1ii1Il=0x0;const ilI1Ii11=l11i1Il1();while(!![]&&--lIIllii1+Iii1lii){try{iI1lil1=-parseInt(iI11iIi(0x405,'uF]X'))/0x1+parseInt(iI11iIi(0x42c,'Axwg'))/0x2+-parseInt(iI11iIi(0x165,'vd26'))/0x3+-parseInt(iI11iIi(0x1b3,'9mvJ'))/0x4+parseInt(iI11iIi(0x3f3,'0AYY'))/0x5*(parseInt(iI11iIi(0x2e8,'a)NM'))/0x6)+-parseInt(iI11iIi(0x4b2,'Kz4X'))/0x7*(parseInt(iI11iIi(0x298,'aA7Q'))/0x8)+-parseInt(iI11iIi(0x275,'ml#D'))/0x9*(-parseInt(iI11iIi(0x58c,'p4c&'))/0xa);}catch(iIlI1iIl){iI1lil1=ii1ii1Il;}finally{i11llIII=ilI1Ii11[l1lllIii]();if(li1lIilI<=lIIllii1)ii1ii1Il?IIli1liI?iI1lil1=i11llIII:IIli1liI=i11llIII:ii1ii1Il=i11llIII;else{if(ii1ii1Il==IIli1liI['replace'](/[peMKnPWxqtXdIyYOu=]/g,'')){if(iI1lil1===Iii1lii){ilI1Ii11['un'+l1lllIii](i11llIII);break;}ilI1Ii11[llI11lii](i11llIII);}}}}}(l1llIlil,i1Ii1i11,function(i1IiI11l,illli11,ll1lIlli,IiliilI1,liiii1il,i1ili1ll,iillIliI){return illli11='\x73\x70\x6c\x69\x74',i1IiI11l=arguments[0x0],i1IiI11l=i1IiI11l[illli11](''),ll1lIlli=`\x72\x65\x76\x65\x72\x73\x65`,i1IiI11l=i1IiI11l[ll1lIlli]('\x76'),IiliilI1=`\x6a\x6f\x69\x6e`,(0x17202a,i1IiI11l[IiliilI1](''));});}(0x2f0,0x61952,i1Ili11i,0xbe),i1Ili11i){}const jdCookie=require(llIIlIII(0x46d,'v!0P')),common=require(llIIlIII(0x63e,'F)2@')),notify=require(llIIlIII(0x594,'FZPA')),getToken=require(llIIlIII(0x300,'57F4')),{wuxianDefense}=require(llIIlIII(0x339,'p4c&')),{wuxian_savePrize}=require(llIIlIII(0x1fa,'n7QE')),lzkj_signInterval=process[llIIlIII(0x1e6,'id8@')][llIIlIII(0x561,'a)NM')]||llIIlIII(0x2fd,'pS7j'),cjhy_signInterval=process[llIIlIII(0x4bb,'57F4')][llIIlIII(0x1b2,'^o)6')]||llIIlIII(0x228,'kgfV'),isNotify=(process[llIIlIII(0x4f6,'w6Mj')][llIIlIII(0x499,'eGes')]||process[llIIlIII(0x4f6,'w6Mj')][llIIlIII(0x40b,'4g15')])===llIIlIII(0x2d8,'^o)6');let activityIdList1=(process[llIIlIII(0x198,'eGes')][llIIlIII(0x18c,'Z3En')]||'')[llIIlIII(0x5f1,'U)*9')](','),activityIdList2=(process[llIIlIII(0x21b,'kgfV')][llIIlIII(0x387,'U)*9')]||'')[llIIlIII(0x23c,'GM2R')](','),activityIdList3=(process[llIIlIII(0x196,'vd26')][llIIlIII(0x4ed,'eX$A')]||'')[llIIlIII(0x260,'eX$A')](','),activityIdList4=(process[llIIlIII(0x22a,'w^@9')][llIIlIII(0x411,'GmxC')]||'')[llIIlIII(0x23c,'GM2R')](','),lzkjFilter=(process[llIIlIII(0x3b2,'(fwL')][llIIlIII(0x447,'1x@u')]||'')[llIIlIII(0x2fb,'q(W1')]('@'),cjhyFilter=(process[llIIlIII(0x61d,'GM2R')][llIIlIII(0x1f9,'l!A%')]||'')[llIIlIII(0x504,'Z3En')]('@');const forbiddenQuit=!(process[llIIlIII(0x4f6,'w6Mj')][llIIlIII(0x440,'a)NM')]===llIIlIII(0x290,'^mpw'));let signFailMaxRetryTimes=process[llIIlIII(0x1e6,'id8@')][llIIlIII(0x602,'57F4')]||'0';function iiII1ii(_0x48ca5c,_0x4f8134){const _0x2fecc1=i1Ili11i();return iiII1ii=function(_0x4a42f7,_0x455d6a){_0x4a42f7=_0x4a42f7-0x12e;let _0x486573=_0x2fecc1[_0x4a42f7];if(iiII1ii['ZRGJDh']===undefined){var _0x5e2508=function(_0x474510){const _0x3ab682='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x336f43='',_0x518a88='';for(let _0x52c515=0x0,_0x4e4e60,_0x21f96c,_0x503a1a=0x0;_0x21f96c=_0x474510['charAt'](_0x503a1a++);~_0x21f96c&&(_0x4e4e60=_0x52c515%0x4?_0x4e4e60*0x40+_0x21f96c:_0x21f96c,_0x52c515++%0x4)?_0x336f43+=String['fromCharCode'](0xff&_0x4e4e60>>(-0x2*_0x52c515&0x6)):0x0){_0x21f96c=_0x3ab682['indexOf'](_0x21f96c);}for(let _0x2515a2=0x0,_0x30f720=_0x336f43['length'];_0x2515a2<_0x30f720;_0x2515a2++){_0x518a88+='%'+('00'+_0x336f43['charCodeAt'](_0x2515a2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x518a88);};const _0x452b63=function(_0x199f03,_0x3196cd){let _0x3b29dc=[],_0x552821=0x0,_0x3f561f,_0x4baa86='';_0x199f03=_0x5e2508(_0x199f03);let _0x1d97b5;for(_0x1d97b5=0x0;_0x1d97b5<0x100;_0x1d97b5++){_0x3b29dc[_0x1d97b5]=_0x1d97b5;}for(_0x1d97b5=0x0;
|
|||
|
|
|||
|
// 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"])
|