jdpro/jd_nhjred.js

19 lines
340 KiB
JavaScript
Raw Normal View History

2024-01-17 12:54:05 +00:00
/*
变量NHJCODE='7位字母'
export NHJCODE="xxxxxxx"
每次领取红包次数
export RedCount="5"
每个账号之间延时单位毫秒
export RedTimes="5000"
59 59 23,19 * * * jd_nhjred.js
*/
const $ = new Env('年货Red');
2024-01-21 02:02:49 +00:00
var _0xodG='jsjiami.com.v7';const _0x3f4472=_0x5bad;(function(_0xf97087,_0x3096c7,_0xdc469a,_0x261462,_0x50449d,_0x3751ba,_0x26dcd9){return _0xf97087=_0xf97087>>0x6,_0x3751ba='hs',_0x26dcd9='hs',function(_0x1f9b23,_0x3a7267,_0x2f3d50,_0x2397ed,_0x382b93){const _0x109611=_0x5bad;_0x2397ed='tfi',_0x3751ba=_0x2397ed+_0x3751ba,_0x382b93='up',_0x26dcd9+=_0x382b93,_0x3751ba=_0x2f3d50(_0x3751ba),_0x26dcd9=_0x2f3d50(_0x26dcd9),_0x2f3d50=0x0;const _0xefa68b=_0x1f9b23();while(!![]&&--_0x261462+_0x3a7267){try{_0x2397ed=-parseInt(_0x109611(0x1083,'KSwm'))/0x1*(parseInt(_0x109611(0x1043,'i1KK'))/0x2)+parseInt(_0x109611(0x582,'wL2c'))/0x3*(-parseInt(_0x109611(0x5df,'Dy@V'))/0x4)+-parseInt(_0x109611(0xc36,'AXni'))/0x5*(parseInt(_0x109611(0x293,'T3C6'))/0x6)+-parseInt(_0x109611(0x1e2,'(Fnp'))/0x7+parseInt(_0x109611(0x87b,'tN*9'))/0x8+parseInt(_0x109611(0x458,'d*O3'))/0x9+parseInt(_0x109611(0x12a,'Zu$z'))/0xa;}catch(_0x135a0e){_0x2397ed=_0x2f3d50;}finally{_0x382b93=_0xefa68b[_0x3751ba]();if(_0xf97087<=_0x261462)_0x2f3d50?_0x50449d?_0x2397ed=_0x382b93:_0x50449d=_0x382b93:_0x2f3d50=_0x382b93;else{if(_0x2f3d50==_0x50449d['replace'](/[VkfMOLGurWRCqBlpwHQgEY=]/g,'')){if(_0x2397ed===_0x3a7267){_0xefa68b['un'+_0x3751ba](_0x382b93);break;}_0xefa68b[_0x26dcd9](_0x382b93);}}}}}(_0xdc469a,_0x3096c7,function(_0x3dabc8,_0x5eb9f6,_0x2955e7,_0x4737a3,_0x695ff6,_0x27a565,_0x1c17cb){return _0x5eb9f6='\x73\x70\x6c\x69\x74',_0x3dabc8=arguments[0x0],_0x3dabc8=_0x3dabc8[_0x5eb9f6](''),_0x2955e7=`\x72\x65\x76\x65\x72\x73\x65`,_0x3dabc8=_0x3dabc8[_0x2955e7]('\x76'),_0x4737a3=`\x6a\x6f\x69\x6e`,(0x1513c0,_0x3dabc8[_0x4737a3](''));});}(0x3140,0xb28c6,_0x4cc0,0xc7),_0x4cc0)&&(_0xodG=_0x4cc0);function _0x4cc0(){const _0x23fd18=(function(){return[...[_0xodG,'YQBqjCrsujkGiaLmwikW.HMcHoRmpg.gOvfl7VME==','C0izpSot','e8k8cCosWOW','yCoeW4ZcJmkM','WRHmW5pcOCkQ','W74FWQu','sY7dSmkuW7JdU2KimZhcVWldJd7dJhxcSG','W7DPqJG','iGVcNCkbW4u','jmoUWR7dRSo5','qqZdI8k3W78','b8kvtW','jComWQ1cWOO','W7JcPmowdmk9','zCodf8kXlq','WQCdaNqI','WOLHW6u2cCosxSk8W5Kvwq','WQtdLZ3cKa','WP80a8knca','WPelc8ouzK0','W4yaW7ldQCkUmeRcTc1r','WPW1WRJcNSkVi1expW','bCo2WR/dK8oh','hNTiWOvh','AZNdRSkWW5i','theKjmoZ','pNH5WRVcVCoiidVcJXvI','bmkobCoPWPy','v8ofW63cT8k3e8o7BCk7','muldP8kHW5S','x2VcSSoisq','bGddImoSCG','eSotBe5E','WQ9yW7VcTSkw','bSkrjCoU','W6JcIWz9W7S','jSkQeZVcJG','W7dcJWVcL8k5','W5n/x0/dOG','gmoeWRK1WPy','rhGVjmo7','ywRcOaBdJa','WQCrdSo4fq','WONcG8oDAeC','W6pcGHHgW5S','WO8IWQtcNW','WRuqWRrzna','WPNcRxJdTSo7','fSo6D3rIkra','WRzOW7VcP8kS','WRzOW5VcOmk7','umk8hxrg','xghcK8o0Fa','f3tcTW','WOz/W5tcTSkW','W4BcLtblW4S','WQzGW4ZcQCky','W6JcMrzoW5m','hSkfFSo3EW','aCo7W70JWP4','l8ofF8kfFMeEW6FcVSk0','tXj6W7q5WOGxva','WRCyWQT4cq','W7eVWPDRaq','rqVdKSk+W5i','zqHUW7iy','ALBcHCojwmkM','h8oQBG','pfnBWPDC','s8oVWPTmW6y','WOWDWPBcUmk6','cCoiWQJdTCoL','W4yWW6RdS8ke','mSk1mCkNya','A8oQWOXFW5q','WOiWWQLPja','eSoWBunQma','WONcHSoJsfJcQd8','hsJcOmkLW6G','b8kToSojWPy','kgv7W7O','W5RcKSou','W6XOqg7dQa','xSkJg2LHW44sWQBdM8kL','WQq1WOb/pXVcQa','n8kBasxcPmkapdPjW4u','EGGDcLm','W4tcRXLYW6u','amkZtYuh','W73cRY3cJSkp','FKBcK8oUrCk5Fq','WPPaWRFcHmoWWRqJWQz1W60','W6n3swy','44oX5lU35lU/6lsR5y6X','cZRcMmktW4u','kCoXWPldJaJdOmoOla','aCo4wSkyDa','WPicWRzOkW','nSkwedVcOmkGnG','FumwauWNW5ZdVG','uJujiwq','W7BcItP1W5LP','nZNdQConW41QnNW','f8onWOtdNJq','W7y0WPLmWQy','vZJdVmkjW4C','WQSAkmoNbq','ys7dMCkolq','ncldOmo+wa','WROoWRVcPSkT','W7SjWQn9c8oGWRW','FuxcVbNdTG','WPdcNCo4t3JcUJTcW5a','wZStf2pdRCoOExqZWObmWRSDm2pdGHxdTmo3W7e','yXO8fwRdPmos','EKCXg0WJW5VdPa','WPC/k8kVpa','jmoSzLjfjrJcOG','AKVcHSoisCkxD1pcPtK','W7O+WP9lWOy','aCoQCeG','W4VcJYVcGSk/','gmkEucyz','W6aeWQnRc8orWQddNd0B','WQ8EWQbmbW','EbpdRCkInG','WRZdKtFcSmkOW5u','xNBcJSoUva','gSkriCkZzW','WQeid0a2','omkDWODF','dSkutbaphb0','ftpdPSokyG','ahNdSSkkW7ldJCk1','W53cLCommG','sXXgW5O6WRi','sJxdL8krW6W','WPKMk8kxaW','W4NcMGyBW58','kSoNW5eGWRW','r8kKe3vxW7GBWQtdLW','m8ohWOffWPq','hCovt8kZCa','r8kKe3vxW7GBWQtdL8kCwSoY','wG3dKSkDW6K','W6NcMXWcW5G','WPTOW7GBaW','l8oQWQldHSolWPFdTSod','oIBdNCoLyG','W6TOygBdLSkU','W5ybW5ldSCkI','WP8hc8oukfq','d8odW7aZ','xmo8WPLoW692WPFdJr0','abVdVSoQtW','b
2024-01-17 12:54:05 +00:00
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