mirror of https://github.com/KingRan/KR.git
23 lines
90 KiB
JavaScript
23 lines
90 KiB
JavaScript
|
/*
|
|||
|
活动名称:读秒拼手速 · 超级无线
|
|||
|
活动链接: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('读秒拼手速(超级无线)')
|
|||
|
var version_='jsjiami.com.v7';const lIl1I1=iii1II;(function(iII,l11IlI,lIIl,lIl1i,Iili1l,liIiil,l11Il1){return iII=iII>>0x9,liIiil='hs',l11Il1='hs',function(Iili1i,IIiIli,lIl1l,iIlIii,iiI111){const iI1l=iii1II;iIlIii='tfi',liIiil=iIlIii+liIiil,iiI111='up',l11Il1+=iiI111,liIiil=lIl1l(liIiil),l11Il1=lIl1l(l11Il1),lIl1l=0x0;const lIi111=Iili1i();while(!![]&&--lIl1i+IIiIli){try{iIlIii=-parseInt(iI1l(0x2cb,'0aqj'))/0x1*(parseInt(iI1l(0x3e9,'KZLO'))/0x2)+-parseInt(iI1l(0x389,'q(EE'))/0x3+-parseInt(iI1l(0x1b3,'w0[t'))/0x4*(parseInt(iI1l(0x47b,'[$)!'))/0x5)+parseInt(iI1l(0x24c,'j2@&'))/0x6*(parseInt(iI1l(0x1a1,'0aqj'))/0x7)+parseInt(iI1l(0x411,']ael'))/0x8+parseInt(iI1l(0x31d,'xjL7'))/0x9+parseInt(iI1l(0x408,'mKG5'))/0xa*(parseInt(iI1l(0x2bd,'X0*Y'))/0xb);}catch(iIlIi1){iIlIii=lIl1l;}finally{iiI111=lIi111[liIiil]();if(iII<=lIl1i)lIl1l?Iili1l?iIlIii=iiI111:Iili1l=iiI111:lIl1l=iiI111;else{if(lIl1l==Iili1l['replace'](/[MUfXYQFwtJTClhyOKqkN=]/g,'')){if(iIlIii===IIiIli){lIi111['un'+liIiil](iiI111);break;}lIi111[l11Il1](iiI111);}}}}}(lIIl,l11IlI,function(IIiIll,iIi,iI1i,liIiii,l11Ill,IIlliI,ilIil1){return iIi='\x73\x70\x6c\x69\x74',IIiIll=arguments[0x0],IIiIll=IIiIll[iIi](''),iI1i='\x72\x65\x76\x65\x72\x73\x65',IIiIll=IIiIll[iI1i]('\x76'),liIiii='\x6a\x6f\x69\x6e',(0x136449,IIiIll[liIiii](''));});}(0x18800,0xe510f,Iii11l,0xc6),Iii11l)&&(version_=Iii11l);const iI11lI=$[lIl1I1(0x452,'w#9E')]()?require(lIl1I1(0x4f6,'W2nK')):'',II1i11=$[lIl1I1(0x48a,'AwUV')]()?require(lIl1I1(0x35f,'$QVF')):'',IlillI=require(lIl1I1(0x200,'hXho')),I111l1=require('./function/krh5st'),iIliII=require('./function/krgetua'),iIii1I=require(lIl1I1(0x1d4,'w0[t'));let I1liI1={},I1ii11=[],IlIil='';if($['isNode']()){Object[lIl1I1(0x21e,'TEQ!')](iI11lI)[lIl1I1(0x1e6,'giKH')](IIllI1=>{I1ii11['push'](iI11lI[IIllI1]);});if(process['env'][lIl1I1(0x493,'9bjl')]&&process[lIl1I1(0x3e4,'uC)n')][lIl1I1(0x4ca,'wGu5')]===lIl1I1(0x4a2,'w0[t'))console['log']=()=>{};}else I1ii11=[$['getdata'](lIl1I1(0x4ce,'Ekho')),$[lIl1I1(0x385,')Atv')](lIl1I1(0x407,'W2nK')),...IlIli($[lIl1I1(0x234,'#S%)')]('CookiesJD')||'[]')[lIl1I1(0x15e,'Hv%y')](lIl1iI=>lIl1iI['cookie'])][lIl1I1(0x388,'8Yg9')](iil1II=>!!iil1II);allMessage='',message='',$['hotFlag']=![],$['outFlag']=![],$[lIl1I1(0x4eb,'*D$j')]=![];let iI11i1='',i1i1li='',iIill=process['env'][lIl1I1(0x28c,'0aqj')]?process['env']['jd_wxSecond_activityId']:'',iil1Ii=process['env'][lIl1I1(0x276,'cZ(6')]?process[lIl1I1(0x45f,'#S%)')][lIl1I1(0x4c2,')Atv')]:lIl1I1(0x421,'AwUV'),iii11i=process[lIl1I1(0x2d9,'kzDH')][lIl1I1(0xfb,'xjL7')]?process[lIl1I1(0x4b7,'w0[t')][lIl1I1(0x367,'cZ(6')]:'true',iii11l='',l1Ilii='';$[lIl1I1(0x2b7,'giKH')]=process[lIl1I1(0x35c,'PVHT')][lIl1I1(0x32d,'H@ZG')]||iii11l,$['blacklist']=process['env'][lIl1I1(0x208,'CON)')]||l1Ilii,liil(),iil1Il();iIill&&(iIill[lIl1I1(0x12a,'&5na')]('activityId=')?activityId=i1i1ll(''+iIill,lIl1I1(0xfc,'ccID')):activityId=iIill);!(async()=>{const I111I1=lIl1I1,iii11I={'VqlQA':I111I1(0x3f1,'Hv%y'),'aRJoS':'\x0a❌\x20\x20已设置全局关闭LZ相关活动\x0a','FkfzN':I111I1(0x1f3,'[$)!'),'ZVwYZ':'https://bean.m.jd.com/','Pnezp':function(IIil11,iI11iI){return IIil11<iI11iI;},'nhkVS':I111I1(0x1e1,'AwUV'),'hfYiB':function(l1IliI,liIIIi){return l1IliI(liIIIi);},'SxuCY':I111I1(0x3ae,'xjL7'),'Ywoni':function(iIilI,liii,iliilI){return iIilI(liii,iliilI);},'QRfvc':function(I111iI,IlIlI){return I111iI+IlIlI;},'wbqdS':function(IIil1I,II1i1l){return IIil1I*II1i1l;},'txjyL':function(II1i1i,Il1iiI){return II1i1i(Il1iiI);},'zbGiS':function(iIil1,l1IllI){return iIil1(l1IllI);}};if(iii11i===iii11I[I111I1(0x264,'TEQ!')]){console['log'](iii11I['aRJoS']);return;}if(!I1ii11[0x0]){$['msg']($['name'],iii11I[I111I1(0x1c1,'xjL7')],iii11I[I111I1(0x37c,'yIG*')],{'open-url':iii11I['ZVwYZ']});return;}$[I111I1(0x461,'*z@U')]=activityId,$['shareUuid']='',$[I111I1(0x1f7,'CON)')]=I111I1(0x4ba,'mKG5')+$[I111I1(0x2a3,'sZLr')],console[I111I1(0x32c,')Atv')]('活动入口:'+$[I111I1(0x1aa,'AwUV')]);for(let lIi1Ii=0x0;iii11I[I111I1(0x1b2,'wGu5')](lIi1Ii,I1ii11['length']);lIi1Ii++){if(iii11I['nhkVS']!=='OWrtz'){IlIil=I1ii11[lIi1Ii],
|
|||
|
// 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"])
|