mirror of https://github.com/KingRan/KR.git
23 lines
80 KiB
JavaScript
23 lines
80 KiB
JavaScript
|
/*
|
|||
|
活动名称:盖楼有礼 · 超级无线
|
|||
|
活动链接:https://lzkj-isv.isvjcloud.com/wxBuildActivity/activity?activityId=<活动id>
|
|||
|
活动变量:
|
|||
|
//export jd_wxBuildActivity_activityId="活动ID、链接均可"
|
|||
|
//export jd_wxBuildActivity_num //运行账号数量,默认运行前7
|
|||
|
//export jd_wxBuildActivity_openCard //是否开卡,需要开卡变量值为 true,默认不开卡
|
|||
|
//export JD_LZ_OPEN="false" //关闭LZ相关活动运行
|
|||
|
//export jd_wxBuildActivity_blacklist="" //黑名单 用&隔开 pin值
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#LZ盖楼有礼
|
|||
|
1 1 1 1 * jd_wxBuildActivity.js, tag=LZ盖楼有礼, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('盖楼有礼(超级无线)')
|
|||
|
var version_='jsjiami.com.v7';const ilIiiI=iii1II;(function(il1Ili,i1IlI1,IIlIli,IIlIll,l11liI,li11Ii,lIiIII){return il1Ili=il1Ili>>0x8,li11Ii='hs',lIiIII='hs',function(i1i,I1Il1l,I1Il1i,i1l,IlIiII){const iIlll1=iii1II;i1l='tfi',li11Ii=i1l+li11Ii,IlIiII='up',lIiIII+=IlIiII,li11Ii=I1Il1i(li11Ii),lIiIII=I1Il1i(lIiIII),I1Il1i=0x0;const iIliI=i1i();while(!![]&&--IIlIll+I1Il1l){try{i1l=parseInt(iIlll1(0x2a6,'3gXu'))/0x1+-parseInt(iIlll1(0x1e5,'GXjE'))/0x2+parseInt(iIlll1(0x7f,'gRrK'))/0x3*(parseInt(iIlll1(0x302,'y(*I'))/0x4)+parseInt(iIlll1(0x22c,'Mqed'))/0x5+-parseInt(iIlll1(0x212,'4QlP'))/0x6*(-parseInt(iIlll1(0x30f,'p3OX'))/0x7)+-parseInt(iIlll1(0x286,'p&^a'))/0x8+-parseInt(iIlll1(0x125,'9CVL'))/0x9*(-parseInt(iIlll1(0x172,'[rM#'))/0xa);}catch(i1IlII){i1l=I1Il1i;}finally{IlIiII=iIliI[li11Ii]();if(il1Ili<=IIlIll)I1Il1i?l11liI?i1l=IlIiII:l11liI=IlIiII:I1Il1i=IlIiII;else{if(I1Il1i==l11liI['replace'](/[KyqgSwuEWOkFbAN=]/g,'')){if(i1l===I1Il1l){iIliI['un'+li11Ii](IlIiII);break;}iIliI[lIiIII](IlIiII);}}}}}(IIlIli,i1IlI1,function(ilIii1,ll1III,ll1II1,l11lii,IIlIii,l11lil,iIllli){return ll1III='\x73\x70\x6c\x69\x74',ilIii1=arguments[0x0],ilIii1=ilIii1[ll1III](''),ll1II1='\x72\x65\x76\x65\x72\x73\x65',ilIii1=ilIii1[ll1II1]('\x76'),l11lii='\x6a\x6f\x69\x6e',(0x13645f,ilIii1[l11lii](''));});}(0xcc00,0xea625,Iii11l,0xce),Iii11l)&&(version_=Iii11l);function iii1II(_0x8289dc,_0x3b8a70){const _0x1e0aa4=Iii11l();return iii1II=function(_0x42b7b6,_0x25e2a2){_0x42b7b6=_0x42b7b6-0x68;let _0x25bdf8=_0x1e0aa4[_0x42b7b6];if(iii1II['ozSYyl']===undefined){var _0x2bf5e6=function(_0x27df1c){const _0x380a85='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x180b3c='',_0x51afbd='';for(let _0x4f8345=0x0,_0x5265a2,_0x36c82f,_0x393f6c=0x0;_0x36c82f=_0x27df1c['charAt'](_0x393f6c++);~_0x36c82f&&(_0x5265a2=_0x4f8345%0x4?_0x5265a2*0x40+_0x36c82f:_0x36c82f,_0x4f8345++%0x4)?_0x180b3c+=String['fromCharCode'](0xff&_0x5265a2>>(-0x2*_0x4f8345&0x6)):0x0){_0x36c82f=_0x380a85['indexOf'](_0x36c82f);}for(let _0x4a4b9b=0x0,_0x52dcd1=_0x180b3c['length'];_0x4a4b9b<_0x52dcd1;_0x4a4b9b++){_0x51afbd+='%'+('00'+_0x180b3c['charCodeAt'](_0x4a4b9b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x51afbd);};const _0x129644=function(_0x22c131,_0x39be60){let _0x1296f9=[],_0x59be0f=0x0,_0x5581a0,_0x2e343c='';_0x22c131=_0x2bf5e6(_0x22c131);let _0xfc0a09;for(_0xfc0a09=0x0;_0xfc0a09<0x100;_0xfc0a09++){_0x1296f9[_0xfc0a09]=_0xfc0a09;}for(_0xfc0a09=0x0;_0xfc0a09<0x100;_0xfc0a09++){_0x59be0f=(_0x59be0f+_0x1296f9[_0xfc0a09]+_0x39be60['charCodeAt'](_0xfc0a09%_0x39be60['length']))%0x100,_0x5581a0=_0x1296f9[_0xfc0a09],_0x1296f9[_0xfc0a09]=_0x1296f9[_0x59be0f],_0x1296f9[_0x59be0f]=_0x5581a0;}_0xfc0a09=0x0,_0x59be0f=0x0;for(let _0x3ff66d=0x0;_0x3ff66d<_0x22c131['length'];_0x3ff66d++){_0xfc0a09=(_0xfc0a09+0x1)%0x100,_0x59be0f=(_0x59be0f+_0x1296f9[_0xfc0a09])%0x100,_0x5581a0=_0x1296f9[_0xfc0a09],_0x1296f9[_0xfc0a09]=_0x1296f9[_0x59be0f],_0x1296f9[_0x59be0f]=_0x5581a0,_0x2e343c+=String['fromCharCode'](_0x22c131['charCodeAt'](_0x3ff66d)^_0x1296f9[(_0x1296f9[_0xfc0a09]+_0x1296f9[_0x59be0f])%0x100]);}return _0x2e343c;};iii1II['kzdouo']=_0x129644,_0x8289dc=arguments,iii1II['ozSYyl']=!![];}const _0x46fead=_0x1e0aa4[0x0],_0x149c3f=_0x42b7b6+_0x46fead,_0xdd3cbf=_0x8289dc[_0x149c3f];return!_0xdd3cbf?(iii1II['xszIkh']===undefined&&(iii1II['xszIkh']=!![]),_0x25bdf8=iii1II['kzdouo'](_0x25bdf8,_0x25e2a2),_0x8289dc[_0x149c3f]=_0x25bdf8):_0x25bdf8=_0xdd3cbf,_0x25bdf8;},iii1II(_0x8289dc,_0x3b8a70);}const ll1Iil=$[ilIiiI(0x102,'Fh#V')]()?require(ilIiiI(0x1eb,'ymSN')):'',li1lI=$[ilIiiI(0x384,'olrO')]()?require(ilIiiI(0x3d6,'fyg3')):'',iliiiI=require('./function/krgetToken'),IIlIII=require(ilIiiI(0x24c,'p3OX')),i1Iil=require(ilIiiI(0x19c,'*ZBH')),lIi11i=require('./function/krwxSavePrize');let i1Iii={},IIiI1I=[],lIi11l='';if($[ilIiiI(0x384,'olrO')]()){Object['keys'](ll1Iil)['forEach'](I1IIll=>{const I1Il1I=ilIiiI;IIiI1I[I1Il1I(0x2d8,'YZtG')](ll1Iil[I1IIll]);});if(process[ilIiiI(0x313,'dk7N')]['JD_DEBUG']&&process[ilIiiI(0x3c4,'fpOj')]['JD_DEBUG']===ilIiiI(0x335,'9CVL'))console
|
|||
|
// 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"])
|