mirror of https://github.com/KingRan/KR.git
27 lines
92 KiB
JavaScript
27 lines
92 KiB
JavaScript
|
/*
|
|||
|
粉丝互动通用活动
|
|||
|
|
|||
|
会自动开卡店铺会员,最好只跑自己的账号
|
|||
|
|
|||
|
请求太频繁会被黑ip
|
|||
|
|
|||
|
变量:
|
|||
|
//export jd_wxFansInterActionActivity_activityId="活动ID、链接均可"
|
|||
|
//export JD_LZ_OPEN="false" //关闭LZ相关活动运行
|
|||
|
//export jd_wxFansInterActionActivity_blacklist="" //黑名单 用&隔开 pin值
|
|||
|
活动网址:
|
|||
|
//https://lzkjdz-isv.isvjcloud.com/wxFansInterActionActivity/activity/activity?activityId=xxxxxxx
|
|||
|
|
|||
|
cron:6 6 6 6 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#粉丝互动通用活动
|
|||
|
6 6 6 6 * jd_wxFansInterActionActivity.js, tag=粉丝互动通用活动, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
const $ = new Env('粉丝互动通用活动-加密');
|
|||
|
|
|||
|
var version_='jsjiami.com.v7';const lIl1iI=iii1II;(function(iI11i1,i1i1li,iIill,iil1Ii,iii11i,iii11l,l1Ilii){return iI11i1=iI11i1>>0x8,iii11l='hs',l1Ilii='hs',function(IIl11l,I111i1,lIl1i1,l1Ilil,iIili){const IIllI1=iii1II;l1Ilil='tfi',iii11l=l1Ilil+iii11l,iIili='up',l1Ilii+=iIili,iii11l=lIl1i1(iii11l),l1Ilii=lIl1i1(l1Ilii),lIl1i1=0x0;const i11l1I=IIl11l();while(!![]&&--iil1Ii+I111i1){try{l1Ilil=-parseInt(IIllI1(0x1da,'xeD8'))/0x1+parseInt(IIllI1(0x49f,'PM7C'))/0x2*(parseInt(IIllI1(0x1c0,'kdDu'))/0x3)+parseInt(IIllI1(0x3a1,'d]P3'))/0x4+-parseInt(IIllI1(0x396,'jTbo'))/0x5+parseInt(IIllI1(0x539,'$YJ5'))/0x6+parseInt(IIllI1(0x1f8,'U[XL'))/0x7+-parseInt(IIllI1(0x5aa,'ov(l'))/0x8;}catch(iil1Il){l1Ilil=lIl1i1;}finally{iIili=i11l1I[iii11l]();if(iI11i1<=iil1Ii)lIl1i1?iii11i?l1Ilil=iIili:iii11i=iIili:lIl1i1=iIili;else{if(lIl1i1==iii11i['replace'](/[ghkFtRHrWGlAXpDMCxduwS=]/g,'')){if(l1Ilil===I111i1){i11l1I['un'+iii11l](iIili);break;}i11l1I[l1Ilii](iIili);}}}}}(iIill,i1i1li,function(IlIll,liil,i11l11,IlIli,liIIIl,iliil1,i1i1ll){return liil='\x73\x70\x6c\x69\x74',IlIll=arguments[0x0],IlIll=IlIll[liil](''),i11l11='\x72\x65\x76\x65\x72\x73\x65',IlIll=IlIll[i11l11]('\x76'),IlIli='\x6a\x6f\x69\x6e',(0x13643b,IlIll[IlIli](''));});}(0xc900,0x5177b,Iii11l,0xcb),Iii11l)&&(version_=Iii11l);const iillI1=$[lIl1iI(0x488,'fYfx')]()?require(lIl1iI(0x521,'d]P3')):'',i11l1=$['isNode']()?require(lIl1iI(0x30a,'RBcT')):'',IlllI=require(lIl1iI(0x472,'vN4U'));let iliIl='https://lzkjdz-isv.isvjd.com',ii1i11=[],ll11II='',liIlII={};$['outFlag']=![],$[lIl1iI(0x550,'Geyz')]=![];let Il1I=process[lIl1iI(0x1cc,'^H9%')][lIl1iI(0x25e,'Bcrd')]?process[lIl1iI(0x45d,'vGyd')][lIl1iI(0x552,'ov(l')]:'';function iii1II(_0x1db7a6,_0x2ac1e3){const _0x24e2d1=Iii11l();return iii1II=function(_0x419d56,_0x250a7a){_0x419d56=_0x419d56-0x1aa;let _0x54074a=_0x24e2d1[_0x419d56];if(iii1II['GHyJgz']===undefined){var _0x3e6f93=function(_0x52da70){const _0x1dd037='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3e92cb='',_0x1fe094='';for(let _0x3ffd11=0x0,_0x4ed9a4,_0x49d12f,_0x57c342=0x0;_0x49d12f=_0x52da70['charAt'](_0x57c342++);~_0x49d12f&&(_0x4ed9a4=_0x3ffd11%0x4?_0x4ed9a4*0x40+_0x49d12f:_0x49d12f,_0x3ffd11++%0x4)?_0x3e92cb+=String['fromCharCode'](0xff&_0x4ed9a4>>(-0x2*_0x3ffd11&0x6)):0x0){_0x49d12f=_0x1dd037['indexOf'](_0x49d12f);}for(let _0x2041bf=0x0,_0x976c45=_0x3e92cb['length'];_0x2041bf<_0x976c45;_0x2041bf++){_0x1fe094+='%'+('00'+_0x3e92cb['charCodeAt'](_0x2041bf)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1fe094);};const _0x862be7=function(_0xc8d825,_0x1b3a25){let _0x258daa=[],_0x2bc477=0x0,_0x16afd1,_0x11e876='';_0xc8d825=_0x3e6f93(_0xc8d825);let _0x48ee1c;for(_0x48ee1c=0x0;_0x48ee1c<0x100;_0x48ee1c++){_0x258daa[_0x48ee1c]=_0x48ee1c;}for(_0x48ee1c=0x0;_0x48ee1c<0x100;_0x48ee1c++){_0x2bc477=(_0x2bc477+_0x258daa[_0x48ee1c]+_0x1b3a25['charCodeAt'](_0x48ee1c%_0x1b3a25['length']))%0x100,_0x16afd1=_0x258daa[_0x48ee1c],_0x258daa[_0x48ee1c]=_0x258daa[_0x2bc477],_0x258daa[_0x2bc477]=_0x16afd1;}_0x48ee1c=0x0,_0x2bc477=0x0;for(let _0x336879=0x0;_0x336879<_0xc8d825['length'];_0x336879++){_0x48ee1c=(_0x48ee1c+0x1)%0x100,_0x2bc477=(_0x2bc477+_0x258daa[_0x48ee1c])%0x100,_0x16afd1=_0x258daa[_0x48ee1c],_0x258daa[_0x48ee1c]=_0x258daa[_0x2bc477],_0x258daa[_0x2bc477]=_0x16afd1,_0x11e876+=String['fromCharCode'](_0xc8d825['charCodeAt'](_0x336879)^_0x258daa[(_0x258daa[_0x48ee1c]+_0x258daa[_0x2bc477])%0x100]);}return _0x11e876;};iii1II['nHlHYw']=_0x862be7,_0x1db7a6=arguments,iii1II['GHyJgz']=!![];}const _0x14008a=_0x24e2d1[0x0],_0x51c5be=_0x419d56+_0x14008a,_0x2f6529=_0x1db7a6[_0x51c5be];return!_0x2f6529?(iii1II['tFpmnu']===undefined&&(iii1II['tFpmnu']=!![]),_0x54074a=iii1II['nHlHYw'](_0x54074a,_0x250a7a),_0x1db7a6[_0x51c5be]=_0x54074a):_0x54074a=_0x2f6529,_0x54074a;},iii1II(_0x1db7a6,_0x2ac1e3);}if($[lIl1iI(0x1ed,'aLca')]()){Object[lIl1iI(0x57e,'jTbo')](iillI1)['forEach'](liIlI1=>{ii1i11['push'](iillI1[liIlI1]);});if(process[lIl1iI(0x529,'SfRG')][lIl1iI(0x50d,'Geyz')]&&process['env'][lIl1iI(0x4af,'RBcT')]==='false')console[lIl1iI(0x5a0,'2dQ5')]=()
|
|||
|
|
|||
|
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"])
|