KR/jd_lzkj_loreal_perfectInfo.js

24 lines
73 KiB
JavaScript
Raw Normal View History

2023-08-05 16:27:38 +08:00
/*
2023-10-16 20:57:18 +08:00
活动名称完善有礼超级无线
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10049&templateId=<模板id>&activityId=<活动id>&prd=cjwx
https://lzkj-isv.isvjcloud.com/prod/cc/interaction/v1/index?activityType=10049&templateId=<模板id>&activityId=<活动id>&prd=cjwx
2023-08-05 16:27:38 +08:00
环境变量jd_lzkj_loreal_perfectInfo_url // 活动链接
2023-10-16 20:57:18 +08:00
jd_lzkj_loreal_perfectInfo_opencard // 是否入会true/false默认不入会
jd_lzkj_loreal_perfectInfo_Notify // 是否推送通知true/false默认不推送
jd_lzkj_loreal_perfectInfo_break // 493后继续执行默认退出运行true/false
2023-08-05 16:27:38 +08:00
请使用本地IP环境 请使用本地IP环境 请使用本地IP环境
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
2023-10-16 20:57:18 +08:00
#完善有礼超级无线
1 1 1 1 * jd_lzkj_loreal_perfectInfo.js, tag=完善有礼超级无线, enabled=true
2023-08-05 16:27:38 +08:00
2023-10-16 20:57:18 +08:00
*/
2023-08-05 16:27:38 +08:00
2023-10-16 20:57:18 +08:00
const $ = new Env('完善有礼(超级无线)')
2023-10-21 11:11:51 +08:00
var version_='jsjiami.com.v7';const iliii11=l11iIiIi;(function(l1Il11i1,ll1ilIll,Iii11lii,I1i1ii1,III1lill,lIlI1I1i,iIlIiIi1){return l1Il11i1=l1Il11i1>>0x4,lIlI1I1i='hs',iIlIiIi1='hs',function(l1IIll11,I1iI11iI,llli1ll1,I1li1II1,ii1i1lil){const Il1ilIIl=l11iIiIi;I1li1II1='tfi',lIlI1I1i=I1li1II1+lIlI1I1i,ii1i1lil='up',iIlIiIi1+=ii1i1lil,lIlI1I1i=llli1ll1(lIlI1I1i),iIlIiIi1=llli1ll1(iIlIiIi1),llli1ll1=0x0;const lIl1lil1=l1IIll11();while(!![]&&--I1i1ii1+I1iI11iI){try{I1li1II1=-parseInt(Il1ilIIl(0x26c,'ipHt'))/0x1+-parseInt(Il1ilIIl(0x41b,'!J07'))/0x2+-parseInt(Il1ilIIl(0x360,'GlH1'))/0x3*(-parseInt(Il1ilIIl(0x2e0,'@711'))/0x4)+-parseInt(Il1ilIIl(0x29e,'Ziqg'))/0x5+-parseInt(Il1ilIIl(0x47d,'lT%x'))/0x6+parseInt(Il1ilIIl(0x416,'aLYT'))/0x7+-parseInt(Il1ilIIl(0x352,'l5b@'))/0x8*(-parseInt(Il1ilIIl(0x47a,'aU1S'))/0x9);}catch(iIl1I1il){I1li1II1=llli1ll1;}finally{ii1i1lil=lIl1lil1[lIlI1I1i]();if(l1Il11i1<=I1i1ii1)llli1ll1?III1lill?I1li1II1=ii1i1lil:III1lill=ii1i1lil:llli1ll1=ii1i1lil;else{if(llli1ll1==III1lill['replace'](/[ObuSBHRnKExVgteLrPQU=]/g,'')){if(I1li1II1===I1iI11iI){lIl1lil1['un'+lIlI1I1i](ii1i1lil);break;}lIl1lil1[iIlIiIi1](ii1i1lil);}}}}}(Iii11lii,ll1ilIll,function(iIl1IlII,illiIlil,Ii1lIII1,l1l1IIl,lI111ii1,I1lIlli1,I1l1li1){return illiIlil='\x73\x70\x6c\x69\x74',iIl1IlII=arguments[0x0],iIl1IlII=iIl1IlII[illiIlil](''),Ii1lIII1=`\x72\x65\x76\x65\x72\x73\x65`,iIl1IlII=iIl1IlII[Ii1lIII1]('\x76'),l1l1IIl=`\x6a\x6f\x69\x6e`,(0x143ad9,iIl1IlII[l1l1IIl](''));});}(0xc20,0x75e33,IlililIl,0xc4),IlililIl)&&(version_=IlililIl);const ill1ll1=require(iliii11(0x3db,'&%Hj')),lliIliIi=require(iliii11(0x271,']8OP')),iiiliIii=require(iliii11(0x315,'aU1S')),IllliI1=require(iliii11(0x34c,'9v^Z')),{loreal_savePrize:llllIl1l}=require('./function/krsavePrize'),ill1IiIi=process[iliii11(0x217,'0xcy')]['jd_lzkj_loreal_perfectInfo_url']||'',I11llIl1=process[iliii11(0x152,'9v^Z')][iliii11(0x2df,'Jco&')]==='true',II1liI1I=process[iliii11(0x1d6,']8OP')]['jd_lzkj_loreal_perfectInfo_break']===iliii11(0x1d7,'&9#]'),IllliI1i=process[iliii11(0x1a7,'GlH1')][iliii11(0x1db,'onQ!')]==='true';let iIiIIilI='',IiliIiiI='';const i1iI1l11=Object[iliii11(0x1f7,'%xnc')](ill1ll1)['map'](Ili1l11I=>ill1ll1[Ili1l11I])[iliii11(0x1ee,'QL53')](iIlIlii1=>iIlIlii1);function l11iIiIi(_0x32265b,_0x233b65){const _0x1b5021=IlililIl();return l11iIiIi=function(_0x588039,_0x26921d){_0x588039=_0x588039-0x143;let _0x125577=_0x1b5021[_0x588039];if(l11iIiIi['gaZcYN']===undefined){var _0xbfc741=function(_0x991bd6){const _0x38e454='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1cfa70='',_0x1991e0='';for(let _0x3e30eb=0x0,_0x57b20c,_0x86fed8,_0x2357fe=0x0;_0x86fed8=_0x991bd6['charAt'](_0x2357fe++);~_0x86fed8&&(_0x57b20c=_0x3e30eb%0x4?_0x57b20c*0x40+_0x86fed8:_0x86fed8,_0x3e30eb++%0x4)?_0x1cfa70+=String['fromCharCode'](0xff&_0x57b20c>>(-0x2*_0x3e30eb&0x6)):0x0){_0x86fed8=_0x38e454['indexOf'](_0x86fed8);}for(let _0x5b1942=0x0,_0x5aad97=_0x1cfa70['length'];_0x5b1942<_0x5aad97;_0x5b1942++){_0x1991e0+='%'+('00'+_0x1cfa70['charCodeAt'](_0x5b1942)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1991e0);};const _0x3194e0=function(_0xc86fb8,_0x511d23){let _0x5b5a6f=[],_0x3f2282=0x0,_0x41aa9d,_0x3ce433='';_0xc86fb8=_0xbfc741(_0xc86fb8);let _0x7c8aa9;for(_0x7c8aa9=0x0;_0x7c8aa9<0x100;_0x7c8aa9++){_0x5b5a6f[_0x7c8aa9]=_0x7c8aa9;}for(_0x7c8aa9=0x0;_0x7c8aa9<0x100;_0x7c8aa9++){_0x3f2282=(_0x3f2282+_0x5b5a6f[_0x7c8aa9]+_0x511d23['charCodeAt'](_0x7c8aa9%_0x511d23['length']))%0x100,_0x41aa9d=_0x5b5a6f[_0x7c8aa9],_0x5b5a6f[_0x7c8aa9]=_0x5b5a6f[_0x3f2282],_0x5b5a6f[_0x3f2282]=_0x41aa9d;}_0x7c8aa9=0x0,_0x3f2282=0x0;for(let _0x39fd80=0x0;_0x39fd80<_0xc86fb8['length'];_0x39fd80++){_0x7c8aa9=(_0x7c8aa9+0x1)%0x100,_0x3f2282=(_0x3f2282+_0x5b5a6f[_0x7c8aa9])%0x100,_0x41aa9d=_0x5b5a6f[_0x7c8aa9],_0x5b5a6f[_0x7c8aa9]=_0x5b5a6f[_0x3f2282],_0x5b5a6f[_0x3f2282]=_0x41aa9d,_0x3ce433+=String['fromCharCode'](_0xc86fb8['charCodeAt'](_0x39fd80)^_0x5b5a6f[(_0x5b5a6f[_0x7c8aa9]+_0x5b5a6f[_0x3f2282])%0x100]);}return _0x3ce433;};l11iIiIi['xPmAAs']=_0x3194e0,_0x32265b=arguments,l11i
2023-08-05 16:27:38 +08:00
// prettier-ignore
2023-10-16 20:57:18 +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"])