KR/jd_wxSecond.js

23 lines
94 KiB
JavaScript
Raw Normal View History

2023-07-27 16:14:01 +08:00
/*
活动名称读秒拼手速 · 超级无线
活动链接https://lzkjdz-isv.isvjd.com/wxSecond/activity/activity?activityId=<活动id>
环境变量jd_wxSecond_activityId // 活动id、链接均可
jd_wxSecond_addCart // 是否做加购任务,默认不做
JD_LZ_OPEN //关闭LZ相关活动运行
jd_wxSecond_blacklist // 黑名单 用&隔开 pin值
默认助力第一个号脚本自动入会不想入会勿跑
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#读秒拼手速通用活动
1 1 1 1 * jd_wxSecond.js, tag=读秒拼手速通用活动, enabled=true
*/
const $ = new Env('读秒拼手速(超级无线)')
2023-08-01 17:37:39 +08:00
var version_='jsjiami.com.v7';const lIlIl1=iii1II;(function(Ili1li,lIlIil,I11lii,li1Ill,Ili1ll,IIl1Il,l1Iili){return Ili1li=Ili1li>>0x8,IIl1Il='hs',l1Iili='hs',function(IIi11l,l1Iill,iiiiIi,iiiiIl,IIi11i){const Ili1lI=iii1II;iiiiIl='tfi',IIl1Il=iiiiIl+IIl1Il,IIi11i='up',l1Iili+=IIi11i,IIl1Il=iiiiIi(IIl1Il),l1Iili=iiiiIi(l1Iili),iiiiIi=0x0;const iiIIli=IIi11l();while(!![]&&--li1Ill+l1Iill){try{iiiiIl=parseInt(Ili1lI(0x25d,'P$Xs'))/0x1+-parseInt(Ili1lI(0x3ff,'9oS4'))/0x2+-parseInt(Ili1lI(0x30d,'MW0o'))/0x3+-parseInt(Ili1lI(0x206,'YZDT'))/0x4*(parseInt(Ili1lI(0x2f6,'dZC$'))/0x5)+parseInt(Ili1lI(0x39b,'ijxU'))/0x6*(parseInt(Ili1lI(0x5dd,'P$Xs'))/0x7)+parseInt(Ili1lI(0x1ab,'!%EL'))/0x8*(-parseInt(Ili1lI(0x271,'w%(l'))/0x9)+parseInt(Ili1lI(0x4b6,'dZC$'))/0xa*(parseInt(Ili1lI(0x59e,'J%GN'))/0xb);}catch(iili){iiiiIl=iiiiIi;}finally{IIi11i=iiIIli[IIl1Il]();if(Ili1li<=li1Ill)iiiiIi?Ili1ll?iiiiIl=IIi11i:Ili1ll=IIi11i:iiiiIi=IIi11i;else{if(iiiiIi==Ili1ll['replace'](/[rwNGxQFMyJfACuISqhdED=]/g,'')){if(iiiiIl===l1Iill){iiIIli['un'+IIl1Il](IIi11i);break;}iiIIli[l1Iili](IIi11i);}}}}}(I11lii,lIlIil,function(IIl1Ii,ilIIl,I11ll1,lIIII,li1IlI,iiI1i,iiI1l){return ilIIl='\x73\x70\x6c\x69\x74',IIl1Ii=arguments[0x0],IIl1Ii=IIl1Ii[ilIIl](''),I11ll1='\x72\x65\x76\x65\x72\x73\x65',IIl1Ii=IIl1Ii[I11ll1]('\x76'),lIIII='\x6a\x6f\x69\x6e',(0x137315,IIl1Ii[lIIII](''));});}(0xc900,0x52db4,Iii11l,0xcb),Iii11l)&&(version_=Iii11l);const Il11i=$['isNode']()?require(lIlIl1(0x3af,'0RH%')):'',illl11=$['isNode']()?require(lIlIl1(0x4ff,'5zQV')):'',iiI1=require(lIlIl1(0x4eb,'xm%#')),Il11l=require(lIlIl1(0x23d,'805H')),l1iiil=require('./function/krgetua'),l1ilI=require(lIlIl1(0x31a,'YZDT'));let IIi1={},illl1i=[],l1iiii='';if($[lIlIl1(0x4cb,'B9Ja')]()){Object[lIlIl1(0x32e,'P$Xs')](Il11i)[lIlIl1(0x396,'yO9*')](illIIl=>{illl1i['push'](Il11i[illIIl]);});if(process[lIlIl1(0x3c1,'9oS4')][lIlIl1(0x48b,'eAJ6')]&&process[lIlIl1(0x268,'vbaA')][lIlIl1(0x293,'FLEF')]===lIlIl1(0x267,'FV@&'))console[lIlIl1(0x44c,'!%EL')]=()=>{};}else illl1i=[$['getdata'](lIlIl1(0x239,'UVGj')),$['getdata'](lIlIl1(0x56a,'FLEF')),...illIIi($[lIlIl1(0x2fa,'SQA)')](lIlIl1(0x455,'eAJ6'))||'[]')[lIlIl1(0x479,'xm%#')](iiiIlI=>iiiIlI['cookie'])][lIlIl1(0x506,'oH4[')](I1i11=>!!I1i11);allMessage='',message='',$['hotFlag']=![],$[lIlIl1(0x3d2,'Zm4n')]=![],$[lIlIl1(0x257,'B9Ja')]=![];function iii1II(_0x27d2e0,_0x1cca56){const _0xe036ea=Iii11l();return iii1II=function(_0xd07718,_0x251760){_0xd07718=_0xd07718-0x1a8;let _0x324d72=_0xe036ea[_0xd07718];if(iii1II['rRHdaO']===undefined){var _0x5317dc=function(_0x7f8f42){const _0x1c0593='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2e8949='',_0x37d2a3='';for(let _0x156c1d=0x0,_0xa2244f,_0x13a449,_0x3c10f1=0x0;_0x13a449=_0x7f8f42['charAt'](_0x3c10f1++);~_0x13a449&&(_0xa2244f=_0x156c1d%0x4?_0xa2244f*0x40+_0x13a449:_0x13a449,_0x156c1d++%0x4)?_0x2e8949+=String['fromCharCode'](0xff&_0xa2244f>>(-0x2*_0x156c1d&0x6)):0x0){_0x13a449=_0x1c0593['indexOf'](_0x13a449);}for(let _0xaf4475=0x0,_0x154d40=_0x2e8949['length'];_0xaf4475<_0x154d40;_0xaf4475++){_0x37d2a3+='%'+('00'+_0x2e8949['charCodeAt'](_0xaf4475)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x37d2a3);};const _0x35156a=function(_0x17a8e6,_0x185022){let _0x5567ef=[],_0x451023=0x0,_0x754bd4,_0x3a323a='';_0x17a8e6=_0x5317dc(_0x17a8e6);let _0x2368fc;for(_0x2368fc=0x0;_0x2368fc<0x100;_0x2368fc++){_0x5567ef[_0x2368fc]=_0x2368fc;}for(_0x2368fc=0x0;_0x2368fc<0x100;_0x2368fc++){_0x451023=(_0x451023+_0x5567ef[_0x2368fc]+_0x185022['charCodeAt'](_0x2368fc%_0x185022['length']))%0x100,_0x754bd4=_0x5567ef[_0x2368fc],_0x5567ef[_0x2368fc]=_0x5567ef[_0x451023],_0x5567ef[_0x451023]=_0x754bd4;}_0x2368fc=0x0,_0x451023=0x0;for(let _0x179e66=0x0;_0x179e66<_0x17a8e6['length'];_0x179e66++){_0x2368fc=(_0x2368fc+0x1)%0x100,_0x451023=(_0x451023+_0x5567ef[_0x2368fc])%0x100,_0x754bd4=_0x5567ef[_0x2368fc],_0x5567ef[_0x2368fc]=_0x5567ef[_0x451023],_0x5567ef[_0x451023]=_0x754bd4,_0x3a323a+=String['fromCharCode'](_0x17a8e6['charCodeAt'](_0x179e66)^_0x5567ef[(_0x5567ef[_0x2368fc]+_0x5567ef[_0x451023])%0x100
2023-07-27 16:14:01 +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"])