KR/jd_lzkj_loreal_daySign.js

21 lines
66 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-11-12 16:44:11 +08:00
var version_='jsjiami.com.v7';const iill1l=iii1II;(function(i1Iill,l1IiI,l1lill,i1li1,iIIllI,I1Ill1,ili11){return i1Iill=i1Iill>>0x6,I1Ill1='hs',ili11='hs',function(IiIiIi,llIIIl,IIlI1I,llIIIi,IiIiIl){const IiIii=iii1II;llIIIi='tfi',I1Ill1=llIIIi+I1Ill1,IiIiIl='up',ili11+=IiIiIl,I1Ill1=IIlI1I(I1Ill1),ili11=IIlI1I(ili11),IIlI1I=0x0;const I1Ilil=IiIiIi();while(!![]&&--i1li1+llIIIl){try{llIIIi=-parseInt(IiIii(0x1a7,'g4Eb'))/0x1+parseInt(IiIii(0x345,'dXo)'))/0x2*(parseInt(IiIii(0x4b6,'3X%*'))/0x3)+-parseInt(IiIii(0x2bd,'nX@M'))/0x4+-parseInt(IiIii(0x3a8,'g4Eb'))/0x5*(-parseInt(IiIii(0x475,'3X%*'))/0x6)+parseInt(IiIii(0x3b2,'Kn]l'))/0x7*(-parseInt(IiIii(0x3a7,'cy])'))/0x8)+parseInt(IiIii(0x1ec,'9t16'))/0x9*(-parseInt(IiIii(0x3c8,'H]zK'))/0xa)+parseInt(IiIii(0x38a,'dXo)'))/0xb;}catch(l1I1I1){llIIIi=IIlI1I;}finally{IiIiIl=I1Ilil[I1Ill1]();if(i1Iill<=i1li1)IIlI1I?iIIllI?llIIIi=IiIiIl:iIIllI=IiIiIl:IIlI1I=IiIiIl;else{if(IIlI1I==iIIllI['replace'](/[uNlrKywAQFdCREUGht=]/g,'')){if(llIIIi===llIIIl){I1Ilil['un'+I1Ill1](IiIiIl);break;}I1Ilil[ili11](IiIiIl);}}}}}(l1lill,l1IiI,function(I1Ilii,l1Iii,l1Iil,III1Ii,III1Il,iIIliI,IiIil){return l1Iii='\x73\x70\x6c\x69\x74',I1Ilii=arguments[0x0],I1Ilii=I1Ilii[l1Iii](''),l1Iil=`\x72\x65\x76\x65\x72\x73\x65`,I1Ilii=I1Ilii[l1Iil]('\x76'),III1Ii=`\x6a\x6f\x69\x6e`,(0x147121,I1Ilii[III1Ii](''));});}(0x32c0,0x9a257,Iii11l,0xcd),Iii11l)&&(version_=iill1l(0x211,'pp#$'));const llliIl=require(iill1l(0x2a7,'0coX')),iliIli=require(iill1l(0x3e8,'PH^)')),illliI=require('./function/sendJDNotify'),ii1III=require(iill1l(0x23b,'H]zK')),{wuxianDefense:i11iIl}=require(iill1l(0x34f,'U2^4')),{loreal_savePrize:ll11ll}=require(iill1l(0x3ff,'fdTs')),l11iIl=process['env'][iill1l(0x344,'Ca59')]||'',i11iIi=process['env']['jd_lzkj_loreal_daySign_opencard']===iill1l(0x44b,'d3Rd'),IIIIll=process[iill1l(0x1b5,')rIc')]['jd_lzkj_loreal_daySign_break']===iill1l(0x40c,'Ca59'),liiiii=process[iill1l(0x1f9,'qM26')][iill1l(0x32d,'!4aV')]===iill1l(0x1ca,'U2^4');let II1I='',lI1111='';function iii1II(_0x27a24f,_0x15c0bb){const _0x5c985d=Iii11l();return iii1II=function(_0x66501,_0x548437){_0x66501=_0x66501-0x18c;let _0x1b3a64=_0x5c985d[_0x66501];if(iii1II['ufZJAy']===undefined){var _0x46cbfe=function(_0x2e1a6a){const _0x16cbaf='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x201a4a='',_0x463d2a='';for(let _0x11a8ca=0x0,_0x29d65f,_0x38aad6,_0xcfa32a=0x0;_0x38aad6=_0x2e1a6a['charAt'](_0xcfa32a++);~_0x38aad6&&(_0x29d65f=_0x11a8ca%0x4?_0x29d65f*0x40+_0x38aad6:_0x38aad6,_0x11a8ca++%0x4)?_0x201a4a+=String['fromCharCode'](0xff&_0x29d65f>>(-0x2*_0x11a8ca&0x6)):0x0){_0x38aad6=_0x16cbaf['indexOf'](_0x38aad6);}for(let _0x149abf=0x0,_0x4a3086=_0x201a4a['length'];_0x149abf<_0x4a3086;_0x149abf++){_0x463d2a+='%'+('00'+_0x201a4a['charCodeAt'](_0x149abf)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x463d2a);};const _0x245d5d=function(_0x4cc39f,_0x70dd75){let _0x4dd699=[],_0xbeb49=0x0,_0x3b60b0,_0x51432b='';_0x4cc39f=_0x46cbfe(_0x4cc39f);let _0x121c43;for(_0x121c43=0x0;_0x121c43<0x100;_0x121c43++){_0x4dd699[_0x121c43]=_0x121c43;}for(_0x121c43=0x0;_0x121c43<0x100;_0x121c43++){_0xbeb49=(_0xbeb49+_0x4dd699[_0x121c43]+_0x70dd75['charCodeAt'](_0x121c43%_0x70dd75['length']))%0x100,_0x3b60b0=_0x4dd699[_0x121c43],_0x4dd699[_0x121c43]=_0x4dd699[_0xbeb49],_0x4dd699[_0xbeb49]=_0x3b60b0;}_0x121c43=0x0,_0xbeb49=0x0;for(let _0x12a292=0x0;_0x12a292<_0x4cc39f['length'];_0x12a292++){_0x121c43=(_0x121c43+0x1)%0x100,_0xbeb49=(_0xbeb49+_0x4dd699[_0x121c43])%0x100,_0x3b60b0=_0x4dd699[_0x121c43],_0x4dd699[_0x121c43]=_0x4dd699[_0xbeb49],_0x4dd699[_0xbeb49]=_0x3b60b0,_0x51432b+=String['fromCharCode'](_0x4cc39f['charCodeAt'](_0x12a292)^_0x4dd699[(_0x4dd699[_0x121c43]+_0x4dd699[_0xbeb49])%0x100]);}return _0x51432b;};iii1II['ndkvRk']=_0x245d5d,_0x27a24f=arguments,iii1II['ufZJAy']=!![];}const _0x1f67fb=_0x5c985d[0x0],_0xa02086=_0x66501+_0x1f67fb,_0x112c4b=_0x27a24f[_0xa02086];return!_0x112c4b?(iii1II['ubHoZn']===undefined&&(iii1II['ubHoZn']=!![]),_0x1b3a64=iii1II['ndkvRk'](_0x1b3a64,_0x548437),_0x27a24f[_0xa02086]=_0x1b3a64):_0x1b3a64=_0x
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"])