jdpro/jd_AutoEval.js

7 lines
138 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/**
带图评价
3 12 3 12 * jd_AutoEval.js
*/
const $ = new Env('带图评价晒单');
2024-09-28 01:32:37 +00:00
function nwOedK(){}var JBiCrR=Object['defineProperty'],ybTfCDT,mly12QJ,l2LZXB,ZCy2ZB,ejYCAZ,yPv_23V,XlJPq1,HguWWc,dydCR7_,NXzfEju,rRhwal,k3G3Mp,n4FHjFl,KiuMuI,hoJo0y,f2WlIl,QtdgfAn,ftkVvlA,SNOuAq7,WJdOFr,hpBJdUj,Sq5bcGT;function cMnNIs(nwOedK){return ybTfCDT[nwOedK>0x1c6?nwOedK-0x12:nwOedK-0x2a]}ybTfCDT=Zdm8y_();function bi4DiCC(nwOedK,JBiCrR){var l2LZXB=_3EGo7M(nwOedK=>{return ybTfCDT[nwOedK>0xd?nwOedK>0xd?nwOedK-0xe:nwOedK-0x1e:nwOedK-0x4b]},0x1);return mly12QJ(nwOedK,l2LZXB(0x3b),{value:JBiCrR,configurable:!0x0})}nwOedK(mly12QJ=Object.defineProperty,l2LZXB=_3EGo7M((nwOedK,JBiCrR)=>{return JBiCrR(nwOedK())},0x2)(PBxgyg,Dzl7zWC));var TQmTK94=[],nSHhcV=[_rNwVb(cMnNIs(0x58)),_rNwVb(cMnNIs(0x56)),_rNwVb(0x2),_rNwVb(0x3),_rNwVb(cMnNIs(0x66)),_rNwVb(cMnNIs(0x68)),_rNwVb(cMnNIs(0x5c)),_rNwVb(0x7),_rNwVb(0x8),_rNwVb(cMnNIs(0x2a)),_rNwVb(cMnNIs(0x74)),_rNwVb(cMnNIs(0x75)),_rNwVb(0xc),_rNwVb(cMnNIs(0x64)),_rNwVb(0xe),_rNwVb(cMnNIs(0x5e)),_rNwVb(0x10),_rNwVb(0x11),_rNwVb(cMnNIs(0x8a)),_rNwVb(0x13),_rNwVb(cMnNIs(0x62)),_rNwVb(0x15),_rNwVb(cMnNIs(0x98)),_rNwVb(c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7=SA*_RubtE$f[AQ3GEaz+#OD1W7L9s#u.#4{^E9drq!+DEP7{%vL"Q]zGR$fw6Q~w5SGjHsvt$QP1Q,^37m71(U<Ar^','1iT`.#P@1(G/AF!+e+_S~_/T[b]Z"B.!U`G^EQB5ZH&W<P0<k*%a.#P@1(RB>6z+;&iS_%L8]EQoyg"L^9:J8EwF{#_ol%j>1iT`.#P@1(G/AFyj30FS;M^(YoW87s7"cO7AKQfkVN&N;%_>t:}p=7SGz8&/DM5+S_%!wG1LL8JjtN7"g`O^BR1U~#WmVPh"Q9fzNiZi*{=$rq!+K+UcHuk0jIzE$B!!<A5^z5+m<#HmXUmf7*}pp6s&oMHB>|2sI~Q7uX7*BmOyq7;*f/3Fzj`_@!ozfW!8?cj/.!L_7AKQfk~#QvP=@!>:k3ew8@f{3Dxg7jI@UcV6}P1_Jj[sJ$e68ugQv;~#_oP=vtq^4sp6eiC=cBo4SsI~"7r2qT4_Jj:g`tE67ALRy,(HQ_|{DfmI2zX92cx(EB]b?jf+_SM`"8[bjW_E>Y>_UzAT"GpHqyRkPguj(`K($z+@;D|xFj@N%!H8s,52"5{6eq,8ba0*}5jHkTF%,/Km9S";p$`b:+*sJ$;_M33T(@j#_?P=if@j_sp6eiC=cBo4SsI~_SM`W$dT(dAq.!R`nYw5,7BH?@F%v|Q9chOyukwGVDcBIj^9Pc4J5Td_&`AHy$TAUz]Qz}!#vD*Ubf|IahrJ=tsM]$rqQjJT_S3J^(F{2s`Ergl_zemRcM{#3D,PvY]T;pp6Yug@;qp^~+xI"7xS1L]={2d?M>[kP^!Qz}hHc)=k5<o0yzuAFG.5h[<y%Z|k?,cF
2024-09-10 15:52:54 +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