2024-06-28 15:38:28 +08:00
|
|
|
|
/*
|
|
|
|
|
活动名称:店铺礼包(超级无线)
|
2024-08-26 15:45:34 +08:00
|
|
|
|
活动链接:https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=<类型id>&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|
|
|
|
https://lzkj-isv.isvjcloud.com/prod/cc/interaction/v1/index?activityType=<类型id>&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|
|
|
|
https://lorealjdcampaign-rc.isvjcloud.com/interact/index?activityType=<类型id>&activityId=<活动id>&templateId=<模板id>&prd=crm
|
2024-06-28 15:38:28 +08:00
|
|
|
|
环境变量:jd_lzkj_shopGift_url // 活动链接
|
2024-08-26 15:45:34 +08:00
|
|
|
|
jd_lzkj_shopGift_notify // 是否推送通知(true/false),默认不推送
|
|
|
|
|
jd_lzkj_shopGift_concThreads // 控制并发线程数(正整数),默认1,最大5
|
|
|
|
|
jd_lzkj_shopGift_concRetry // 最大重试次数(正整数),默认0即不重试
|
|
|
|
|
jd_lzkj_shopGift_concTimeout // 最大超时时间(正整数,单位毫秒),默认 '60000' 即1分钟
|
|
|
|
|
jd_lzkj_shopGift_pinFilter_interactsaas // 账号pin过滤,多个@链接
|
|
|
|
|
jd_lzkj_shopGift_pinFilter_interaction_v1 // 账号pin过滤,多个@链接
|
|
|
|
|
|
|
|
|
|
支持的活动类型:
|
|
|
|
|
10058 店铺礼包
|
|
|
|
|
|
|
|
|
|
注释:
|
|
|
|
|
需要链接中的三个必要参数才能正常访问活动页,运行脚本至少需要提供 activityId 参数
|
|
|
|
|
官方后端性能较差并且写的很烂,同一时间冲的人较多会导致服务器抽风返回 500 即 Internal Server Error
|
2024-06-28 15:38:28 +08:00
|
|
|
|
|
|
|
|
|
7 7 7 7 *
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const $ = new Env('店铺礼包(超级无线)')
|
|
|
|
|
|
2024-08-26 15:45:34 +08:00
|
|
|
|
var iil='jsjiami.com.v7';const lliI11=lIiIi1ii;(function(iIlllll,I1III1l1,IIIiiiI,IIl11Ill,lI1I1iii,llilill,l1IlliIi){return iIlllll=iIlllll>>0x2,llilill='hs',l1IlliIi='hs',function(IillIiIl,Ii1I1Iil,liIl1liI,lilI1liI,ilIl1ll){const I1i11IIi=lIiIi1ii;lilI1liI='tfi',llilill=lilI1liI+llilill,ilIl1ll='up',l1IlliIi+=ilIl1ll,llilill=liIl1liI(llilill),l1IlliIi=liIl1liI(l1IlliIi),liIl1liI=0x0;const il1lIl1I=IillIiIl();while(!![]&&--IIl11Ill+Ii1I1Iil){try{lilI1liI=parseInt(I1i11IIi(0xbd,'Vz[u'))/0x1*(-parseInt(I1i11IIi(0x307,'bzB^'))/0x2)+-parseInt(I1i11IIi(0xe5,'9D8('))/0x3*(-parseInt(I1i11IIi(0x1f2,'bzB^'))/0x4)+-parseInt(I1i11IIi(0x30a,'LoJr'))/0x5*(-parseInt(I1i11IIi(0x31a,'uo#5'))/0x6)+-parseInt(I1i11IIi(0x322,'t2YA'))/0x7+parseInt(I1i11IIi(0x1e3,'uN2X'))/0x8+-parseInt(I1i11IIi(0x285,'FRf3'))/0x9+parseInt(I1i11IIi(0xcd,'1O]q'))/0xa*(parseInt(I1i11IIi(0x111,'YHdZ'))/0xb);}catch(iI11IIil){lilI1liI=liIl1liI;}finally{ilIl1ll=il1lIl1I[llilill]();if(iIlllll<=IIl11Ill)liIl1liI?lI1I1iii?lilI1liI=ilIl1ll:lI1I1iii=ilIl1ll:liIl1liI=ilIl1ll;else{if(liIl1liI==lI1I1iii['replace'](/[qVrHJRlQNIwUtnABxebO=]/g,'')){if(lilI1liI===Ii1I1Iil){il1lIl1I['un'+llilill](ilIl1ll);break;}il1lIl1I[l1IlliIi](ilIl1ll);}}}}}(IIIiiiI,I1III1l1,function(l1IlilIl,IlilliI1,i11I1I11,iilIIil1,Iii11li,l1l1l1Ii,ii1iI1lI){return IlilliI1='\x73\x70\x6c\x69\x74',l1IlilIl=arguments[0x0],l1IlilIl=l1IlilIl[IlilliI1](''),i11I1I11=`\x72\x65\x76\x65\x72\x73\x65`,l1IlilIl=l1IlilIl[i11I1I11]('\x76'),iilIIil1=`\x6a\x6f\x69\x6e`,(0x17eaa8,l1IlilIl[iilIIil1](''));});}(0x310,0x62be3,Iil1I1I,0xc6),Iil1I1I)&&(iil=0x14e);const jdCookie=require(lliI11(0x165,'^9um')),common=require(lliI11(0x23e,'MqfB')),notify=require(lliI11(0x2a8,'zW6T')),getToken=require(lliI11(0x211,'N7SU')),{wuxianDefense,getJdEnvInfo}=require(lliI11(0x12f,'BlSu')),activityUrl=process[lliI11(0x124,'Ypjf')][lliI11(0x2d4,'$VE0')]||process[lliI11(0x144,'8VGf')][lliI11(0x7c,'LoJr')]||'',isNotify=(process[lliI11(0x19c,'6n*H')][lliI11(0x1cf,'6n*H')]||process[lliI11(0x106,'O5ou')][lliI11(0x161,'O5ou')])===lliI11(0x192,'uN2X');let concThreads=process[lliI11(0x126,'uX2#')][lliI11(0x1e0,'O5ou')]||'1',concTimeout=process[lliI11(0x2f5,'[Rye')][lliI11(0x114,'XiIk')]||lliI11(0x1e7,'vVqT'),concMaxRetryTimes=process[lliI11(0xd1,'1O]q')][lliI11(0xcb,'z95s')]||'0';const pinFilter_interactsaas=(process[lliI11(0x137,'FRf3')][lliI11(0x20c,'LE6J')]||'')[lliI11(0x2dd,'zW6T')]('@'),pinFilter_interaction_v1=(process[lliI11(0x214,'b0#O')][lliI11(0x28f,'t2YA')]||'')[lliI11(0x10a,'[Rye')]('@');let concThreadsMax=Math[lliI11(0x23f,'$VE0')](concThreads,0x5),cookiesArr=Object[lliI11(0xaf,'x*v^')](jdCookie)[lliI11(0x11f,'s%pl')](iili1iIl=>jdCookie[iili1iIl])[lliI11(0x105,'nDE$')](illlIlI1=>illlIlI1);!cookiesArr[0x0]&&($[lliI11(0xe7,'FzG(')]($[lliI11(0x22d,'O5ou')],lliI11(0x2a3,'nDE$')),process[lliI11(0x240,'Vz[u')](0x1));function lIiIi1ii(_0x581722,_0x4ea6d9){const _0x127466=Iil1I1I();return lIiIi1ii=function(_0x9af3f0,_0x579d8b){_0x9af3f0=_0x9af3f0-0x74;let _0x244115=_0x127466[_0x9af3f0];if(lIiIi1ii['UJZGDY']===undefined){var _0x3b2b4a=function(_0x3ac047){const _0x26b231='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x47fff4='',_0x28c869='';for(let _0x31dfa0=0x0,_0x319eb8,_0x48c09a,_0x50876d=0x0;_0x48c09a=_0x3ac047['charAt'](_0x50876d++);~_0x48c09a&&(_0x319eb8=_0x31dfa0%0x4?_0x319eb8*0x40+_0x48c09a:_0x48c09a,_0x31dfa0++%0x4)?_0x47fff4+=String['fromCharCode'](0xff&_0x319eb8>>(-0x2*_0x31dfa0&0x6)):0x0){_0x48c09a=_0x26b231['indexOf'](_0x48c09a);}for(let _0x2661c9=0x0,_0x249879=_0x47fff4['length'];_0x2661c9<_0x249879;_0x2661c9++){_0x28c869+='%'+('00'+_0x47fff4['charCodeAt'](_0x2661c9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x28c869);};const _0x43ff83=function(_0x491236,_0x150ebe){let _0x4528d9=[],_0x3c3a36=0x0,_0x14a1b4,_0x666205='';_0x491236=_0x3b2b4a(_0x491236);let _0x358827;for(_0x358827=0x0;_0x358827<0x100;_0x358827++){_0x4528d9[_0x358827]=_0x358827;}for(_0x358827=0x0;_0x358827<0x100;_0x358827++){_0x3c3a36=(_0x3c3a36+_0x4528d9[_0x358827]+_0x150ebe['charCodeAt'](_0x358827%_0x150ebe['length']
|
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"])
|