KR/jd_lzkj_loreal_know.js

24 lines
74 KiB
JavaScript
Raw Normal View History

2023-10-06 11:59:10 +08:00
/*
活动名称知识超人超级无线
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10039&templateId=<模板id>&activityId=<活动id>&prd=cjwx
https://lzkj-isv.isvjcloud.com/prod/cc/interaction/v1/index?activityType=10039&templateId=<模板id>&activityId=<活动id>&prd=cjwx
环境变量jd_lzkj_loreal_know_url // 活动链接
jd_lzkj_loreal_know_opencard // 是否入会true/false默认不入会
jd_lzkj_loreal_know_Notify // 是否推送通知true/false默认不推送
jd_lzkj_loreal_know_break // 493后继续执行默认退出运行true/false
活动接口没有登记正确答案所以脚本可能会出现答题失败的情况不过脚本会自动排除错误答案为了提高头部账号的成功率脚本采用倒序运行账号
2023-10-06 20:00:10 +08:00
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#知识超人超级无线
1 1 1 1 * jd_lzkj_loreal_know.js, tag=知识超人超级无线, enabled=true
2023-10-06 11:59:10 +08:00
*/
const $ = new Env('知识超人(超级无线)')
2023-10-07 11:15:34 +08:00
var version_='jsjiami.com.v7';const lIi1Iii1=lII1ilil;(function(ilIlIii,i1I1Ii1i,iiIili,i1iillI,I1l1lIi1,lI1Ili1I,lIlIIIlI){return ilIlIii=ilIlIii>>0x8,lI1Ili1I='hs',lIlIIIlI='hs',function(I1ll11II,I1llI1i,lliIllI,Iil1lliI,lliI1i){const Ili1Ii=lII1ilil;Iil1lliI='tfi',lI1Ili1I=Iil1lliI+lI1Ili1I,lliI1i='up',lIlIIIlI+=lliI1i,lI1Ili1I=lliIllI(lI1Ili1I),lIlIIIlI=lliIllI(lIlIIIlI),lliIllI=0x0;const Il1lll=I1ll11II();while(!![]&&--i1iillI+I1llI1i){try{Iil1lliI=parseInt(Ili1Ii(0x163,'(@Cm'))/0x1+parseInt(Ili1Ii(0xc1,'(Rg]'))/0x2+parseInt(Ili1Ii(0x37a,'[sr&'))/0x3+parseInt(Ili1Ii(0x174,'x2FE'))/0x4+parseInt(Ili1Ii(0xa5,'q]x%'))/0x5*(-parseInt(Ili1Ii(0x165,'g106'))/0x6)+parseInt(Ili1Ii(0x2d8,'0&Q6'))/0x7+-parseInt(Ili1Ii(0x298,'fvOO'))/0x8;}catch(Illii1Ii){Iil1lliI=lliIllI;}finally{lliI1i=Il1lll[lI1Ili1I]();if(ilIlIii<=i1iillI)lliIllI?I1l1lIi1?Iil1lliI=lliI1i:I1l1lIi1=lliI1i:lliIllI=lliI1i;else{if(lliIllI==I1l1lIi1['replace'](/[XkbpxVLIJUhuDYnTGqMKy=]/g,'')){if(Iil1lliI===I1llI1i){Il1lll['un'+lI1Ili1I](lliI1i);break;}Il1lll[lIlIIIlI](lliI1i);}}}}}(iiIili,i1I1Ii1i,function(lII1Il11,lIil111I,Ill1lili,IiiiIIll,Ii1I11Il,lIliIiIl,l11lllii){return lIil111I='\x73\x70\x6c\x69\x74',lII1Il11=arguments[0x0],lII1Il11=lII1Il11[lIil111I](''),Ill1lili=`\x72\x65\x76\x65\x72\x73\x65`,lII1Il11=lII1Il11[Ill1lili]('\x76'),IiiiIIll=`\x6a\x6f\x69\x6e`,(0x1411a2,lII1Il11[IiiiIIll](''));});}(0xc600,0x44822,li1IIiIl,0xc8),li1IIiIl)&&(version_=li1IIiIl);const IiiIIi11=require(lIi1Iii1(0xb4,'ttaL')),IillIl11=require(lIi1Iii1(0x36a,'Qs08')),I1l1ii1I=require(lIi1Iii1(0x38c,'Qs08')),l11I1iI1=require('./function/krgetToken'),{loreal_savePrize:I1lIii1l}=require('./function/krsavePrize'),IlI1li1=process[lIi1Iii1(0x12e,'(Rg]')][lIi1Iii1(0x32e,'bQPn')]||'',iIl1I1ll=process[lIi1Iii1(0x140,'pZrF')]['jd_lzkj_loreal_know_opencard']===lIi1Iii1(0x303,'fPCe'),l1l1I1Ii=process[lIi1Iii1(0x125,'ro(Z')]['jd_lzkj_loreal_know_break']===lIi1Iii1(0x16a,'Eef1'),IiIl1II1=process[lIi1Iii1(0x257,'#pvv')]['jd_lzkj_loreal_know_Notify']===lIi1Iii1(0x335,'hy]m');function lII1ilil(_0x1bf64a,_0xe0ab9b){const _0x4fe885=li1IIiIl();return lII1ilil=function(_0x55d7b9,_0xc02411){_0x55d7b9=_0x55d7b9-0x7e;let _0x19a24=_0x4fe885[_0x55d7b9];if(lII1ilil['FXbNJK']===undefined){var _0x4c20a9=function(_0x422eb9){const _0x284d87='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x134d66='',_0x5c796f='';for(let _0xc71065=0x0,_0x45b899,_0x22e8fc,_0x18a46f=0x0;_0x22e8fc=_0x422eb9['charAt'](_0x18a46f++);~_0x22e8fc&&(_0x45b899=_0xc71065%0x4?_0x45b899*0x40+_0x22e8fc:_0x22e8fc,_0xc71065++%0x4)?_0x134d66+=String['fromCharCode'](0xff&_0x45b899>>(-0x2*_0xc71065&0x6)):0x0){_0x22e8fc=_0x284d87['indexOf'](_0x22e8fc);}for(let _0x2188bf=0x0,_0x333c8f=_0x134d66['length'];_0x2188bf<_0x333c8f;_0x2188bf++){_0x5c796f+='%'+('00'+_0x134d66['charCodeAt'](_0x2188bf)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5c796f);};const _0x3f53a1=function(_0x57dc57,_0x502df9){let _0x5e307f=[],_0x26ed06=0x0,_0x20d170,_0x1247ae='';_0x57dc57=_0x4c20a9(_0x57dc57);let _0x3f41ec;for(_0x3f41ec=0x0;_0x3f41ec<0x100;_0x3f41ec++){_0x5e307f[_0x3f41ec]=_0x3f41ec;}for(_0x3f41ec=0x0;_0x3f41ec<0x100;_0x3f41ec++){_0x26ed06=(_0x26ed06+_0x5e307f[_0x3f41ec]+_0x502df9['charCodeAt'](_0x3f41ec%_0x502df9['length']))%0x100,_0x20d170=_0x5e307f[_0x3f41ec],_0x5e307f[_0x3f41ec]=_0x5e307f[_0x26ed06],_0x5e307f[_0x26ed06]=_0x20d170;}_0x3f41ec=0x0,_0x26ed06=0x0;for(let _0x42235b=0x0;_0x42235b<_0x57dc57['length'];_0x42235b++){_0x3f41ec=(_0x3f41ec+0x1)%0x100,_0x26ed06=(_0x26ed06+_0x5e307f[_0x3f41ec])%0x100,_0x20d170=_0x5e307f[_0x3f41ec],_0x5e307f[_0x3f41ec]=_0x5e307f[_0x26ed06],_0x5e307f[_0x26ed06]=_0x20d170,_0x1247ae+=String['fromCharCode'](_0x57dc57['charCodeAt'](_0x42235b)^_0x5e307f[(_0x5e307f[_0x3f41ec]+_0x5e307f[_0x26ed06])%0x100]);}return _0x1247ae;};lII1ilil['TqiKac']=_0x3f53a1,_0x1bf64a=arguments,lII1ilil['FXbNJK']=!![];}const _0x3118de=_0x4fe885[0x0],_0x11df36=_0x55d7b9+_0x3118de,_0x36011b=_0x1bf64a[_0x11df36];return!_0x36011b?(lII1ilil['vbWsaG']===undefined&&(lII1ilil['vbWsaG']=!![]),_0x19a24=lII1ilil['TqiKac'](_0x19a24
2023-10-06 11:59:10 +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"])