KR/jd_lzkj_loreal_lkFollowShop.js

25 lines
62 KiB
JavaScript
Raw Normal View History

2023-07-27 16:14:01 +08:00
/*
2023-10-06 11:59:10 +08:00
活动名称关注店铺有礼超级无线
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10069&templateId=<模板id>&activityId=<活动id>&prd=cjwx
https://lzkj-isv.isvjcloud.com/prod/cc/interaction/v1/index?activityType=10069&templateId=<模板id>&activityId=<活动id>&prd=cjwx
https://lorealjdcampaign-rc.isvjcloud.com/interact/index?activityType=10069&templateId=<模板id>&activityId=<活动id>&prd=cjwx
2023-07-27 16:14:01 +08:00
环境变量jd_lzkj_loreal_lkFollowShop_url // 活动链接
2023-10-06 11:59:10 +08:00
jd_lzkj_loreal_lkFollowShop_opencard // 是否入会true/false默认不入会
jd_lzkj_loreal_lkFollowShop_Notify // 是否推送通知true/false默认不推送
jd_lzkj_loreal_lkFollowShop_break // 493后继续执行默认退出运行true/false
2023-11-10 11:11:46 +08:00
请使用本地IP环境 请使用本地IP环境 请使用本地IP环境
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#关注店铺有礼超级无线
1 1 1 1 * jd_lzkj_loreal_lkFollowShop.js, tag=关注店铺有礼超级无线, enabled=true
2023-07-27 16:14:01 +08:00
*/
2023-10-06 11:59:10 +08:00
const $ = new Env('关注店铺有礼(超级无线)')
2023-11-10 11:11:46 +08:00
var version_='jsjiami.com.v7';function iii1II(_0x2736ac,_0xbbfbdb){const _0x5cbf62=Iii11l();return iii1II=function(_0x160dca,_0x33ed62){_0x160dca=_0x160dca-0x105;let _0x9d6e8e=_0x5cbf62[_0x160dca];if(iii1II['dzXcBB']===undefined){var _0x112353=function(_0x20c16){const _0x41e71f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x30bea1='',_0x1d6e1f='';for(let _0x6d3fb7=0x0,_0x556bef,_0x325a54,_0xaa05d0=0x0;_0x325a54=_0x20c16['charAt'](_0xaa05d0++);~_0x325a54&&(_0x556bef=_0x6d3fb7%0x4?_0x556bef*0x40+_0x325a54:_0x325a54,_0x6d3fb7++%0x4)?_0x30bea1+=String['fromCharCode'](0xff&_0x556bef>>(-0x2*_0x6d3fb7&0x6)):0x0){_0x325a54=_0x41e71f['indexOf'](_0x325a54);}for(let _0x15901a=0x0,_0x3dac6c=_0x30bea1['length'];_0x15901a<_0x3dac6c;_0x15901a++){_0x1d6e1f+='%'+('00'+_0x30bea1['charCodeAt'](_0x15901a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1d6e1f);};const _0x2f6e23=function(_0x452dd6,_0x303eb1){let _0x10ba37=[],_0x55b380=0x0,_0x4d496e,_0x226b15='';_0x452dd6=_0x112353(_0x452dd6);let _0xb5adff;for(_0xb5adff=0x0;_0xb5adff<0x100;_0xb5adff++){_0x10ba37[_0xb5adff]=_0xb5adff;}for(_0xb5adff=0x0;_0xb5adff<0x100;_0xb5adff++){_0x55b380=(_0x55b380+_0x10ba37[_0xb5adff]+_0x303eb1['charCodeAt'](_0xb5adff%_0x303eb1['length']))%0x100,_0x4d496e=_0x10ba37[_0xb5adff],_0x10ba37[_0xb5adff]=_0x10ba37[_0x55b380],_0x10ba37[_0x55b380]=_0x4d496e;}_0xb5adff=0x0,_0x55b380=0x0;for(let _0x3e34c5=0x0;_0x3e34c5<_0x452dd6['length'];_0x3e34c5++){_0xb5adff=(_0xb5adff+0x1)%0x100,_0x55b380=(_0x55b380+_0x10ba37[_0xb5adff])%0x100,_0x4d496e=_0x10ba37[_0xb5adff],_0x10ba37[_0xb5adff]=_0x10ba37[_0x55b380],_0x10ba37[_0x55b380]=_0x4d496e,_0x226b15+=String['fromCharCode'](_0x452dd6['charCodeAt'](_0x3e34c5)^_0x10ba37[(_0x10ba37[_0xb5adff]+_0x10ba37[_0x55b380])%0x100]);}return _0x226b15;};iii1II['PgNMer']=_0x2f6e23,_0x2736ac=arguments,iii1II['dzXcBB']=!![];}const _0x2d8aa4=_0x5cbf62[0x0],_0x1f50e3=_0x160dca+_0x2d8aa4,_0x184169=_0x2736ac[_0x1f50e3];return!_0x184169?(iii1II['GTTfBi']===undefined&&(iii1II['GTTfBi']=!![]),_0x9d6e8e=iii1II['PgNMer'](_0x9d6e8e,_0x33ed62),_0x2736ac[_0x1f50e3]=_0x9d6e8e):_0x9d6e8e=_0x184169,_0x9d6e8e;},iii1II(_0x2736ac,_0xbbfbdb);}const l111l=iii1II;(function(ll1lll,Illlil,I1iili,lililI,lI1ill,Illlii,lI1ili){return ll1lll=ll1lll>>0x1,Illlii='hs',lI1ili='hs',function(Il1II,i1lll,Ii11I,I1iill,i1lli){const l111i=iii1II;I1iill='tfi',Illlii=I1iill+Illlii,i1lli='up',lI1ili+=i1lli,Illlii=Ii11I(Illlii),lI1ili=Ii11I(lI1ili),Ii11I=0x0;const i11111=Il1II();while(!![]&&--lililI+i1lll){try{I1iill=-parseInt(l111i(0x2b8,'y9!E'))/0x1+-parseInt(l111i(0x304,'B*&c'))/0x2+parseInt(l111i(0x1dd,'wcoj'))/0x3*(parseInt(l111i(0x397,'z$WS'))/0x4)+parseInt(l111i(0x1c4,'eeEE'))/0x5+parseInt(l111i(0x3cd,'YFvY'))/0x6+parseInt(l111i(0x122,'Nh[q'))/0x7+-parseInt(l111i(0x29c,'7%Tl'))/0x8*(parseInt(l111i(0x310,'7%Tl'))/0x9);}catch(lIl1li){I1iill=Ii11I;}finally{i1lli=i11111[Illlii]();if(ll1lll<=lililI)Ii11I?lI1ill?I1iill=i1lli:lI1ill=i1lli:Ii11I=i1lli;else{if(Ii11I==lI1ill['replace'](/[EKgbGlIWDkCPHNYLdfyx=]/g,'')){if(I1iill===i1lll){i11111['un'+Illlii](i1lli);break;}i11111[lI1ili](i1lli);}}}}}(I1iili,Illlil,function(Il1I1,lIilii,lIilil,lIl1ll,Ii111,Ii1III,ilIIi1){return lIilii='\x73\x70\x6c\x69\x74',Il1I1=arguments[0x0],Il1I1=Il1I1[lIilii](''),lIilil=`\x72\x65\x76\x65\x72\x73\x65`,Il1I1=Il1I1[lIilil]('\x76'),lIl1ll=`\x6a\x6f\x69\x6e`,(0x146d25,Il1I1[lIl1ll](''));});}(0x180,0x4f1b4,Iii11l,0xc2),Iii11l)&&(version_=l111l(0x11a,'4cag'));const I1iI1i=require(l111l(0x1ba,'mbn2')),l1i1l=require('./function/jdCommon'),I1iI1l=require(l111l(0x19b,'r^fY')),illlil=require('./function/krgetToken'),{wuxianDefense:Iliil}=require('./function/jdCrypto'),{loreal_savePrize:I1lIIl}=require(l111l(0x3d7,'rZSn')),l1ilI1=process['env']['jd_lzkj_loreal_lkFollowShop_url']||'',l1l1Il=process[l111l(0x32a,'z$WS')]['jd_lzkj_loreal_lkFollowShop_opencard']===l111l(0x1e2,'!L!*'),lil1I=process[l111l(0x133,'ey4o')]['jd_lzkj_loreal_lkFollowShop_break']===l111l(0x3a1,'%Nu2'),l1l1Ii=process['env']['jd_lzkj_loreal_lkFollowShop_Notify']==='true';let IIIIlI='',l1i11l='';const lii
2023-10-06 11:59:10 +08:00
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"])