faker3/jd_qqxing.js

18 lines
82 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
2024-08-05 01:10:00 +08:00
活动名称星系牧场
环境变量jd_qqxing_interval // 自定义运行间隔时长整数单位毫秒默认1000
jd_qqxing_opendraw // 是否开启抽奖true/false默认不开启
jd_qqxing_exchange // 是否开启兑换奖品true/false默认不开启
jd_qqxing_openfeed // 是否开启喂养true/false默认不开启
jd_qqxing_notify // 是否推送通知true/false默认不推送
jd_qqxing_pinFilter // 账号pin过滤多个用@进行分割
cron:1 1 1 1 *
2024-06-28 15:38:28 +08:00
*/
2024-08-05 01:10:00 +08:00
const $ = new Env('星系牧场')
2024-08-06 11:31:07 +08:00
var il='jsjiami.com.v7';const l1lIIi=iii1II;(function(I1IIll,i1Ii1,lIilII,ilIlli,I1IIlI,ilIlll,Ii1Iii){return I1IIll=I1IIll>>0x4,ilIlll='hs',Ii1Iii='hs',function(Ii1Iil,ll1IiI,li1li,iIIIll,ll1Ii1){const III1ll=iii1II;iIIIll='tfi',ilIlll=iIIIll+ilIlll,ll1Ii1='up',Ii1Iii+=ll1Ii1,ilIlll=li1li(ilIlll),Ii1Iii=li1li(Ii1Iii),li1li=0x0;const li1ll=Ii1Iil();while(!![]&&--ilIlli+ll1IiI){try{iIIIll=parseInt(III1ll(0x16c,'g[T*'))/0x1+parseInt(III1ll(0x418,'(V9)'))/0x2+-parseInt(III1ll(0x407,'UlRF'))/0x3*(parseInt(III1ll(0x44a,'OUk3'))/0x4)+-parseInt(III1ll(0x48b,'#o5d'))/0x5*(-parseInt(III1ll(0x31a,'d3gb'))/0x6)+parseInt(III1ll(0x3e1,'bc18'))/0x7*(-parseInt(III1ll(0x3f1,'vGaT'))/0x8)+-parseInt(III1ll(0x357,'83KM'))/0x9+-parseInt(III1ll(0x356,'i#^r'))/0xa;}catch(iliii1){iIIIll=li1li;}finally{ll1Ii1=li1ll[ilIlll]();if(I1IIll<=ilIlli)li1li?I1IIlI?iIIIll=ll1Ii1:I1IIlI=ll1Ii1:li1li=ll1Ii1;else{if(li1li==I1IIlI['replace'](/[NGeWdDnqVAktXbuwCQSyEH=]/g,'')){if(iIIIll===ll1IiI){li1ll['un'+ilIlll](ll1Ii1);break;}li1ll[Ii1Iii](ll1Ii1);}}}}}(lIilII,i1Ii1,function(i1IiI,lIllil,iilIi1,I111,I1I11l,I1I11i,l1iI1l){return lIllil='\x73\x70\x6c\x69\x74',i1IiI=arguments[0x0],i1IiI=i1IiI[lIllil](''),iilIi1=`\x72\x65\x76\x65\x72\x73\x65`,i1IiI=i1IiI[iilIi1]('\x76'),I111=`\x6a\x6f\x69\x6e`,(0x17c8df,i1IiI[I111](''));});}(0xbf0,0x78e89,Iii11l,0xc1),Iii11l)&&(il=0xab4);const jdCookie=require('./jdCookie'),notify=require(l1lIIi(0x441,'eHS5')),common=require(l1lIIi(0x18f,'@X[9')),getToken=require(l1lIIi(0x293,'Fh]]')),{lzdz_savePrize}=require(l1lIIi(0x272,'bc18'));let taskThreads=process['env']['jd_qqxing__threads']||'1';const runInterval=process[l1lIIi(0x1bb,'eRF[')]['jd_qqxing_interval']||'1000',isNotify=(process['env']['jd_qqxing_notify']||process['env'][l1lIIi(0x4c0,'G5Bl')])===l1lIIi(0x3db,'huCZ'),pinFilter=(process[l1lIIi(0x491,'GGZv')][l1lIIi(0x445,'LX51')]||'')[l1lIIi(0x3a6,'%DXi')]('@'),opendraw=process[l1lIIi(0x427,'LX51')][l1lIIi(0x2f8,'Qgti')]===l1lIIi(0x3b4,'Q(6b'),exchangestatus=process['env'][l1lIIi(0x450,'jePc')]===l1lIIi(0x478,'aGMD'),openfeed=process['env']['jd_qqxing_openfeed']==='true',maxThreads=0x3;let hasGetBasicInfo=![],shareUuid='',authorCode='',shareCodes=[],needRemoveCodes=[],myhelpnum=0x0,myhelpname='',myhelpstatus=![],domains=l1lIIi(0x2d0,'vGaT'),cookiesArr=Object[l1lIIi(0x1d2,'Qgti')](jdCookie)[l1lIIi(0x46a,'v7hP')](iiiI1I=>jdCookie[iiiI1I])[l1lIIi(0x26b,'OUk3')](lilI11=>lilI11);!cookiesArr[0x0]&&($['msg']($[l1lIIi(0x2b9,'#yHb')],l1lIIi(0x48f,'@Y7*')),process[l1lIIi(0x231,'k0hr')](0x1));function iii1II(_0x1f9893,_0x234e51){const _0x867e15=Iii11l();return iii1II=function(_0x349e1f,_0x572d4e){_0x349e1f=_0x349e1f-0x124;let _0x4ea42b=_0x867e15[_0x349e1f];if(iii1II['imqSSQ']===undefined){var _0x4cd902=function(_0x385dad){const _0x1e3fed='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x16ac90='',_0x1c590f='';for(let _0x2652a3=0x0,_0x5121df,_0x401462,_0x4b219f=0x0;_0x401462=_0x385dad['charAt'](_0x4b219f++);~_0x401462&&(_0x5121df=_0x2652a3%0x4?_0x5121df*0x40+_0x401462:_0x401462,_0x2652a3++%0x4)?_0x16ac90+=String['fromCharCode'](0xff&_0x5121df>>(-0x2*_0x2652a3&0x6)):0x0){_0x401462=_0x1e3fed['indexOf'](_0x401462);}for(let _0x556cb8=0x0,_0xe0a92f=_0x16ac90['length'];_0x556cb8<_0xe0a92f;_0x556cb8++){_0x1c590f+='%'+('00'+_0x16ac90['charCodeAt'](_0x556cb8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1c590f);};const _0x2fe643=function(_0x13daa0,_0xb1473a){let _0x4011d3=[],_0x355c05=0x0,_0x40f2bd,_0x1cafee='';_0x13daa0=_0x4cd902(_0x13daa0);let _0x7c04c3;for(_0x7c04c3=0x0;_0x7c04c3<0x100;_0x7c04c3++){_0x4011d3[_0x7c04c3]=_0x7c04c3;}for(_0x7c04c3=0x0;_0x7c04c3<0x100;_0x7c04c3++){_0x355c05=(_0x355c05+_0x4011d3[_0x7c04c3]+_0xb1473a['charCodeAt'](_0x7c04c3%_0xb1473a['length']))%0x100,_0x40f2bd=_0x4011d3[_0x7c04c3],_0x4011d3[_0x7c04c3]=_0x4011d3[_0x355c05],_0x4011d3[_0x355c05]=_0x40f2bd;}_0x7c04c3=0x0,_0x355c05=0x0;for(let _0x2f6860=0x0;_0x2f6860<_0x13daa0['length'];_0x2f6860++){_0x7c04c3=(_0x7c04c3+0x1)%0x100,_0x355c05=(_0x355c05+_0x4011d3[_0x7c04c3])%0x100,_0x40f2bd=_0x4011d3[_0x7c04c3],_0x4011d3[_
2024-08-05 01:10:00 +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}getSimpleActInfoVoGotEnv(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["Con