jdpro/jd_zzhb.js

14 lines
282 KiB
JavaScript
Raw Normal View History

2024-01-02 12:59:48 +00:00
/*
转赚红包
执行流程车头输出助力码--助力--抽奖--检查提现
可指定PIN车头(只能1个)不指定默认CK1 变量 JDZHBTOPPIN='jdpin'
运行一次抽奖次数,默认抽完控制变量 JDZHBLTNUM='200'
每次抽奖间隔默认1秒控制变量 JDZHBDELAY='3'
开启提现到上限转红包 JDZHBTORED='true'
代理变量DY_PROXY='https://api'仅对助力使用支持类星空的api
默认提现不提现的变量 NOTX='true'
*/
const $ = new Env('Jd转赚红包');
2024-01-27 11:52:07 +00:00
(function(_0x1206fa,_0x543450){const _0x43cfd3={_0x1dcfa9:'\x30\x78\x33\x64\x35',_0x2a8e09:'\x50\x71\x67\x34',_0x3771b2:'\x30\x78\x33\x36\x65',_0x413209:'\x68\x79\x36\x40',_0xc6452:'\x30\x78\x34\x30\x31',_0x210705:'\x26\x48\x53\x67',_0x375800:'\x30\x78\x33\x66\x38',_0x1c6e34:'\x28\x57\x4a\x45',_0x178bf8:'\x30\x78\x32\x35\x32',_0x92c69a:'\x23\x35\x71\x36',_0x1933f0:'\x30\x78\x34\x39\x32',_0x28761c:'\x32\x55\x59\x55',_0x2c4a77:'\x30\x78\x34\x33\x35',_0x4bfbee:'\x46\x5e\x49\x38',_0x4f9d84:'\x30\x78\x31\x63\x35',_0x4368b0:'\x74\x43\x6f\x33',_0x2287bc:'\x30\x78\x33\x34\x32',_0x4eacf6:'\x35\x48\x69\x6d',_0x56439c:'\x30\x78\x35\x33\x33',_0x3720eb:'\x78\x65\x31\x52'},_0x57e495=_0x1206fa();while(!![]){try{const _0x49f0d8=-parseInt(_0xe66b(_0x43cfd3._0x1dcfa9,_0x43cfd3._0x2a8e09))/(-0x1*0x241a+0x811*-0x2+0x137*0x2b)*(parseInt(_0xe66b(_0x43cfd3._0x3771b2,_0x43cfd3._0x413209))/(-0x5f9+-0x1fff*0x1+0x2*0x12fd))+parseInt(_0xe66b(_0x43cfd3._0xc6452,_0x43cfd3._0x210705))/(0x2f*-0x62+-0x23d6+0x35d7)*(parseInt(_0xe66b(_0x43cfd3._0x375800,_0x43cfd3._0x1c6e34))/(0x39*-0x7c+0x94f*-0x1+0x3d*0x9b))+parseInt(_0xe66b(_0x43cfd3._0x178bf8,_0x43cfd3._0x92c69a))/(-0x13eb*0x1+-0x70d+0x1afd)+parseInt(_0xe66b(_0x43cfd3._0x1933f0,_0x43cfd3._0x28761c))/(0x23c4+-0x24e8+0x12a)+parseInt(_0xe66b(_0x43cfd3._0x2c4a77,_0x43cfd3._0x4bfbee))/(-0x2210+0x2*-0x75e+0x30d3)+-parseInt(_0xe66b(_0x43cfd3._0x4f9d84,_0x43cfd3._0x4368b0))/(-0x20a5+-0x3*-0xbf1+-0x326)*(-parseInt(_0xe66b(_0x43cfd3._0x2287bc,_0x43cfd3._0x4eacf6))/(0x5d*-0x65+-0xc1e+0x186c*0x2))+-parseInt(_0xe66b(_0x43cfd3._0x56439c,_0x43cfd3._0x3720eb))/(-0x34*-0x3a+-0x2368+0x17aa);if(_0x49f0d8===_0x543450)break;else _0x57e495['push'](_0x57e495['shift']());}catch(_0x370cee){_0x57e495['push'](_0x57e495['shift']());}}}(_0x4a76,-0x1bb07+-0x10bcc9*0x1+0xf2a5*0x1f));const _0x150544=$[_0xe66b('\x30\x78\x35\x36\x38','\x36\x55\x32\x76')]()?require(_0xe66b('\x30\x78\x32\x34\x33','\x62\x54\x39\x30')):'',_0xc28b4a=$[_0xe66b('\x30\x78\x35\x33\x63','\x62\x54\x39\x30')]()?require(_0xe66b('\x30\x78\x36\x33\x66','\x4f\x73\x6a\x25')):'',_0x497f92=require(_0xe66b('\x30\x78\x35\x35\x34','\x43\x44\x4b\x25')),_0x69e532=require(_0xe66b('\x30\x78\x32\x64\x35','\x23\x35\x71\x36'));let _0x341301=!![],_0xb33cdf=[],_0x144587=[],_0x559b32=[],_0x15fa6d=[],_0x5d5ecf,_0x547a11=[],_0x5bedff='',_0x18a52e='',_0x3abe1e='',_0x58107d='',_0x2cb505;const _0x309680=process[_0xe66b('\x30\x78\x34\x38\x33','\x72\x41\x69\x75')][_0xe66b('\x30\x78\x35\x33\x39','\x5e\x32\x37\x5d')]||_0xe66b('\x30\x78\x35\x37\x37','\x68\x4e\x6b\x63'),_0x3b2f7a=process[_0xe66b('\x30\x78\x31\x38\x31','\x26\x48\x53\x67')][_0xe66b('\x30\x78\x36\x31\x65','\x6c\x24\x61\x28')]||'\x35',_0x216282=process[_0xe66b('\x30\x78\x32\x63\x30','\x43\x44\x4b\x25')][_0xe66b('\x30\x78\x31\x65\x65','\x69\x45\x4c\x59')]||'\x2d\x31',_0xb54de9=process[_0xe66b('\x30\x78\x32\x32\x38','\x62\x54\x39\x30')][_0xe66b('\x30\x78\x33\x66\x61','\x45\x63\x29\x57')]||'\x31',_0x36b0e5=process[_0xe66b('\x30\x78\x35\x32\x37','\x4f\x73\x6a\x25')][_0xe66b('\x30\x78\x31\x66\x62','\x6d\x43\x41\x6c')]||'\x35',_0x457480=process[_0xe66b('\x30\x78\x33\x65\x66','\x6d\x43\x41\x6c')][_0xe66b('\x30\x78\x35\x36\x39','\x43\x46\x39\x23')]||'\x31',_0x20991a=process[_0xe66b('\x30\x78\x35\x36\x34','\x44\x4d\x6a\x48')][_0xe66b('\x30\x78\x35\x32\x31','\x69\x45\x4c\x59')]||'\x31',_0x1b6337=process[_0xe66b('\x30\x78\x33\x38\x32','\x45\x63\x29\x57')][_0xe66b('\x30\x78\x36\x32\x37','\x23\x25\x61\x49')]||![],_0x43d397=process[_0xe66b('\x30\x78\x35\x32\x37','\x4f\x73\x6a\x25')][_0xe66b('\x30\x78\x33\x33\x31','\x62\x54\x39\x30')]||'',_0x13c29b=process[_0xe66b('\x30\x78\x35\x36\x62','\x4e\x65\x4a\x6d')][_0xe66b('\x30\x78\x34\x34\x38','\x75\x62\x45\x6f')]||![],_0x4b356e=process[_0xe66b('\x30\x78\x35\x37\x62','\x65\x23\x70\x66')][_0xe66b('\x30\x78\x31\x37\x36','\x5e\x32\x37\x5d')]||'',_0x1395e1=process[_0xe66b('\x30\x78\x32\x66\x61','\x76\x61\x24\x5a')][_0xe66b('\x30\x78\x34\x62\x36','\x28\x57\x4a\x45')]?process[_0xe66b('\x30\x78\x34\x39\x36','\x36\x55\x32\x76')][_0xe66b('\x30\x78\x34\x62\x36','\x28\x57\x4a\x45')]:![];if(process[_0xe66b('\x30\
2024-01-02 12:59:48 +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