2023-10-14 18:47:36 +08:00
|
|
|
|
/*
|
|
|
|
|
活动名称:店铺礼包(超级无线)
|
|
|
|
|
活动链接:https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10058&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|
|
|
|
https://lzkj-isv.isvjcloud.com/prod/cc/interaction/v1/index?activityType=10058&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|
|
|
|
环境变量:jd_lzkj_loreal_shopGift_url // 活动链接
|
|
|
|
|
jd_lzkj_loreal_shopGift_opencard // 是否入会(true/false),默认不入会
|
|
|
|
|
jd_lzkj_loreal_shopGift_Notify // 是否推送通知(true/false),默认不推送
|
|
|
|
|
|
|
|
|
|
cron:1 1 1 1 *
|
|
|
|
|
============Quantumultx===============
|
|
|
|
|
[task_local]
|
|
|
|
|
#店铺礼包(超级无线)
|
|
|
|
|
1 1 1 1 * jd_lzkj_loreal_shopGift.js, tag=店铺礼包(超级无线), enabled=true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const $ = new Env('店铺礼包(超级无线)')
|
2023-10-21 11:11:51 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const illlIli1=i1Iillil;function i1Iillil(_0x500167,_0x36498c){const _0x5e349b=I1l1ili();return i1Iillil=function(_0x14af95,_0x47b2a8){_0x14af95=_0x14af95-0x1a4;let _0x1c1696=_0x5e349b[_0x14af95];if(i1Iillil['sJdKoY']===undefined){var _0x2f3600=function(_0x432bc2){const _0xbd8d0a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5efeff='',_0x2eaf8f='';for(let _0x5032e5=0x0,_0x635f0f,_0x3993dd,_0xc1765e=0x0;_0x3993dd=_0x432bc2['charAt'](_0xc1765e++);~_0x3993dd&&(_0x635f0f=_0x5032e5%0x4?_0x635f0f*0x40+_0x3993dd:_0x3993dd,_0x5032e5++%0x4)?_0x5efeff+=String['fromCharCode'](0xff&_0x635f0f>>(-0x2*_0x5032e5&0x6)):0x0){_0x3993dd=_0xbd8d0a['indexOf'](_0x3993dd);}for(let _0x3a5c49=0x0,_0x1a1930=_0x5efeff['length'];_0x3a5c49<_0x1a1930;_0x3a5c49++){_0x2eaf8f+='%'+('00'+_0x5efeff['charCodeAt'](_0x3a5c49)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2eaf8f);};const _0x1e8e3e=function(_0x562234,_0x26d42c){let _0x2cb349=[],_0x2918c7=0x0,_0x55e683,_0x58f693='';_0x562234=_0x2f3600(_0x562234);let _0x55c35f;for(_0x55c35f=0x0;_0x55c35f<0x100;_0x55c35f++){_0x2cb349[_0x55c35f]=_0x55c35f;}for(_0x55c35f=0x0;_0x55c35f<0x100;_0x55c35f++){_0x2918c7=(_0x2918c7+_0x2cb349[_0x55c35f]+_0x26d42c['charCodeAt'](_0x55c35f%_0x26d42c['length']))%0x100,_0x55e683=_0x2cb349[_0x55c35f],_0x2cb349[_0x55c35f]=_0x2cb349[_0x2918c7],_0x2cb349[_0x2918c7]=_0x55e683;}_0x55c35f=0x0,_0x2918c7=0x0;for(let _0x16c69a=0x0;_0x16c69a<_0x562234['length'];_0x16c69a++){_0x55c35f=(_0x55c35f+0x1)%0x100,_0x2918c7=(_0x2918c7+_0x2cb349[_0x55c35f])%0x100,_0x55e683=_0x2cb349[_0x55c35f],_0x2cb349[_0x55c35f]=_0x2cb349[_0x2918c7],_0x2cb349[_0x2918c7]=_0x55e683,_0x58f693+=String['fromCharCode'](_0x562234['charCodeAt'](_0x16c69a)^_0x2cb349[(_0x2cb349[_0x55c35f]+_0x2cb349[_0x2918c7])%0x100]);}return _0x58f693;};i1Iillil['aWeGqq']=_0x1e8e3e,_0x500167=arguments,i1Iillil['sJdKoY']=!![];}const _0xf9c002=_0x5e349b[0x0],_0x2382e3=_0x14af95+_0xf9c002,_0x18e207=_0x500167[_0x2382e3];return!_0x18e207?(i1Iillil['ZGVNEy']===undefined&&(i1Iillil['ZGVNEy']=!![]),_0x1c1696=i1Iillil['aWeGqq'](_0x1c1696,_0x47b2a8),_0x500167[_0x2382e3]=_0x1c1696):_0x1c1696=_0x18e207,_0x1c1696;},i1Iillil(_0x500167,_0x36498c);}(function(lliI111l,iI1Illl,illIlIII,I11iIil,ll1I1il,Ill1lilI,l11Iil){return lliI111l=lliI111l>>0x9,Ill1lilI='hs',l11Iil='hs',function(lil1lIi,iliIlI1l,li1l1Il,II1i1lli,Il1I11li){const I1Ill1l1=i1Iillil;II1i1lli='tfi',Ill1lilI=II1i1lli+Ill1lilI,Il1I11li='up',l11Iil+=Il1I11li,Ill1lilI=li1l1Il(Ill1lilI),l11Iil=li1l1Il(l11Iil),li1l1Il=0x0;const liIi1iI1=lil1lIi();while(!![]&&--I11iIil+iliIlI1l){try{II1i1lli=-parseInt(I1Ill1l1(0x25f,'hL60'))/0x1*(-parseInt(I1Ill1l1(0x3be,'xbUV'))/0x2)+-parseInt(I1Ill1l1(0x325,'xMy@'))/0x3+-parseInt(I1Ill1l1(0x243,'HcIU'))/0x4*(-parseInt(I1Ill1l1(0x365,'kyiW'))/0x5)+parseInt(I1Ill1l1(0x32c,'cmK0'))/0x6+-parseInt(I1Ill1l1(0x30d,'sT[e'))/0x7*(parseInt(I1Ill1l1(0x33b,'cmK0'))/0x8)+-parseInt(I1Ill1l1(0x2ba,'a*xz'))/0x9+parseInt(I1Ill1l1(0x2cd,'LWog'))/0xa*(-parseInt(I1Ill1l1(0x1e2,'IVIo'))/0xb);}catch(llIIII){II1i1lli=li1l1Il;}finally{Il1I11li=liIi1iI1[Ill1lilI]();if(lliI111l<=I11iIil)li1l1Il?ll1I1il?II1i1lli=Il1I11li:ll1I1il=Il1I11li:li1l1Il=Il1I11li;else{if(li1l1Il==ll1I1il['replace'](/[dPybAUHqIerELuXQG=]/g,'')){if(II1i1lli===iliIlI1l){liIi1iI1['un'+Ill1lilI](Il1I11li);break;}liIi1iI1[l11Iil](Il1I11li);}}}}}(illIlIII,iI1Illl,function(II1IiI1l,IililIIi,lliiiIi1,Il1IIi1i,lilIiiII,llIlIIiI,Il1lIlII){return IililIIi='\x73\x70\x6c\x69\x74',II1IiI1l=arguments[0x0],II1IiI1l=II1IiI1l[IililIIi](''),lliiiIi1=`\x72\x65\x76\x65\x72\x73\x65`,II1IiI1l=II1IiI1l[lliiiIi1]('\x76'),Il1IIi1i=`\x6a\x6f\x69\x6e`,(0x143ad5,II1IiI1l[Il1IIi1i](''));});}(0x18600,0xef082,I1l1ili,0xc5),I1l1ili)&&(version_=I1l1ili);const Ii11iliI=require(illlIli1(0x39c,'pt(&')),illlliii=require(illlIli1(0x28c,'s#W(')),IiIl11il=require(illlIli1(0x293,'[97n')),lIIilIlI=require('./function/krgetToken'),IiIlliii=process[illlIli1(0x1f6,'y5rc')][illlIli1(0x229,'6!gd')]||'',IiIiI11i=process['env']['jd_lzkj_loreal_shopGift_opencard']===illlIli1(0x21d,'fsZn'),Il
|
2023-10-14 18:47:36 +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"])
|