2023-10-16 10:51:57 +08:00
|
|
|
|
/*
|
|
|
|
|
活动名称:积分兑换(超级无线)
|
|
|
|
|
活动链接:https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10079&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|
|
|
|
环境变量:jd_lzkj_loreal_pointsExchange_url // 活动链接
|
|
|
|
|
jd_lzkj_loreal_pointsExchange_opencard // 是否入会(true/false),默认不入会
|
|
|
|
|
jd_lzkj_loreal_pointsExchange_Notify // 是否推送通知(true/false),默认不推送
|
|
|
|
|
jd_lzkj_loreal_pointsExchange_break // 493后继续执行,默认退出运行(true/false)
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const $ = new Env('积分兑换(超级无线)')
|
2023-10-21 11:11:51 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const i11IIII=lIIIiiil;(function(Il1Ill1l,Ii1liIiI,Iiilllli,iiilii1I,lIiiIii,iiilIIlI,I111IIl){return Il1Ill1l=Il1Ill1l>>0x7,iiilIIlI='hs',I111IIl='hs',function(IlII1i1I,lill11,lili1ll1,lI1l1IIl,ll1ilIi){const i11IIiil=lIIIiiil;lI1l1IIl='tfi',iiilIIlI=lI1l1IIl+iiilIIlI,ll1ilIi='up',I111IIl+=ll1ilIi,iiilIIlI=lili1ll1(iiilIIlI),I111IIl=lili1ll1(I111IIl),lili1ll1=0x0;const lilI1iII=IlII1i1I();while(!![]&&--iiilii1I+lill11){try{lI1l1IIl=parseInt(i11IIiil(0x267,'JIjH'))/0x1*(-parseInt(i11IIiil(0x21f,'X124'))/0x2)+parseInt(i11IIiil(0x25e,'kWWD'))/0x3+parseInt(i11IIiil(0x1da,'(pKk'))/0x4*(parseInt(i11IIiil(0x443,'6oUu'))/0x5)+-parseInt(i11IIiil(0x416,'o7C0'))/0x6*(parseInt(i11IIiil(0x35a,'qMdP'))/0x7)+-parseInt(i11IIiil(0x1ec,'amlA'))/0x8+-parseInt(i11IIiil(0x32a,'%%Gn'))/0x9+parseInt(i11IIiil(0x209,'kWWD'))/0xa*(parseInt(i11IIiil(0x3f0,'I!QZ'))/0xb);}catch(I1iilIIl){lI1l1IIl=lili1ll1;}finally{ll1ilIi=lilI1iII[iiilIIlI]();if(Il1Ill1l<=iiilii1I)lili1ll1?lIiiIii?lI1l1IIl=ll1ilIi:lIiiIii=ll1ilIi:lili1ll1=ll1ilIi;else{if(lili1ll1==lIiiIii['replace'](/[wCTNFAgJqfDtxBPKHMQXp=]/g,'')){if(lI1l1IIl===lill11){lilI1iII['un'+iiilIIlI](ll1ilIi);break;}lilI1iII[I111IIl](ll1ilIi);}}}}}(Iiilllli,Ii1liIiI,function(iIil1iI1,l1lIIli,Iii11I,lill1llI,liIl1i1l,l1liI1l1,i1IlIII1){return l1lIIli='\x73\x70\x6c\x69\x74',iIil1iI1=arguments[0x0],iIil1iI1=iIil1iI1[l1lIIli](''),Iii11I=`\x72\x65\x76\x65\x72\x73\x65`,iIil1iI1=iIil1iI1[Iii11I]('\x76'),lill1llI=`\x6a\x6f\x69\x6e`,(0x143ad6,iIil1iI1[lill1llI](''));});}(0x5f80,0x191d1,lllIlIl1,0xc1),lllIlIl1)&&(version_=lllIlIl1);function lIIIiiil(_0x494c42,_0x58d7a3){const _0x14333d=lllIlIl1();return lIIIiiil=function(_0x15171c,_0x227939){_0x15171c=_0x15171c-0x1d6;let _0x51be5d=_0x14333d[_0x15171c];if(lIIIiiil['gLZofg']===undefined){var _0x5322e6=function(_0x2d0dcb){const _0xeef004='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xa3d21e='',_0x520653='';for(let _0x3e1df0=0x0,_0xb441de,_0x21ded8,_0x5735e1=0x0;_0x21ded8=_0x2d0dcb['charAt'](_0x5735e1++);~_0x21ded8&&(_0xb441de=_0x3e1df0%0x4?_0xb441de*0x40+_0x21ded8:_0x21ded8,_0x3e1df0++%0x4)?_0xa3d21e+=String['fromCharCode'](0xff&_0xb441de>>(-0x2*_0x3e1df0&0x6)):0x0){_0x21ded8=_0xeef004['indexOf'](_0x21ded8);}for(let _0x129ec2=0x0,_0x4c331b=_0xa3d21e['length'];_0x129ec2<_0x4c331b;_0x129ec2++){_0x520653+='%'+('00'+_0xa3d21e['charCodeAt'](_0x129ec2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x520653);};const _0x86917a=function(_0x34cad8,_0x23e3c1){let _0x317886=[],_0x4ad5ce=0x0,_0x5af24a,_0x42a15b='';_0x34cad8=_0x5322e6(_0x34cad8);let _0x5ebeb6;for(_0x5ebeb6=0x0;_0x5ebeb6<0x100;_0x5ebeb6++){_0x317886[_0x5ebeb6]=_0x5ebeb6;}for(_0x5ebeb6=0x0;_0x5ebeb6<0x100;_0x5ebeb6++){_0x4ad5ce=(_0x4ad5ce+_0x317886[_0x5ebeb6]+_0x23e3c1['charCodeAt'](_0x5ebeb6%_0x23e3c1['length']))%0x100,_0x5af24a=_0x317886[_0x5ebeb6],_0x317886[_0x5ebeb6]=_0x317886[_0x4ad5ce],_0x317886[_0x4ad5ce]=_0x5af24a;}_0x5ebeb6=0x0,_0x4ad5ce=0x0;for(let _0xae38cf=0x0;_0xae38cf<_0x34cad8['length'];_0xae38cf++){_0x5ebeb6=(_0x5ebeb6+0x1)%0x100,_0x4ad5ce=(_0x4ad5ce+_0x317886[_0x5ebeb6])%0x100,_0x5af24a=_0x317886[_0x5ebeb6],_0x317886[_0x5ebeb6]=_0x317886[_0x4ad5ce],_0x317886[_0x4ad5ce]=_0x5af24a,_0x42a15b+=String['fromCharCode'](_0x34cad8['charCodeAt'](_0xae38cf)^_0x317886[(_0x317886[_0x5ebeb6]+_0x317886[_0x4ad5ce])%0x100]);}return _0x42a15b;};lIIIiiil['WDGlbK']=_0x86917a,_0x494c42=arguments,lIIIiiil['gLZofg']=!![];}const _0x56f4b9=_0x14333d[0x0],_0x49ee2a=_0x15171c+_0x56f4b9,_0x4029b0=_0x494c42[_0x49ee2a];return!_0x4029b0?(lIIIiiil['hLvAWt']===undefined&&(lIIIiiil['hLvAWt']=!![]),_0x51be5d=lIIIiiil['WDGlbK'](_0x51be5d,_0x227939),_0x494c42[_0x49ee2a]=_0x51be5d):_0x51be5d=_0x4029b0,_0x51be5d;},lIIIiiil(_0x494c42,_0x58d7a3);}const l111iII1=require(i11IIII(0x2ef,'ersQ')),Iii1i1iI=require(i11IIII(0x21e,'&zY3')),Il1IllII=require(i11IIII(0x453,'Cuho')),Illi1iII=require('./function/krgetToken'),{loreal_savePrize:l11ili1}=require(i11IIII(0x3ce,'XxBQ')),lI11llIl=process['env'][i11IIII(0x287,'%%Gn')]||'',IiI1Ili1=process[i11IIII(0x46e,'WALY')][i11IIII(0
|
2023-10-16 10:51:57 +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"])
|