KR/jd_lzkj_loreal_daySign.js

21 lines
61 KiB
JavaScript
Raw Normal View History

2023-10-02 19:21:40 +08:00
/*
活动名称签到有礼超级无线
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=<10023/10040>&templateId=<模板id>&activityId=<活动id>&prd=cjwx
2023-07-27 16:14:01 +08:00
环境变量jd_lzkj_loreal_daySign_url // 活动链接
2023-10-02 19:21:40 +08:00
jd_lzkj_loreal_daySign_opencard // 是否入会true/false默认不入会
jd_lzkj_loreal_daySign_Notify // 是否推送通知true/false默认不推送
jd_lzkj_loreal_daySign_break // 493后继续执行默认退出运行true/false
2023-07-27 16:14:01 +08:00
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
2023-10-02 19:21:40 +08:00
#签到有礼超级无线
1 1 1 1 * jd_lzkj_loreal_daySign.js, tag=签到有礼超级无线, enabled=true
2023-07-27 16:14:01 +08:00
2023-10-02 19:21:40 +08:00
*/
2023-07-27 16:14:01 +08:00
2023-10-02 19:21:40 +08:00
const $ = new Env('签到有礼(超级无线)')
2023-10-21 11:11:51 +08:00
var version_='jsjiami.com.v7';const l11Ili1l=III1ilI;(function(IlIlllil,liI1l11i,iIl1i1li,II1lilII,iI1i1l1I,I1lIiIi1,i1li1iI1){return IlIlllil=IlIlllil>>0x3,I1lIiIi1='hs',i1li1iI1='hs',function(lIlllI1I,llIII1,il1IiiI1,I1lIliii,i1lIl1Ii){const IIiIII1I=III1ilI;I1lIliii='tfi',I1lIiIi1=I1lIliii+I1lIiIi1,i1lIl1Ii='up',i1li1iI1+=i1lIl1Ii,I1lIiIi1=il1IiiI1(I1lIiIi1),i1li1iI1=il1IiiI1(i1li1iI1),il1IiiI1=0x0;const Iil1IIIi=lIlllI1I();while(!![]&&--II1lilII+llIII1){try{I1lIliii=parseInt(IIiIII1I(0x245,'reLf'))/0x1*(-parseInt(IIiIII1I(0x360,'sR&]'))/0x2)+-parseInt(IIiIII1I(0x228,'X1BX'))/0x3+parseInt(IIiIII1I(0x253,'!G]Q'))/0x4+-parseInt(IIiIII1I(0x256,'#&X]'))/0x5*(parseInt(IIiIII1I(0x434,'sR&]'))/0x6)+parseInt(IIiIII1I(0x33e,'X1BX'))/0x7+-parseInt(IIiIII1I(0x24f,'0%eA'))/0x8+parseInt(IIiIII1I(0x1fd,'f5AF'))/0x9;}catch(II1Ili1I){I1lIliii=il1IiiI1;}finally{i1lIl1Ii=Iil1IIIi[I1lIiIi1]();if(IlIlllil<=II1lilII)il1IiiI1?iI1i1l1I?I1lIliii=i1lIl1Ii:iI1i1l1I=i1lIl1Ii:il1IiiI1=i1lIl1Ii;else{if(il1IiiI1==iI1i1l1I['replace'](/[dJXQYWeOfEghkDxlAVRCpL=]/g,'')){if(I1lIliii===llIII1){Iil1IIIi['un'+I1lIiIi1](i1lIl1Ii);break;}Iil1IIIi[i1li1iI1](i1lIl1Ii);}}}}}(iIl1i1li,liI1l11i,function(II1il1II,illIli1I,ii1111II,iI1lIii,lIi1iIil,llIIi1ii,iIiiI1II){return illIli1I='\x73\x70\x6c\x69\x74',II1il1II=arguments[0x0],II1il1II=II1il1II[illIli1I](''),ii1111II=`\x72\x65\x76\x65\x72\x73\x65`,II1il1II=II1il1II[ii1111II]('\x76'),iI1lIii=`\x6a\x6f\x69\x6e`,(0x143ae3,II1il1II[iI1lIii](''));});}(0x5f8,0x287d9,I11I1li1,0xc1),I11I1li1)&&(version_=I11I1li1);const l1lilliI=require(l11Ili1l(0x3a0,'3H%3')),Il111Il1=require(l11Ili1l(0x39d,'Vo#a')),IiI1li1=require('./function/sendJDNotify'),i1IiIilI=require(l11Ili1l(0x36c,'sR&]')),{loreal_savePrize:li1l111l}=require(l11Ili1l(0x441,'ja*%')),i1IliiII=require('crypto-js'),IlI=process['env'][l11Ili1l(0x366,'t#*8')]||'',III1Iil1=process[l11Ili1l(0x3bc,')Neh')][l11Ili1l(0x214,'reLf')]===l11Ili1l(0x3ed,'p9CP'),IIII1Il1=process[l11Ili1l(0x294,'reLf')][l11Ili1l(0x20e,'gpIe')]===l11Ili1l(0x3c7,'eH9G'),lilIil1l=process['env'][l11Ili1l(0x313,'BwM2')]===l11Ili1l(0x3fa,'I^b7');let iiiI1II='',iliIilI='';const Il11iII1=Object[l11Ili1l(0x29e,'reLf')](l1lilliI)[l11Ili1l(0x320,'VoKR')](i11111lI=>l1lilliI[i11111lI])['filter'](ilil1II=>ilil1II);!Il11iII1[0x0]&&($['msg']($[l11Ili1l(0x42e,')Neh')],l11Ili1l(0x2b0,'PBO[')),process['exit'](0x1));function I11I1li1(){const i11lilI1=(function(){return[...[version_,'JOhkjhsECjiaOpmexil.coYm.Wv7QXLDRAgfVdDY==','WONcSCkAwCkcBa','W4iSzSk7WPqEbq','umo9DwZdJSoiWQWJ','n8o3WQ3dMM9N','h1JdJWpdJSkyBs3dPG','WOaVW61ugv/cK0rnW5LyW7i','WQ17WRfJW4ucztxcQea','WQhcMt7dVq','W5JcIs1Stmo8m0FdRmoE','WQ1FW613W48ZWRy','kCkeo8kfW7hcT07dOmoN','w8ovBmkPW4/cUbnVWPBdK8oaWQTi','WRtcLSkrtmkyzupcJbStWQm','igudBMhdOtz2','WQJcM8oDWPXt','DCoKrwRdJa','fhNdTmkYmx4kWPNcMubN','eKpdQCkXkeK','WRxcPCkYx8kV','WR99WQTUW70ezsxcH10','W5BcO8kXWP8g','WO/cOSkbwa','CGlcJSk9y3pdQfC','8y6DSwRMG7hLLRlOJkNLV5lLR5RNI70F','bUocMEA3KowjNUwEKUwDLEodOa','W6RcUmkjWO4IsmoA','bSoeWRzMnmoRWOzgjCkWWOVcTCoWdcW','CeenWO08W7BcNCoG','WOOVW6P0ev/cMa','xslcQSkCwG','E8oOWOlcGG','BtVcV8oQFGft5B+85AsG44cz5lQV5lMi6lAI5y+a','W7pKUzpKUl/KUjXM','5RAc5yMc5Bgd5PYV5BY65AwE772l5BY+5AwU5Pwm6zsT776h','WQNcHmk3vW','qwz/WOG','jhudt2RdTW','5REa5yM45Bsg5lQZW40','W4ZcNc9/vG','mL/dGSkbW7C','8yg9MCou5Ogq5zwX6i625B2K','WPPsBabrcmoBWOm','fZm7W6ZdV8k5W4pcJSkqWRxdNdjLWP7dNq','htm8W4RdRmkYW7y','W4NdT8o3W51xWPbUWRO3WPdcP8otWQ3cUG','cmkhkmo/WQZdUu0','W4XiWPXBcW','5P2V6ig/6i205y2j55sP5OI06yIE5P6R5l6n5Ooj','pM8EFMRdSHj3','AoISK+AXHowLVUI1IU+/LmogW7ZcImkaWRRdJ8kkCCoKWPm9rqRdNa','smoGB2ldHCo9WRG2WQm','cKxdHq','nmktiCkmW7xcNKO','qwhdPq','ugldJHW0','WQ7cGSkWw1iOemkdW4C','BCoQWP/cS8omCCkLWOLNea','jwKkzeRdPHi','5RAo5yIs5BAS5lI0W70','W445zCkKWPWAaCkVvmkcWQ9JDdm2n8oIkCksW5uKtMLyW5bBW4CFWPS0','44oM5lMf5lUj6lwd5y+2','WRNdQGBcG8kH','WQmacq','5P2A5B2w5AAe','W6VdPSkTW78dW60w','c8oHWQFdIhS','bh7dP8kZ','WRZLR5tNI7bA','i3ajA3ddTJX9mLXnDxC','WOjbtfFcHa','WRFcUCkmC8kH','dwZcM8osaYq','W6pcPc5wsq','WR5jW71GWQyBWOJdS21qDqOcs8oDfq','w+A3MowjIowNREwqO++8RLm','WO3cGCkWrSkD','q+E7PUAEHo++VUs6I+AVK+AuP+EaIUACM+wrQSoF'
2023-07-27 16:14:01 +08:00
// prettier-ignore
2023-10-02 19:21:40 +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"])