2023-10-02 19:29:33 +08:00
|
|
|
|
/*
|
|
|
|
|
活动名称:每日抢好礼(超级无线)
|
|
|
|
|
活动链接:https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10022&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|
|
|
|
环境变量:jd_lzkj_loreal_dailyGrabs_url // 活动链接
|
|
|
|
|
jd_lzkj_loreal_dailyGrabs_opencard // 是否入会(true/false),默认不入会
|
|
|
|
|
jd_lzkj_loreal_dailyGrabs_Notify // 是否推送通知(true/false),默认不推送
|
|
|
|
|
jd_lzkj_loreal_dailyGrabs_break // 493后继续执行,默认退出运行(true/false)
|
2023-10-06 20:01:31 +08:00
|
|
|
|
|
|
|
|
|
cron:1 1 1 1 *
|
|
|
|
|
============Quantumultx===============
|
|
|
|
|
[task_local]
|
|
|
|
|
#每日抢好礼(超级无线)
|
|
|
|
|
1 1 1 1 * jd_lzkj_loreal_dailyGrabs.js, tag=每日抢好礼(超级无线), enabled=true
|
2023-10-02 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const $ = new Env('每日抢好礼(超级无线)')
|
2023-10-21 11:11:51 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const li1IliiI=iiIliiII;(function(I1iI1lII,IIllliI,llilili,l11IliiI,Illl11l1,II1liIi,l1l11lII){return I1iI1lII=I1iI1lII>>0x7,II1liIi='hs',l1l11lII='hs',function(ii11i11i,iiilIi1,il11Iil1,Illi1Il1,l1liIIi){const Il1iiI=iiIliiII;Illi1Il1='tfi',II1liIi=Illi1Il1+II1liIi,l1liIIi='up',l1l11lII+=l1liIIi,II1liIi=il11Iil1(II1liIi),l1l11lII=il11Iil1(l1l11lII),il11Iil1=0x0;const IIIllIIi=ii11i11i();while(!![]&&--l11IliiI+iiilIi1){try{Illi1Il1=parseInt(Il1iiI(0x180,'a0#1'))/0x1+parseInt(Il1iiI(0x21f,'JGgb'))/0x2+parseInt(Il1iiI(0x21e,'a0#1'))/0x3*(parseInt(Il1iiI(0x18a,'AfGT'))/0x4)+-parseInt(Il1iiI(0xa8,'#2uu'))/0x5+parseInt(Il1iiI(0x233,'DZc8'))/0x6*(parseInt(Il1iiI(0x103,'wFjW'))/0x7)+parseInt(Il1iiI(0x8d,'e*pj'))/0x8+-parseInt(Il1iiI(0x2c8,'d2^z'))/0x9;}catch(ilII1l1i){Illi1Il1=il11Iil1;}finally{l1liIIi=IIIllIIi[II1liIi]();if(I1iI1lII<=l11IliiI)il11Iil1?Illl11l1?Illi1Il1=l1liIIi:Illl11l1=l1liIIi:il11Iil1=l1liIIi;else{if(il11Iil1==Illl11l1['replace'](/[WSEnCKxeJgdHOyLqfTM=]/g,'')){if(Illi1Il1===iiilIi1){IIIllIIi['un'+II1liIi](l1liIIi);break;}IIIllIIi[l1l11lII](l1liIIi);}}}}}(llilili,IIllliI,function(ll1iIiiI,llIIIi1l,l1i1il11,iii11iI1,l1IlIiiI,lllIiIl,liIl11il){return llIIIi1l='\x73\x70\x6c\x69\x74',ll1iIiiI=arguments[0x0],ll1iIiiI=ll1iIiiI[llIIIi1l](''),l1i1il11=`\x72\x65\x76\x65\x72\x73\x65`,ll1iIiiI=ll1iIiiI[l1i1il11]('\x76'),iii11iI1=`\x6a\x6f\x69\x6e`,(0x143ae4,ll1iIiiI[iii11iI1](''));});}(0x6480,0xe70e0,liili1i1,0xcb),liili1i1)&&(version_=liili1i1);function iiIliiII(_0x5fb7bb,_0x119042){const _0x13b58c=liili1i1();return iiIliiII=function(_0x3ce5f9,_0x3f0325){_0x3ce5f9=_0x3ce5f9-0x8a;let _0x22eb87=_0x13b58c[_0x3ce5f9];if(iiIliiII['HgonWr']===undefined){var _0x1b388=function(_0x3771ca){const _0x15efeb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x55a143='',_0x24b588='';for(let _0x3eb147=0x0,_0x3d6b09,_0x5e03da,_0x3dc9df=0x0;_0x5e03da=_0x3771ca['charAt'](_0x3dc9df++);~_0x5e03da&&(_0x3d6b09=_0x3eb147%0x4?_0x3d6b09*0x40+_0x5e03da:_0x5e03da,_0x3eb147++%0x4)?_0x55a143+=String['fromCharCode'](0xff&_0x3d6b09>>(-0x2*_0x3eb147&0x6)):0x0){_0x5e03da=_0x15efeb['indexOf'](_0x5e03da);}for(let _0x309618=0x0,_0x59f365=_0x55a143['length'];_0x309618<_0x59f365;_0x309618++){_0x24b588+='%'+('00'+_0x55a143['charCodeAt'](_0x309618)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x24b588);};const _0x432753=function(_0x166495,_0x4c33e8){let _0x55c4b7=[],_0x1950b2=0x0,_0x5e5b77,_0x15b623='';_0x166495=_0x1b388(_0x166495);let _0x11dcd4;for(_0x11dcd4=0x0;_0x11dcd4<0x100;_0x11dcd4++){_0x55c4b7[_0x11dcd4]=_0x11dcd4;}for(_0x11dcd4=0x0;_0x11dcd4<0x100;_0x11dcd4++){_0x1950b2=(_0x1950b2+_0x55c4b7[_0x11dcd4]+_0x4c33e8['charCodeAt'](_0x11dcd4%_0x4c33e8['length']))%0x100,_0x5e5b77=_0x55c4b7[_0x11dcd4],_0x55c4b7[_0x11dcd4]=_0x55c4b7[_0x1950b2],_0x55c4b7[_0x1950b2]=_0x5e5b77;}_0x11dcd4=0x0,_0x1950b2=0x0;for(let _0x5a3032=0x0;_0x5a3032<_0x166495['length'];_0x5a3032++){_0x11dcd4=(_0x11dcd4+0x1)%0x100,_0x1950b2=(_0x1950b2+_0x55c4b7[_0x11dcd4])%0x100,_0x5e5b77=_0x55c4b7[_0x11dcd4],_0x55c4b7[_0x11dcd4]=_0x55c4b7[_0x1950b2],_0x55c4b7[_0x1950b2]=_0x5e5b77,_0x15b623+=String['fromCharCode'](_0x166495['charCodeAt'](_0x5a3032)^_0x55c4b7[(_0x55c4b7[_0x11dcd4]+_0x55c4b7[_0x1950b2])%0x100]);}return _0x15b623;};iiIliiII['bUSuEb']=_0x432753,_0x5fb7bb=arguments,iiIliiII['HgonWr']=!![];}const _0x10f8d7=_0x13b58c[0x0],_0x248488=_0x3ce5f9+_0x10f8d7,_0x417828=_0x5fb7bb[_0x248488];return!_0x417828?(iiIliiII['hacHmF']===undefined&&(iiIliiII['hacHmF']=!![]),_0x22eb87=iiIliiII['bUSuEb'](_0x22eb87,_0x3f0325),_0x5fb7bb[_0x248488]=_0x22eb87):_0x22eb87=_0x417828,_0x22eb87;},iiIliiII(_0x5fb7bb,_0x119042);}const iilIilIi=require(li1IliiI(0x198,'[T3y')),IlI1iI1I=require(li1IliiI(0x1d5,'V19i')),IIi1IiIi=require(li1IliiI(0xcc,'$chy')),l11iIili=require(li1IliiI(0xac,'BnlK')),{loreal_savePrize:iiIIiIli}=require('./function/krsavePrize'),ll11I1=process[li1IliiI(0x129,'R$dT')]['jd_lzkj_loreal_dailyGrabs_url']||'',illIIlII=process[li1IliiI(0x12a,'GJ8E')][li1IliiI(0x2cb,'GJ8E')]==='true',l1IiIII=process[li1IliiI(0x1ac,'@gW)')]['jd
|
2023-10-02 19:29:33 +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"])
|