faker3/jd_AutoEval.js

7 lines
152 KiB
JavaScript
Raw Permalink Normal View History

2024-06-28 15:38:28 +08:00
/**
带图评价
3 12 3 12 * jd_AutoEval.js
*/
const $ = new Env('带图评价晒单');
2024-09-18 16:28:41 +08:00
function _0xDD2D3B(){}var _0x97449E=Object['defineProperty'],_0x090052,_0xE4AC552,_0x48757B7,_0x6ACF0A,_0x56B54E,_0xC804EB,_0x44404DB,_0x1BA9E93,_0x65E6BD5,_0x9A69D3,_0xC3B3BB4,_0x610687B,_0x0E5B9E,_0x22A8590,_0xFDFB28,_0x663AC36,_0x184583,_0xF87862,_0x26A51C7,_0xF086A0,_0x092F3A0;function _0x151CC1(_0xDD2D3B){return _0x090052[_0xDD2D3B<0x120?_0xDD2D3B<-0x58?_0xDD2D3B+0x14:_0xDD2D3B>-0x58?_0xDD2D3B+0x57:_0xDD2D3B+0x3e:_0xDD2D3B+0x5e]}_0x090052=_0x1C3A71();function _0xFC9B74A(_0xDD2D3B,_0x97449E){return _0xE4AC552(_0xDD2D3B,'length',{value:_0x97449E,configurable:!0x0})}_0xDD2D3B(_0xE4AC552=Object.defineProperty,_0x48757B7=_0xCC3B83F((_0xDD2D3B,_0x97449E)=>{return _0x97449E(_0xDD2D3B())},0x2)(_0x17491E,_0x64A18F));var _0x83F8635=[],_0x690C65=[_0x815F9D9(_0x151CC1(-0x2a)),_0x815F9D9(_0x151CC1(-0x18)),_0x815F9D9(0x2),_0x815F9D9(0x3),_0x815F9D9(0x4),_0x815F9D9(_0x151CC1(-0x13)),_0x815F9D9(_0x151CC1(-0x26)),_0x815F9D9(0x7),_0x815F9D9(_0x151CC1(-0x54)),_0x815F9D9(_0x151CC1(0x2b)),_0x815F9D9(_0x151CC1(0x4d)),_0x815F9D9(0xb),_0x815F9D9(_0x151CC1(-0x24)),_0x815F9D9(0xd),'r?8KvrO#)Fw_zU4(1g3W6f#1]:LqGsx$)o)#]l6NF9>`w|3%',_0x815F9D9(_0x151CC1(-0x16)),_0x815F9D9(0xf),_0x815F9D9(_0x151CC1(-0x56)),_0x815F9D9(0x11),_0x815F9D9(_0x151CC1(-0x57)),_0x815F9D9(0x13),_0x815F9D9(0x14),_0x815F9D9(0x15),_0x815F9D9(_0x151CC1(0x4)),_0x815F9D9(_0x151CC1(-0x57)),_0x815F9D9(_0x151CC1(-0x4)),_0x815F9D9(_0x151CC1(-0x55)),_0x815F9D9(0x18),_0x815F9D9(_0x151CC1(0x5)),_0x815F9D9(0x1a),_0x815F9D9(0x1b),'|f,Kt.HEg";Gbv*',_0x815F9D9(0x1c),_0x815F9D9(_0x151CC1(-0x19)),_0x815F9D9(0x1e),_0x815F9D9(0x1f),_0x815F9D9(_0x151CC1(-0x56)),_0x815F9D9(_0x151CC1(-0x55)),_0x815F9D9(0x13),_0x815F9D9(0x14),'|f,Kt.HEg";Gbv^%lK{@yZmI}Ix:~aQw6&Zp/KcM1L>@2dWfD29>XL@|_[0(MQ&voR',_0x815F9D9(0xd),_0x815F9D9(_0x151CC1(0x19)),_0x815F9D9(0x21),_0x815F9D9(_0x151CC1(0x1c)),_0x815F9D9(_0x151CC1(-0x57)),_0x815F9D9(0x23),_0x815F9D9(0x10),_0x815F9D9(_0x151CC1(0x1e)),_0x815F9D9(0x25),_0x815F9D9(0x14),_0x815F9D9(0x17),_0x815F9D9(_0x151CC1(-0x56)),_0x815F9D9(0x13),'5`|.|','ZG.|k$4xTnzUR',_0x815F9D9(0x26),_0x815F9D9(_0x151CC1(-0x34)),_0x815F9D9(0x28),_0x815F9D9(_0x151CC1(0x23)),_0x815F9D9(_0x151CC1(-0x3e)),_0x815F9D9(_0x151CC1(0x27)),_0x815F9D9(_0x151CC1(0x28)),_0x815F9D9(_0x151CC1(0x33)),_0x815F9D9(_0x151CC1(0x9)),_0x815F9D9(_0x151CC1(-0x51)),_0x815F9D9(0x2f),_0x815F9D9(_0x151CC1(0x3a)),_0x815F9D9(0x31),_0x815F9D9(_0x151CC1(0x44)),_0x815F9D9(0x33),_0x815F9D9(0x34),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bfEN:i)0=tZa5VF(&v/W#Gns)MfwsE.q[C6X`$t.zK@sJ:A`KfR$sM{HIs65[!LuT`:!<JjsnKeQur4:~_ef{yT]vo4|;G;uxN1gmYC)VZ$FV(rA!:@!!NcF_aSwCHS','5tC_7#`EAl":)3if(~r>oLv|}z,vX`YY2oj%xaDKLQ1S4:[TV0bx4Ok#9Ap?)ILNKXaMQj=td#SNThsC$j#Gxa>#fQ(U"o|7,Z.{8i8eilz@p+df5~Bitj}hM?di4uRY6++{7"k!xQVW:84cBgTb;.}o@s[@/9cN(++Ylnwt.rGL]c@vWr$/CZ<a9wO9p:8G5t$pgiE#qP>@+u"fv$:iry}h&0','A_zK`hsI5|/7bnaNe/(HRwr#&r{7+gbfFoMMmy.2[PMYwBUCWpV9,"Om{7TwaQi@C!a9KagF^wFEMR',_0x815F9D9(0x44),_0x815F9D9(0x45),'A_zK`h]#9A|J2vLN5q:iLjQq>5cQwBb?34Wy1sS#cwod:8+J|fM{8i@mC81@8+"fG5FiX]>LY|hMgQ.7J++{
2024-09-11 15:06:57 +08: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