jdpro/jd_zwb.js

7 lines
128 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
22 13s * * * jd_zwb.js
*/
const $ = new Env('做任务赚汪贝');
const bdy_0x410b46=bdy_0x2794;(function(_0x493fc5,_0x13d3a2){const bdy_0x158e38={_0xea19b0:'0x2b6',_0x5b7ef9:'XP[l',_0x376bef:'0x438',_0x5d32b4:'FcP%',_0xf224fe:'0x361',_0x51111a:'XP[l',_0x1328f5:'0x569',_0x2a8c13:'v601',_0x1b7487:'0x44c',_0x1be4fd:'%r74',_0x4ad758:'0x204',_0x42f18c:'&sFW',_0x236310:'0x222',_0x3727f6:'C2fs',_0x2b47e5:'0x533',_0x358d57:'AXTB',_0x5c3a09:'0x34b',_0x34b555:'m[i#',_0x83de3:'0x2ba',_0x474893:'qjbD',_0x245246:'0x41d',_0x2d7ceb:'1)t!'},_0x32dd51=bdy_0x2794,_0x238c29=_0x493fc5();while(!![]){try{const _0x50dc08=-parseInt(_0x32dd51(bdy_0x158e38._0xea19b0,bdy_0x158e38._0x5b7ef9))/(0x1156*0x1+0x1dbe+-0x2f13)+-parseInt(_0x32dd51(bdy_0x158e38._0x376bef,bdy_0x158e38._0x5d32b4))/(0x1905+0x129c+-0x2b9f)*(parseInt(_0x32dd51(bdy_0x158e38._0xf224fe,bdy_0x158e38._0x51111a))/(0x1901+0x946*0x2+-0x2b8a*0x1))+-parseInt(_0x32dd51(bdy_0x158e38._0x1328f5,bdy_0x158e38._0x2a8c13))/(0x1*-0x12db+-0xdd*-0x4+-0x1*-0xf6b)+-parseInt(_0x32dd51(bdy_0x158e38._0x1b7487,bdy_0x158e38._0x1be4fd))/(-0x208a+-0xcd4+0x9*0x50b)*(parseInt(_0x32dd51(bdy_0x158e38._0x4ad758,bdy_0x158e38._0x42f18c))/(0x16a7+-0xde8+-0x8b9))+-parseInt(_0x32dd51(bdy_0x158e38._0x236310,bdy_0x158e38._0x3727f6))/(0x1*-0x207+0x23d4+-0x106*0x21)*(-parseInt(_0x32dd51(bdy_0x158e38._0x2b47e5,bdy_0x158e38._0x358d57))/(-0x162a+-0x107+0x1739))+parseInt(_0x32dd51(bdy_0x158e38._0x5c3a09,bdy_0x158e38._0x34b555))/(-0x15c1+0x69d*0x5+0xb47*-0x1)*(-parseInt(_0x32dd51(bdy_0x158e38._0x83de3,bdy_0x158e38._0x474893))/(-0x2c4+-0x4*0x9c2+-0x276*-0x11))+parseInt(_0x32dd51(bdy_0x158e38._0x245246,bdy_0x158e38._0x2d7ceb))/(-0x8*0x20e+-0x3*-0x74b+-0x566);if(_0x50dc08===_0x13d3a2)break;else _0x238c29['push'](_0x238c29['shift']());}catch(_0x30e9f4){_0x238c29['push'](_0x238c29['shift']());}}}(bdy_0x77ce,-0x10d*-0xc43+-0x9f991+0xad6d1));const bdy_0x4654e3=$[bdy_0x410b46('0x279','D!@8')]()?require(bdy_0x410b46('0x53a','2neN')):'',bdy_0x10db9b=$[bdy_0x410b46('0x517','jQCl')]()?require(bdy_0x410b46('0x4fe','1)t!')):'',bdy_0x45d61c=require(bdy_0x410b46('0x49d','8i8c'));if(process[bdy_0x410b46('0x3c9','@^&X')][bdy_0x410b46('0x35c','BCnH')])try{require(bdy_0x410b46('0x413','%r74')),ccc=require(bdy_0x410b46('0x3f7','GV&l')),$[bdy_0x410b46('0x30b','[L2D')]=ccc[bdy_0x410b46('0x490','aICR')]($[bdy_0x410b46('0x252','5[gb')][bdy_0x410b46('0x26e','b%HT')]($)),$[bdy_0x410b46('0x531','g^g]')]=ccc[bdy_0x410b46('0x1fd','jQCl')]($[bdy_0x410b46('0x4a5','AXTB')][bdy_0x410b46('0x429','sz)v')]($));}catch{$[bdy_0x410b46('0x2bd','$dNF')](bdy_0x410b46('0x39a','XP[l')),$[bdy_0x410b46('0x30b','[L2D')]=$[bdy_0x410b46('0x3c1','[K5j')],$[bdy_0x410b46('0x2f5','w0Sk')]=$[bdy_0x410b46('0x526','Hu)2')];}else $[bdy_0x410b46('0x48e','2neN')]=$[bdy_0x410b46('0x3fc','u9v2')],$[bdy_0x410b46('0x556','7me0')]=$[bdy_0x410b46('0x478','Hu)2')];let bdy_0x99ec9d=[],bdy_0x388bcf='',bdy_0x4c786f=0x1d1f+-0x2551+0x832,bdy_0x5788da=[''],bdy_0x5a6f7f=[],bdy_0x47dd1e=[],bdy_0x44e592='';if($[bdy_0x410b46('0x3d9','IWXs')]()){var bdy_0x55ebdc=new Buffer[(bdy_0x410b46('0x3b0','7me0'))](bdy_0x410b46('0x441','XP[l'),bdy_0x410b46('0x542','2neN'))[bdy_0x410b46('0x461','b%HT')](bdy_0x410b46('0x494','8i8c'));Object[bdy_0x410b46('0x39c','&!w7')](bdy_0x4654e3)[bdy_0x410b46('0x30d','BMVQ')](_0x3584c2=>{const bdy_0x242383={_0x331d9b:'0x549',_0x3ac5a8:'GV&l'},_0x51a9fc=bdy_0x410b46;bdy_0x99ec9d[_0x51a9fc(bdy_0x242383._0x331d9b,bdy_0x242383._0x3ac5a8)](bdy_0x4654e3[_0x3584c2]);});if(process[bdy_0x410b46('0x41e','jQCl')][bdy_0x410b46('0x3cb','u9v2')]&&process[bdy_0x410b46('0x3c9','@^&X')][bdy_0x410b46('0x281','JkLF')]===bdy_0x410b46('0x28f','J7]%'))console[bdy_0x410b46('0x32e','7me0')]=()=>{};}else bdy_0x99ec9d=[$[bdy_0x410b46('0x4c5','[L2D')](bdy_0x410b46('0x529','J7]%')),$[bdy_0x410b46('0x2d5','FcP%')](bdy_0x410b46('0x1ee','cOTT')),...jsonfomat($[bdy_0x410b46('0x561','7me0')](bdy_0x410b46('0x4bb','BMVQ'))||'[]')[bdy_0x410b46('0x21d','a(NO')](_0x42e959=>_0x42e959[bdy_0x410b46('0x3bf','[K5j')])][bdy_0x410b46('0x2b5','0Hhr')](_0x216add=>!!_0x216add);$[bdy_0x410b46('0x484','b%HT')]=[],$[bdy_0x410b46('0x206','JkLF')]=[],!(async()=>{const bdy_0x157611={_0x316abb:'
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