KR/jd_lzkj_loreal_know.js

24 lines
67 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-11-12 16:44:11 +08:00
var version_='jsjiami.com.v7';const IIIlii=iii1II;(function(i11ll,Ili11I,i11li,Illil,iil11i,Ill1II,llIili){return i11ll=i11ll>>0x4,Ill1II='hs',llIili='hs',function(Illii,iIlI11,IIII,l1IIlI,iil111){const illil1=iii1II;l1IIlI='tfi',Ill1II=l1IIlI+Ill1II,iil111='up',llIili+=iil111,Ill1II=IIII(Ill1II),llIili=IIII(llIili),IIII=0x0;const llIil1=Illii();while(!![]&&--Illil+iIlI11){try{l1IIlI=-parseInt(illil1(0x2a3,'ZjxG'))/0x1+parseInt(illil1(0x25f,'E9eR'))/0x2*(parseInt(illil1(0x289,'igS)'))/0x3)+-parseInt(illil1(0x208,'I0F^'))/0x4*(parseInt(illil1(0x4a0,']vlC'))/0x5)+parseInt(illil1(0x407,'!Hpe'))/0x6*(parseInt(illil1(0x303,'C[OW'))/0x7)+parseInt(illil1(0x2a6,'eDGn'))/0x8+parseInt(illil1(0x4c0,'^wKE'))/0x9+-parseInt(illil1(0x4e0,'8ALb'))/0xa*(parseInt(illil1(0x237,'PBAD'))/0xb);}catch(iiiIII){l1IIlI=IIII;}finally{iil111=llIil1[Ill1II]();if(i11ll<=Illil)IIII?iil11i?l1IIlI=iil111:iil11i=iil111:IIII=iil111;else{if(IIII==iil11i['replace'](/[DkRyeYXHIMtplWKFO=]/g,'')){if(l1IIlI===iIlI11){llIil1['un'+Ill1II](iil111);break;}llIil1[llIili](iil111);}}}}}(i11li,Ili11I,function(Ill1I1,lIi1ii,lIi1il,liI11i,l1l1l,illilI,IiIli){return lIi1ii='\x73\x70\x6c\x69\x74',Ill1I1=arguments[0x0],Ill1I1=Ill1I1[lIi1ii](''),lIi1il=`\x72\x65\x76\x65\x72\x73\x65`,Ill1I1=Ill1I1[lIi1il]('\x76'),liI11i=`\x6a\x6f\x69\x6e`,(0x147125,Ill1I1[liI11i](''));});}(0xc70,0x8ae7c,Iii11l,0xc9),Iii11l)&&(version_=IIIlii(0x433,'3#2u'));const li1I=require('./jdCookie'),IIliil=require('./function/jdCommon'),ll1liI=require(IIIlii(0x4fa,'!Hpe')),lI1iiI=require('./function/krgetToken'),{wuxianDefense:i11lII}=require(IIIlii(0x2c6,'tNia')),{loreal_savePrize:iIIlli}=require(IIIlii(0x207,'Px!X')),ll1li1=process['env'][IIIlii(0x39c,'T54G')]||'',iIIlll=process[IIIlii(0x4da,'igS)')]['jd_lzkj_loreal_know_opencard']===IIIlii(0x3fc,'W3#o'),I1iiiI=process['env'][IIIlii(0x2a1,'kROx')]===IIIlii(0x33c,'L8@q'),iiI1il=process[IIIlii(0x4df,'3#2u')][IIIlii(0x2d1,'OYJy')]==='true';let iiI1ii='',I1iii1='';const lilii1=Object[IIIlii(0x2af,'^wKE')](li1I)['map'](ll1lii=>li1I[ll1lii])[IIIlii(0x301,'^eeW')](li11=>li11);!lilii1[0x0]&&($[IIIlii(0x44a,']vlC')]($['name'],IIIlii(0x4db,'RocW')),process[IIIlii(0x202,'gr$b')](0x1));function iii1II(_0x201573,_0x29da3b){const _0x465476=Iii11l();return iii1II=function(_0x288ccb,_0xbc7f4d){_0x288ccb=_0x288ccb-0x1f1;let _0x51506d=_0x465476[_0x288ccb];if(iii1II['IaGdqE']===undefined){var _0x15e732=function(_0x1f044e){const _0x104de6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5a3433='',_0x17bd71='';for(let _0x2a0822=0x0,_0x175f63,_0x35f35c,_0x267234=0x0;_0x35f35c=_0x1f044e['charAt'](_0x267234++);~_0x35f35c&&(_0x175f63=_0x2a0822%0x4?_0x175f63*0x40+_0x35f35c:_0x35f35c,_0x2a0822++%0x4)?_0x5a3433+=String['fromCharCode'](0xff&_0x175f63>>(-0x2*_0x2a0822&0x6)):0x0){_0x35f35c=_0x104de6['indexOf'](_0x35f35c);}for(let _0x1a0e79=0x0,_0x29222c=_0x5a3433['length'];_0x1a0e79<_0x29222c;_0x1a0e79++){_0x17bd71+='%'+('00'+_0x5a3433['charCodeAt'](_0x1a0e79)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x17bd71);};const _0x35502b=function(_0x4b6b04,_0x3b9196){let _0x4a54c5=[],_0x59a04c=0x0,_0x52c677,_0x269b32='';_0x4b6b04=_0x15e732(_0x4b6b04);let _0xf31e55;for(_0xf31e55=0x0;_0xf31e55<0x100;_0xf31e55++){_0x4a54c5[_0xf31e55]=_0xf31e55;}for(_0xf31e55=0x0;_0xf31e55<0x100;_0xf31e55++){_0x59a04c=(_0x59a04c+_0x4a54c5[_0xf31e55]+_0x3b9196['charCodeAt'](_0xf31e55%_0x3b9196['length']))%0x100,_0x52c677=_0x4a54c5[_0xf31e55],_0x4a54c5[_0xf31e55]=_0x4a54c5[_0x59a04c],_0x4a54c5[_0x59a04c]=_0x52c677;}_0xf31e55=0x0,_0x59a04c=0x0;for(let _0x32a7b2=0x0;_0x32a7b2<_0x4b6b04['length'];_0x32a7b2++){_0xf31e55=(_0xf31e55+0x1)%0x100,_0x59a04c=(_0x59a04c+_0x4a54c5[_0xf31e55])%0x100,_0x52c677=_0x4a54c5[_0xf31e55],_0x4a54c5[_0xf31e55]=_0x4a54c5[_0x59a04c],_0x4a54c5[_0x59a04c]=_0x52c677,_0x269b32+=String['fromCharCode'](_0x4b6b04['charCodeAt'](_0x32a7b2)^_0x4a54c5[(_0x4a54c5[_0xf31e55]+_0x4a54c5[_0x59a04c])%0x100]);}return _0x269b32;};iii1II['GlIJEf']=_0x35502b,_0x201573=arguments,iii1II['IaGdqE']=!![];}const _0x4a266f=_0x465476[0x0],_0x3170f4=_0x288ccb+_0x4a266f,_0
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"])