KR/jd_hcredrain.js

13 lines
37 KiB
JavaScript
Raw Permalink Normal View History

2023-07-27 16:14:01 +08:00
/*
远程获取自行运行
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#会场红包雨
1 1 1 1 * jd_hcredrain.js, tag=会场红包雨, enabled=true
*/
const $ = new Env('会场红包雨');
var version_='jsjiami.com.v7';const lIiliIli=I1iiili1;(function(Il1liII,Ii11lI11,il11iiiI,i1II1ll1,I1I1l1i1,Il1i1lil,Iil1llll){return Il1liII=Il1liII>>0x6,Il1i1lil='hs',Iil1llll='hs',function(lll1llll,llIli1ll,Iilll1,IIl11lIl,iI1I11il){const lIliiII1=I1iiili1;IIl11lIl='tfi',Il1i1lil=IIl11lIl+Il1i1lil,iI1I11il='up',Iil1llll+=iI1I11il,Il1i1lil=Iilll1(Il1i1lil),Iil1llll=Iilll1(Iil1llll),Iilll1=0x0;const IlI1iiIi=lll1llll();while(!![]&&--i1II1ll1+llIli1ll){try{IIl11lIl=-parseInt(lIliiII1(0x123,'H%&U'))/0x1+parseInt(lIliiII1(0x8d,'1h8p'))/0x2+-parseInt(lIliiII1(0xf4,'z1QB'))/0x3*(-parseInt(lIliiII1(0xc8,'xNX^'))/0x4)+parseInt(lIliiII1(0xc4,'cyc&'))/0x5+parseInt(lIliiII1(0x129,'O2wd'))/0x6+parseInt(lIliiII1(0x13a,'8Kuf'))/0x7*(-parseInt(lIliiII1(0x18a,'3zY8'))/0x8)+-parseInt(lIliiII1(0x12a,'XgGO'))/0x9;}catch(lill11li){IIl11lIl=Iilll1;}finally{iI1I11il=IlI1iiIi[Il1i1lil]();if(Il1liII<=i1II1ll1)Iilll1?I1I1l1i1?IIl11lIl=iI1I11il:I1I1l1i1=iI1I11il:Iilll1=iI1I11il;else{if(Iilll1==I1I1l1i1['replace'](/[CqOwlbQSPfpDVTBGrdULku=]/g,'')){if(IIl11lIl===llIli1ll){IlI1iiIi['un'+Il1i1lil](iI1I11il);break;}IlI1iiIi[Iil1llll](iI1I11il);}}}}}(il11iiiI,Ii11lI11,function(Iil1liiI,Ililllil,l1ll11i1,IlliI1I,lil1illl,iill1iii,iI1IiIIi){return Ililllil='\x73\x70\x6c\x69\x74',Iil1liiI=arguments[0x0],Iil1liiI=Iil1liiI[Ililllil](''),l1ll11i1='\x72\x65\x76\x65\x72\x73\x65',Iil1liiI=Iil1liiI[l1ll11i1]('\x76'),IlliI1I='\x6a\x6f\x69\x6e',(0x130db6,Iil1liiI[IlliI1I](''));});}(0x3180,0x615ae,iilIiiii,0xc8),iilIiiii)&&(version_=iilIiiii);const iIiI1ii=$[lIiliIli(0x14d,'H%&U')]()?require('./sendNotify'):'',illliIiI=$[lIiliIli(0x110,'C1sT')]()?require(lIiliIli(0x160,'q]#(')):'',l11lill=require(lIiliIli(0x12b,'5Uaw'));function I1iiili1(_0xd65108,_0x1ec6a2){const _0x928b0a=iilIiiii();return I1iiili1=function(_0xe27944,_0x10cfe2){_0xe27944=_0xe27944-0x87;let _0x11cda2=_0x928b0a[_0xe27944];if(I1iiili1['WPcxgR']===undefined){var _0x1d8d03=function(_0xe620c5){const _0x17479e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x220e49='',_0xe8297d='';for(let _0x5a191a=0x0,_0x225fc8,_0x470c94,_0x250a2a=0x0;_0x470c94=_0xe620c5['charAt'](_0x250a2a++);~_0x470c94&&(_0x225fc8=_0x5a191a%0x4?_0x225fc8*0x40+_0x470c94:_0x470c94,_0x5a191a++%0x4)?_0x220e49+=String['fromCharCode'](0xff&_0x225fc8>>(-0x2*_0x5a191a&0x6)):0x0){_0x470c94=_0x17479e['indexOf'](_0x470c94);}for(let _0x578ec0=0x0,_0x5a1284=_0x220e49['length'];_0x578ec0<_0x5a1284;_0x578ec0++){_0xe8297d+='%'+('00'+_0x220e49['charCodeAt'](_0x578ec0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xe8297d);};const _0x3f6e09=function(_0x22d2b0,_0x5d8bd7){let _0x244bbd=[],_0x5eea74=0x0,_0x271c69,_0x5229dc='';_0x22d2b0=_0x1d8d03(_0x22d2b0);let _0x1c30de;for(_0x1c30de=0x0;_0x1c30de<0x100;_0x1c30de++){_0x244bbd[_0x1c30de]=_0x1c30de;}for(_0x1c30de=0x0;_0x1c30de<0x100;_0x1c30de++){_0x5eea74=(_0x5eea74+_0x244bbd[_0x1c30de]+_0x5d8bd7['charCodeAt'](_0x1c30de%_0x5d8bd7['length']))%0x100,_0x271c69=_0x244bbd[_0x1c30de],_0x244bbd[_0x1c30de]=_0x244bbd[_0x5eea74],_0x244bbd[_0x5eea74]=_0x271c69;}_0x1c30de=0x0,_0x5eea74=0x0;for(let _0x53c4b5=0x0;_0x53c4b5<_0x22d2b0['length'];_0x53c4b5++){_0x1c30de=(_0x1c30de+0x1)%0x100,_0x5eea74=(_0x5eea74+_0x244bbd[_0x1c30de])%0x100,_0x271c69=_0x244bbd[_0x1c30de],_0x244bbd[_0x1c30de]=_0x244bbd[_0x5eea74],_0x244bbd[_0x5eea74]=_0x271c69,_0x5229dc+=String['fromCharCode'](_0x22d2b0['charCodeAt'](_0x53c4b5)^_0x244bbd[(_0x244bbd[_0x1c30de]+_0x244bbd[_0x5eea74])%0x100]);}return _0x5229dc;};I1iiili1['FStuoR']=_0x3f6e09,_0xd65108=arguments,I1iiili1['WPcxgR']=!![];}const _0x4d0f8e=_0x928b0a[0x0],_0x15bb2c=_0xe27944+_0x4d0f8e,_0x387c2f=_0xd65108[_0x15bb2c];return!_0x387c2f?(I1iiili1['mmUKst']===undefined&&(I1iiili1['mmUKst']=!![]),_0x11cda2=I1iiili1['FStuoR'](_0x11cda2,_0x10cfe2),_0xd65108[_0x15bb2c]=_0x11cda2):_0x11cda2=_0x387c2f,_0x11cda2;},I1iiili1(_0xd65108,_0x1ec6a2);}function iilIiiii(){const lIIlill=(function(){return[version_,'qCjSksluVjGuiPOaCLmUiQDB.pfcTdowmb.vQr7k==','vCk0W71nW5FcSSkyva7cVN5DfapcI8kvms3dGCoSWP8','W5XKW7e','gcJcNd17','tSk1nW','q2ieeSol','WR9pq8oFya','rmogCa
// 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.d