jdpro/jd_redrain_hby.js

12 lines
24 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
京豆红包雨
cron:1 1 1 1 * jd_redrain_hby.js
*/
const $ = new Env('京豆红包雨')
var il='jsjiami.com.v7';const IlI1il=iii1II;if(function(l1lIl1,IiiIlI,Iilli1,I1l1Il,llIll1,Illl1l,Illl1i){return l1lIl1=l1lIl1>>0x3,Illl1l='hs',Illl1i='hs',function(lIIiil,l1lIii,I11iI1,l1lIil,IiiIli){const IIlii=iii1II;l1lIil='tfi',Illl1l=l1lIil+Illl1l,IiiIli='up',Illl1i+=IiiIli,Illl1l=I11iI1(Illl1l),Illl1i=I11iI1(Illl1i),I11iI1=0x0;const iillli=lIIiil();while(!![]&&--I1l1Il+l1lIii){try{l1lIil=-parseInt(IIlii(0x166,']6bS'))/0x1*(parseInt(IIlii(0x159,'tUS0'))/0x2)+parseInt(IIlii(0x1d6,'U4(S'))/0x3*(parseInt(IIlii(0x17c,'BaCJ'))/0x4)+parseInt(IIlii(0x1a7,'tfLb'))/0x5*(-parseInt(IIlii(0x167,'bRNg'))/0x6)+-parseInt(IIlii(0x1b8,']6bS'))/0x7+-parseInt(IIlii(0x1ad,'a3!0'))/0x8*(parseInt(IIlii(0x18f,'TgI9'))/0x9)+parseInt(IIlii(0x155,'tfLb'))/0xa+parseInt(IIlii(0x1a4,'Qnc2'))/0xb*(parseInt(IIlii(0x1b6,'LRXG'))/0xc);}catch(I1l1Ii){l1lIil=I11iI1;}finally{IiiIli=iillli[Illl1l]();if(l1lIl1<=I1l1Il)I11iI1?llIll1?l1lIil=IiiIli:llIll1=IiiIli:I11iI1=IiiIli;else{if(I11iI1==llIll1['replace'](/[QfMexuOThtYqbVwyDCX=]/g,'')){if(l1lIil===l1lIii){iillli['un'+Illl1l](IiiIli);break;}iillli[Illl1i](IiiIli);}}}}}(Iilli1,IiiIlI,function(I1i11i,I1i11l,llIlii,llIlil,IIlil,ilI1lI,IiiIll){return I1i11l='\x73\x70\x6c\x69\x74',I1i11i=arguments[0x0],I1i11i=I1i11i[I1i11l](''),llIlii=`\x72\x65\x76\x65\x72\x73\x65`,I1i11i=I1i11i[llIlii]('\x76'),llIlil=`\x6a\x6f\x69\x6e`,(0x169fc7,I1i11i[llIlil](''));});}(0x648,0xcd643,Iii11l,0xcb),Iii11l){}const jdCookie=require('./jdCookie'),notify=require(IlI1il(0x1aa,'4jGn')),common=require(IlI1il(0x1c2,'w1jW')),isNotify=![];function Iii11l(){const l1lIll=(function(){return[...[il,'tXujqwYsjifawVMmxieb.tOfcToemyD.vhQ7DhVC==','WOudWQpcUCo3','WRecW6tcUmkiymkeW5tcImoitbi','lxmEec8','gxxcHq','BZ3cUmodjSkCcq','WRGiW6RcTGf3qKinzwa','rmkYW73cVx7cKW','cbiNyYHwuCkMFMDMuq','D+IUMUAXV+wKVoI0NuJINRJcNq','W4XFoZT+ht7dGCkvW7dcNqad','W7NcUSk2WRCPbh7dKa','W6tdTSkkWP7cTSoaCa','W6TBWRy','sCkgpq','CSoEWRfizd7dIYyyW4bqFCoIW4G6WRiUWOu8','DavhBMxdH8oxjSozw8kW','sSoAW4hdP30','vbm9','cCoOcSoHlmohFow+RUwMQUobH+s4U+s4MUI3M+wmSq','W7JcHSoxaSkcWRC1hmkzWQexWQHTj8onzwyaWPjAW4BdMmob','tmo7W5NcLmkwWP3dPgC','B8kTrW','5B+W5Aw3566e','hSk3bmk6WR4AW4TpWOCDECo4lSk9zbWlWPbXWQjyWQFcG8oSBmkNrhJcI3vzrmoej8oDCCkgWOJdOW','imo/WRhcSSoi','Cd3cQW','uSoIWQ/dJ8kYftZcL8o1','zdhdISoLWPG','x8oAW7ZdG08','jxujkq','gx/cJmoEfxi','nmk0b8kVW4y','WPRdTsVcUmodvG','uSkUW6VcUx7cTsHnwItdNW','rCo1qSo6WRynWR1dWRiPEmko','WRhdJmoraZW','x8oBW4FdLNxdOJu','pXLjFuTsc8ksWQqmcSo2Ewmixg59kcK','W47ORyBMSyJLK6hLUPhcOq','rCo6smo9WR1IWQnJWP4uxq','WRTfW6JdS0TNbN9jAa','W7PvWPpdGG','WOb2W6tcQSoR','xCoJnsOTAHlcRvbLr0BdTCkpsYC','hgCDmColWPS','uCkUCSk6ra','6lsL5y2/5Pwl5Psp','CmoMW5JcG8kG'],...(function(){return[...['WPtdVZBcRColvMi','WOSsAg8QvN0','iSo1WRBcLCo2','ucHC','8kYPRrq','WPddQmoSo8k6','rmkLW67cMmoPqXBdMgm','tqnmxxnMW6epvMGu','W5ZdTv1NxmoUW7i','igpcGSoVxSkrWOxdS8o7W7xdHubvrq','rSoSWRtdLSoWuJhcLmoQhSkjWPD9W4u7rCkb','hh8PaCoQ','BSoPW5xcKG','fCkeW4/cL1pcMs0','W6qvWRlcRW','W7XhW5BdPSo2','WRRdHSofm8kzWQK','aCkyWOtcPY/cT2qxDMxdKZZdPYm','k2qvW4PNWPm','vmk5smo7rX7dRq','5B+N5zko57IU5y2Y6zUy5OUe5yMO772r','iWZcSq','WRddOdlcUCom','W73dOmko','ymkJvmkOBG','WRmdW6FdOCoXcCkwW4lcVq','W45rpJH6hgJdV8kiW7xcVqG','a0ddQ8obWPNdV8kYW7W','WOGsEgq','uatdGSomWPpdQCkKW5P1WOlcN1JcHwr3W4tcJSkyW7qlW5LcELT3WOJcRmkIWOpcPmkPW4Ke','gCo0WRtcU8okyq','WQxdJ8onbsuCW615','WPCPWQ/cOa','aH07','W4pdRSoe','rY7cU8oyaM/dQsG','s8kLW7BcU37cNG','W6uwWRxcR1j/','DCoNW5S','W4SRWOT2W4ddKb5X','o3/cN8oYqSkpWRK','q8kaiG','xaFdLq','WQddR8oUo8k+','W6CrWQZcUvbSfG','nCknj8kDW7C','eqlcJG','5B2U5yIw5PYr6i685BYj5AwL5yIm77YH5y6r6ic45RA+5yML57Ql5PY85OUl6ioU6BIj5y+U','WRevWPGPWPldISk/qCkM','mWXjBa'],...(function(){return['WOVdVZtcQ8opqNm','v8kGq8oauq','WQtdJmovf8kzWR8iuSkMWQe','WRPiW4ZcPSoy','bCk2eSkjW6TrWOe','WOXMBZ3dHd7dOq','fSo5e8klhu3cUcdcT8kYoCo5WP4','W64BWRhcRW','WQz4WOpdNry','W7VdTSkoWOZcPCodzGiOWRH5','uHnsqNq','WQpdS8ougCk/','WPZdTZxcQSot','oGHoFLKpqq','WO7dKSonbulcTCko','vHhdHSoTWP/dUCk2W497WOG','4P2pWQJMNOhOGRRMR5JNO6JLPzRNK7FdSW','WQ9PW5K9W7tdNqzvdSkm','WOdLVkFMN4dMT7hLIPNLT7NNURZNU63MNAy16k6K56Ye5BYC5lIB5Q+K5REc5yUIWQu','W6RdVCortCou','ymoNW5
// 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