faker3/jd_wxSignPoint.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_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默认停止运行
不同环境变量对应不同链接类型注意区分官方接口垃圾中奖一切随缘打印仅供参考
2024-06-30 22:17:24 +08:00
脚本无法跳过黑号响应擦肩请主动设置过滤账号以免造成堵塞
此脚本是 jd_wxSign.js 脚本的复制两者功能完全一致仅变量不同推出此本的目的是为了满足需要将积分签到活动分开运行的需求
2024-06-28 15:38:28 +08:00
2024-07-02 23:09:05 +08:00
cron: 1 1 1 1 * jd_wxSignPoint.js
2024-06-28 15:38:28 +08:00
*/
const $ = new Env('批量店铺积分签到(超级无线/超级会员)')
2024-07-02 23:09:05 +08:00
const _0x153f99=_0x536b;(function(_0x3fcf33,_0x1c0e19){const _0x5040ba=_0x536b,_0x47d1f3=_0x3fcf33();while(!![]){try{const _0x5134d6=-parseInt(_0x5040ba(0x1b0,'8u$P'))/0x1+-parseInt(_0x5040ba(0x1a5,'62yt'))/0x2*(parseInt(_0x5040ba(0x335,']s(#'))/0x3)+-parseInt(_0x5040ba(0x27a,'Zlpu'))/0x4+parseInt(_0x5040ba(0x100,'@zpT'))/0x5*(parseInt(_0x5040ba(0x28a,'22[4'))/0x6)+-parseInt(_0x5040ba(0x1c8,'P1T1'))/0x7+parseInt(_0x5040ba(0x2a7,'22[4'))/0x8+parseInt(_0x5040ba(0x149,'7C7t'))/0x9*(parseInt(_0x5040ba(0x16f,'UZ$C'))/0xa);if(_0x5134d6===_0x1c0e19)break;else _0x47d1f3['push'](_0x47d1f3['shift']());}catch(_0x4f7b7a){_0x47d1f3['push'](_0x47d1f3['shift']());}}}(_0x4ad1,0x6b767));function _0x536b(_0x911c9b,_0x22781b){const _0x4ad1e7=_0x4ad1();return _0x536b=function(_0x536b21,_0x358207){_0x536b21=_0x536b21-0xd8;let _0x45dc31=_0x4ad1e7[_0x536b21];if(_0x536b['cvgtdz']===undefined){var _0x1a9c46=function(_0x32e4e0){const _0x49c7ad='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x25eee='',_0x40ebfb='';for(let _0x58c594=0x0,_0x685483,_0x3a2fc3,_0xdacd41=0x0;_0x3a2fc3=_0x32e4e0['charAt'](_0xdacd41++);~_0x3a2fc3&&(_0x685483=_0x58c594%0x4?_0x685483*0x40+_0x3a2fc3:_0x3a2fc3,_0x58c594++%0x4)?_0x25eee+=String['fromCharCode'](0xff&_0x685483>>(-0x2*_0x58c594&0x6)):0x0){_0x3a2fc3=_0x49c7ad['indexOf'](_0x3a2fc3);}for(let _0x2ac2a0=0x0,_0x170437=_0x25eee['length'];_0x2ac2a0<_0x170437;_0x2ac2a0++){_0x40ebfb+='%'+('00'+_0x25eee['charCodeAt'](_0x2ac2a0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x40ebfb);};const _0x15bb7f=function(_0x27acc8,_0x4a931a){let _0x870640=[],_0x370a44=0x0,_0x251e88,_0x628879='';_0x27acc8=_0x1a9c46(_0x27acc8);let _0x50051c;for(_0x50051c=0x0;_0x50051c<0x100;_0x50051c++){_0x870640[_0x50051c]=_0x50051c;}for(_0x50051c=0x0;_0x50051c<0x100;_0x50051c++){_0x370a44=(_0x370a44+_0x870640[_0x50051c]+_0x4a931a['charCodeAt'](_0x50051c%_0x4a931a['length']))%0x100,_0x251e88=_0x870640[_0x50051c],_0x870640[_0x50051c]=_0x870640[_0x370a44],_0x870640[_0x370a44]=_0x251e88;}_0x50051c=0x0,_0x370a44=0x0;for(let _0xeafaa6=0x0;_0xeafaa6<_0x27acc8['length'];_0xeafaa6++){_0x50051c=(_0x50051c+0x1)%0x100,_0x370a44=(_0x370a44+_0x870640[_0x50051c])%0x100,_0x251e88=_0x870640[_0x50051c],_0x870640[_0x50051c]=_0x870640[_0x370a44],_0x870640[_0x370a44]=_0x251e88,_0x628879+=String['fromCharCode'](_0x27acc8['charCodeAt'](_0xeafaa6)^_0x870640[(_0x870640[_0x50051c]+_0x870640[_0x370a44])%0x100]);}return _0x628879;};_0x536b['VOkGLO']=_0x15bb7f,_0x911c9b=arguments,_0x536b['cvgtdz']=!![];}const _0x46ce4c=_0x4ad1e7[0x0],_0x1e8b6b=_0x536b21+_0x46ce4c,_0x4562ea=_0x911c9b[_0x1e8b6b];return!_0x4562ea?(_0x536b['LOXAzd']===undefined&&(_0x536b['LOXAzd']=!![]),_0x45dc31=_0x536b['VOkGLO'](_0x45dc31,_0x358207),_0x911c9b[_0x1e8b6b]=_0x45dc31):_0x45dc31=_0x4562ea,_0x45dc31;},_0x536b(_0x911c9b,_0x22781b);}const jdCookie=require(_0x153f99(0xd8,'m&I]')),common=require(_0x153f99(0x1ec,'sSK]')),notify=require(_0x153f99(0x222,'cJYv')),getToken=require('./utils/Rebels_Token'),{wuxianDefense}=require(_0x153f99(0x253,'6Mh0')),{wuxian_savePrize}=require(_0x153f99(0xf2,'AJ*v')),lzkj_signInterval=process['env'][_0x153f99(0x311,'!)w3')]||_0x153f99(0x15f,'62yt'),cjhy_signInterval=process['env'][_0x153f99(0x241,'zvQX')]||_0x153f99(0x321,'FN&O'),isNotify=(process[_0x153f99(0x296,'UZ$C')][_0x153f99(0x239,'8u$P')]||process[_0x153f99(0x26d,'62yt')][_0x153f99(0xf8,'8i@1')])===_0x153f99(0x2ef,'Zlpu');let activityIdList1=(process[_0x153f99(0x243,'xuuY')]['jd_wxSignPoint_sevenDay_lzkj_Ids']||process['env']['LZKJ_SEVENDAY_POINT']||'')[_0x153f99(0x17f,']s(#')](','),activityIdList2=(process['env'][_0x153f99(0x343,'Zlpu')]||process['env']['LZKJ_SIGN_POINT']||'')[_0x153f99(0x207,'v5*I')](','),activityIdList3=(process['env'][_0x153f99(0x2dd,'fIt!')]||process[_0x153f99(0x133,'VGyk')][_0x153f99(0x1b1,'kF]W')]||'')[_0x153f99(0x207,'v5*I')](','),activityIdList4=(process[_0x153f99(0x22f,'c(A6')][_0x153f99(0x156,'kF]W')]||process[_0x153f99(0x1e3,'7uYz')][_0x153f99(0x2eb,'Zlpu')]||'')[_0x153f99(0x293,'62yt')](','),lzkjFilter=(process[_0x153f99(0x2ad,'RcXW')][_0x153f99(0x3
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"])