faker3/jd_fruit_friend.js

16 lines
77 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
东东农场好友删减奖励 jd_fruit_friend.js
活动入口京东APP我的-更多工具-东东农场
#东东农场好友删减奖励
cron "10 2 * * *" script-path=jd_fruit_friend.js,tag=东东农场好友删减奖励
*/
const $ = new Env('东东农场好友删减奖励')
2024-08-29 23:50:55 +08:00
function IJYhiV(){}var XtftYY=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],KxOlk0,rwTZPW,tzTI50g,SuYuFWy,rHDk60A,vIhT9D,AMAEFbZ,bI1VMb_,o0rxGV,aRhSyQ,Idk3g7,mNMQzT,tjGm5N,pixRDJf,EK1fWf,r_GwjYX,fNW7Mt4,KDQ67vQ;function jum0mV(IJYhiV){return KxOlk0[IJYhiV<0x45?IJYhiV-0x1f:IJYhiV<0x45?IJYhiV-0x4c:IJYhiV-0x46]}KxOlk0=KtY2RD();function cfq5BYj(IJYhiV,XtftYY){var tzTI50g=Ch6wlOS(IJYhiV=>{return KxOlk0[IJYhiV<0xf1?IJYhiV<0x30?IJYhiV+0x43:IJYhiV-0x31:IJYhiV+0xd]},0x1);return rwTZPW.call(null,IJYhiV,tzTI50g(0x41),{value:XtftYY,configurable:jum0mV(0xaa)})}IJYhiV(rwTZPW=Object.defineProperty,tzTI50g=Ch6wlOS((IJYhiV,XtftYY)=>{return XtftYY(IJYhiV())},0x2)(rGnkIn,ii6Z1P));var jJ62dTH=[],czi8TL=[j_ZsXpJ(jum0mV(0x5c)),j_ZsXpJ(jum0mV(0x5e)),j_ZsXpJ(jum0mV(0x6d)),j_ZsXpJ(0x3),j_ZsXpJ(jum0mV(0x59)),j_ZsXpJ(0x5),j_ZsXpJ(0x6),j_ZsXpJ(0x7),j_ZsXpJ(jum0mV(0x69)),j_ZsXpJ(jum0mV(0xc3)),j_ZsXpJ(0xa),j_ZsXpJ(0xb),j_ZsXpJ(0xc),j_ZsXpJ(0xd),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)),j_Zs
2024-06-28 15:38:28 +08:00
// prettier-ignore
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