mirror of https://github.com/KingRan/KR.git
27 lines
98 KiB
JavaScript
27 lines
98 KiB
JavaScript
|
/*
|
|||
|
LZ让福袋飞通用活动
|
|||
|
|
|||
|
会自动开卡店铺会员
|
|||
|
|
|||
|
请求太频繁会被黑ip
|
|||
|
|
|||
|
变量:
|
|||
|
//export jd_wxUnPackingActivity_activityId="活动ID、链接均可"
|
|||
|
//export jd_wxUnPackingActivity_blacklist='' // 黑名单 用&隔开 pin值
|
|||
|
//export JD_LZ_OPEN="false" //关闭LZ相关活动运行
|
|||
|
活动网址:
|
|||
|
//https://lzkjdz-isv.isvjcloud.com/wxUnPackingActivity/activity/activity?activityId=<活动id>
|
|||
|
|
|||
|
cron:6 6 6 6 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#LZ让福袋飞通用活动
|
|||
|
6 6 6 6 * jd_wxUnPackingActivity.js, tag=LZ让福袋飞通用活动, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('让福袋飞(超级无线)')
|
|||
|
var version_='jsjiami.com.v7';const l1liI=iii1II;function iii1II(_0xa3a13e,_0x3c1e9e){const _0x33a19e=Iii11l();return iii1II=function(_0x223ef8,_0x43b925){_0x223ef8=_0x223ef8-0x10f;let _0x1306e3=_0x33a19e[_0x223ef8];if(iii1II['ULHsDq']===undefined){var _0x3031a6=function(_0x3d0f18){const _0xc6970b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x530324='',_0x4343ef='';for(let _0x4126ed=0x0,_0x286788,_0x589335,_0x284e53=0x0;_0x589335=_0x3d0f18['charAt'](_0x284e53++);~_0x589335&&(_0x286788=_0x4126ed%0x4?_0x286788*0x40+_0x589335:_0x589335,_0x4126ed++%0x4)?_0x530324+=String['fromCharCode'](0xff&_0x286788>>(-0x2*_0x4126ed&0x6)):0x0){_0x589335=_0xc6970b['indexOf'](_0x589335);}for(let _0x20da59=0x0,_0x5a731e=_0x530324['length'];_0x20da59<_0x5a731e;_0x20da59++){_0x4343ef+='%'+('00'+_0x530324['charCodeAt'](_0x20da59)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4343ef);};const _0x581fe5=function(_0x334b2a,_0x5313bd){let _0x1418bc=[],_0x56f31c=0x0,_0x4c30be,_0x321014='';_0x334b2a=_0x3031a6(_0x334b2a);let _0x7e0f03;for(_0x7e0f03=0x0;_0x7e0f03<0x100;_0x7e0f03++){_0x1418bc[_0x7e0f03]=_0x7e0f03;}for(_0x7e0f03=0x0;_0x7e0f03<0x100;_0x7e0f03++){_0x56f31c=(_0x56f31c+_0x1418bc[_0x7e0f03]+_0x5313bd['charCodeAt'](_0x7e0f03%_0x5313bd['length']))%0x100,_0x4c30be=_0x1418bc[_0x7e0f03],_0x1418bc[_0x7e0f03]=_0x1418bc[_0x56f31c],_0x1418bc[_0x56f31c]=_0x4c30be;}_0x7e0f03=0x0,_0x56f31c=0x0;for(let _0xefc9e2=0x0;_0xefc9e2<_0x334b2a['length'];_0xefc9e2++){_0x7e0f03=(_0x7e0f03+0x1)%0x100,_0x56f31c=(_0x56f31c+_0x1418bc[_0x7e0f03])%0x100,_0x4c30be=_0x1418bc[_0x7e0f03],_0x1418bc[_0x7e0f03]=_0x1418bc[_0x56f31c],_0x1418bc[_0x56f31c]=_0x4c30be,_0x321014+=String['fromCharCode'](_0x334b2a['charCodeAt'](_0xefc9e2)^_0x1418bc[(_0x1418bc[_0x7e0f03]+_0x1418bc[_0x56f31c])%0x100]);}return _0x321014;};iii1II['SrtmKN']=_0x581fe5,_0xa3a13e=arguments,iii1II['ULHsDq']=!![];}const _0x2d5ec1=_0x33a19e[0x0],_0x1fc442=_0x223ef8+_0x2d5ec1,_0x1f6bd9=_0xa3a13e[_0x1fc442];return!_0x1f6bd9?(iii1II['sMqKes']===undefined&&(iii1II['sMqKes']=!![]),_0x1306e3=iii1II['SrtmKN'](_0x1306e3,_0x43b925),_0xa3a13e[_0x1fc442]=_0x1306e3):_0x1306e3=_0x1f6bd9,_0x1306e3;},iii1II(_0xa3a13e,_0x3c1e9e);}(function(iIil11,l1li1,IIllll,I1Iil1,lll1iI,iIllI1,lli11){return iIil11=iIil11>>0x6,iIllI1='hs',lli11='hs',function(IlIil1,lIIlil,l1I111,lIIlii,iI111){const ll1ill=iii1II;lIIlii='tfi',iIllI1=lIIlii+iIllI1,iI111='up',lli11+=iI111,iIllI1=l1I111(iIllI1),lli11=l1I111(lli11),l1I111=0x0;const Il1iI=IlIil1();while(!![]&&--I1Iil1+lIIlil){try{lIIlii=-parseInt(ll1ill(0x222,'Zfjg'))/0x1+-parseInt(ll1ill(0x29d,'GYn0'))/0x2*(parseInt(ll1ill(0x3d8,'BO86'))/0x3)+-parseInt(ll1ill(0x489,'nwXm'))/0x4*(parseInt(ll1ill(0x16e,'[r03'))/0x5)+parseInt(ll1ill(0x3d4,'QcBe'))/0x6+-parseInt(ll1ill(0x198,'#6]j'))/0x7*(parseInt(ll1ill(0x369,'#6]j'))/0x8)+-parseInt(ll1ill(0x23b,'#w0W'))/0x9+parseInt(ll1ill(0x1ce,'M7Id'))/0xa;}catch(iI1i1i){lIIlii=l1I111;}finally{iI111=Il1iI[iIllI1]();if(iIil11<=I1Iil1)l1I111?lll1iI?lIIlii=iI111:lll1iI=iI111:l1I111=iI111;else{if(l1I111==lll1iI['replace'](/[RMwWkHFlhJQfGubUOBPeV=]/g,'')){if(lIIlii===lIIlil){Il1iI['un'+iIllI1](iI111);break;}Il1iI[lli11](iI111);}}}}}(IIllll,l1li1,function(iIil1I,iI1i1l,IiI11I,ll1ili,il1liI,IiiiII,llilll){return iI1i1l='\x73\x70\x6c\x69\x74',iIil1I=arguments[0x0],iIil1I=iIil1I[iI1i1l](''),IiI11I='\x72\x65\x76\x65\x72\x73\x65',iIil1I=iIil1I[IiI11I]('\x76'),ll1ili='\x6a\x6f\x69\x6e',(0x136440,iIil1I[ll1ili](''));});}(0x32c0,0x53d1f,Iii11l,0xcd),Iii11l)&&(version_=Iii11l);const l11ll=$[l1liI(0x1e2,'nwXm')]()?require(l1liI(0x315,'nP!N')):'',Ii1ll=$['isNode']()?require(l1liI(0x483,'[r03')):'',iIlll=require(l1liI(0x384,'MA3B')),liII11=require(l1liI(0x215,'H6!D')),I1II=require(l1liI(0x2ee,'Z*&j')),iiii1=require(l1liI(0x1fb,'#@Xv'));let l1li1I={},iIlli1=[],I1IIIl='';if($[l1liI(0x3c8,'Qwq#')]()){Object['keys'](l11ll)[l1liI(0x53a,'B*BS')](lI1i=>{const llilli=l1liI;iIlli1[llilli(0x352,'VsEO')](l11ll[lI1i]);});if(process['env']['JD_DEBUG']&&process['env'][l1liI(0x3ee,'Zfjg')]===l1liI(0x3ae,'cQX3'))console[l1liI(0x2b7,'Z*&j')]=()=>{};}else
|
|||
|
// 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"])
|