jdpro/jd_fen2bean.js

12 lines
53 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/**
2023/2/7 create
2023/3/15 fix
只积分换豆换积分用jd_washbean.js
默认定时不执行自行设置
33 2 29 2 * https://raw.githubusercontent.com/6dylan6/jdpro/main/jd_fen2bean.js
问题建议TG -> https://t.me/dylan_jdpro
*/
const $ = new Env('物流积分换豆');
var _0xod7='jsjiami.com.v7';const _0xeda630=_0x99e2;function _0x52fd(){const _0x4518b4=(function(){return[...[_0xod7,'UfjBtsHjiaIDmTiV.UncRRoPMQm.LIDvGJe7bRqV==','WPjgwfddVa','rtldOCo5gSk3gG','CgpdTs3cNYK4W7zR','WPy0W7tcL8k0','x8ogpq','WQxdVMFcPJ8','tb1FWOO','uY7dQSo/pSk6dCkoWRldOmov','W6mreH8B','cmkMWP/dLSoY','W5VcT8oPkW','5B+M5yQB5Ok/56AH5yMa776V','WOGhte3cQq','W5boWPhcPJy','W4VcQ2dcGmo9','sJzxWRFdJG','5lIi5lMJ6lsH5yY5','W4C0oaKJ','W6FcIhRcP8ol','AwldTYdcPq','nmkwqSovsdKyW75Sw8o0','WPyuW47cG8kh','WQufW48','D8kQW7CUEq','hqxcO05P','Ca/dLavuFCo8','oJmcWRic','pSkubN/dUHK','WQRcL0e','x8kbW68KW7lcS1ySdCo6W6JdOKBdP0NcSSktW5W','W5uLhZC4b8kdgH3dI1q','weBcOCkCje92WPz6W63cLq','W6ujW6JcNCoideVdVK0','56AD5yM35Pw45PEC6k+B5B+T77YL','ymolea','W6imW6/dGSkMpNldIxhdUSou','eSkBW6C','5BYa5AAk5yEs5O+I','vXLuWORdUa','WRCIW4ZdJSk4','dSoeuG','WOnTuuJdLq','qxZcT8kJaW','zrTSWR/dMW','W4PcuG','WQXYWPtcOmoC','W4xcLCoXdqG','WPfWWQ3cOmoD','W7ZcLxNcJmoq','t8ojb8kicW','AgyoaCkoeLa/xmoFWO/dRSkiWRqDWR9lkZ4YWRxcGqVcOrddOmkdgrZcUW','oWVcIfzj','WOtdV8oXvW','W4G3W4fwAa','W47dICo8','W5yUW5ZdVdy','WR4tW7xcUCkHDa','vdVdUmo3la','WPCQWPutBq','WPZdKCo7WQDq','rgpdTGNcUW','vmk4W6mSEG/cJSohWOiwW4Da','WOOewxxcJq','hCkgd8oJW7rsWPVcGLFcLSoiW6pdPW','WR3cHmoVzCkIWRhcI2jBWQy','WPajW57dUmk5','yNmBhCokef0Iq8ov','5PYn6i+p5y+W5yUj56wY5yQj5l+X5OkC772J6lwT5yAW776m','emkDW6msiYeyW74','WQOmwKJcVq','W5DiiahdPqBdKSoWWR7cN0tcVq','f8khW44wcsu','kSkrW48GdW','qXDiWPW','WQpcOCkNW4XA','C8oQWQJdQ8oI','xNVcM8k9ea','CY7dQSo/mCk4a8ke','WPhcGx4Ojq','cr3dO8k5gSk0fq','hCkbW58qaZqqW7WCAmoR','WPxcMSkJCCkfWRddNteFW7S1WOpdNSo/W4tdLCoLBqhdSCkWW4pdQmkjW4fVDYDVpmo1W4RdNCkLgSkbnJFcM3RcUxpcJXqREqtdI8k6W5zlW6SiCrZdTG','WRZLHihMJklLPA/OTBpVVB/PHkVORQHL','bmokwvhcTG','pmkAdf8','cg8/W5/dR3xdNf3cT3ddOa','qCoaWO/dIa','W65fWRJcHqGW','WQdcGvldVZLOaa','xr/dJmk5fmkWgsJdQSoLBb/dLMaKvai4FsdcK8k0omo6ACoq','AW7dGXzcnmkGAmk2BCknWO9vWPLmWPBdKWZcR8o+WOhdLIa0ESkYqepcTmosWPymWRvnW640W6pcVbD3W6S','v8o+WQddQSo1WPicWPO','qCoAWRtdHmowjmkCWPz+WPDG','f2b4W68YvsxdHmk3','WRpdKfhcHq','wmoud8kPfa','W7yxr8oQWPK','W48Cfs8c','wmo2p8ktea','AI3dPHvq','sXxdMSo5ma','D3JdKJtcGsSJW5nZWQhdVG','hH4P','prxdLSk0aW','WRNcR1i8jW','W5O/jW','dCkrW6eldIG','v1ZcMq','FuNcNmkWoa','WQdcMCkE','otddPSkehG','xCkVW7q','WOFcI2Oxn3rN','wCk7eSkqW4GuuCoSqxhdMW','jGFcK1fb','5lQl6lc+5yw35O6B54U05REo56E/5yU1','iwBdJq','dCkyW6KAca','zI3dRmoVWPC','W6BcNNZcQ8o9WPRcQa','chuoW4xdTxpdJfNcSx7dVG','W6W9BCofWPhdUJzvWQy','WR4uW6NdVCkv','jSktW6y0lG','WQzUtf7dJW','W40ms8kHWPRdKmkm','qtVdSmomWPW','5B2F5yUP5Ogm56so5yM8772c','W7umWQXfqSo9WO7dVgm','CbNdKGHuqmoUkSk/','bNm2','qb1sWP3dVmo7Cq','a8k6ErVdIYmyoG','zYtdT8oKWOrTWP8','Dc7dKmo0WPDWWPas','CgtdNZBcLN3cVG','hSkne1xdPG','xmoyWQinbdqzW75mm8kL','qY3dSSocWR8','Bmo6WPldVSo8','W6NdGConaqe','umogpSov','l3ddLr3cI1xcOG','W7S1kJWy','W7tcSCosjtu','feRdQWJcPW','qmoPzrNdGGq','WRCwrLBcPa','wJVdKG1N','WRPtWRS','W7CbW4/dTG','44k05O6V56s944oFWP7dLSknWRZcPSoB5BwH5AwN5PAU','W4CqAmkLWPtdNow0KowNPUAwH8kEWR52','fGe2WQON','wWpcT3L2WOLf','bZL2WRdORARMS43LPkhOT5BVVApORANMOORMNAJNVBhOTPhPH4xORAe','bUITK+MgUUAvKEEyGEw8JEIpNownQq1cW6/cHa8/kLFcISk1yMm8rL5is35Ofmo+W5zeW6tdM37dP8knWROcWOK2u1FdKCoqkfFcImkJW6zsWORdHa','WPRcKMe3D8oTCmoe','W5e1ndO3b8kh','DSoxWQBdT8oo','WQTXwW','WPZcGg4EmwvJW4HaWQ/dUW','W5ZcM0tcOCok','WR0dqMNcIa','W5NdKZ8','W4usaHC1','n2b5W7a+xIi','W7dcV8o8gIK','y8kbaSkqW60','zbDjWPldTmoQy8k5kW','jSkumK7dUGldPdu','CXldVCofdq','vvZcISkGoG','W4GYqmkMWRG','sHLw','WQtdQSoIDKe','xCk1nCktW50','W6jkrmk7aG','Cv4kl8kU','dSkcW55pWONcN8k8W5hdM8ksW77dQCkQo8kOxCk4vmkPWPi5lmkdW6NcGb3dSNBdMGK'],...(function(){return[...['sKJcPSoJtSk8nq7dVSo7qG','W6BcNN7cQ8o+WPy','W4/cKCo1gHy','W6ddKCo6lGS','W6ZcGL/cR8oZWPy','dvCm','WRntDgddSa','WPddV8o+WOrD','DHZdPXfI','jseyWOKb','W6yIDmo8WP4','sKhcLSkSbq','qCk7ia','hSkMWOhdLSoY','W4ywW63dVY0mW6bs','W7zfWOZcTaGRE8o6','F8oqbCkifd8cW5L+','W4m9zq','fXFdTa','WOldMfRcSWu','omkDrSoysbimW5zqBCos','lmk0WRhdQCoe','W6ZcIh/cGCoR','qsXxWQ3dSG','W7azaraA','hSk1d3ZdUW','BcToWOddRG','56EI5yQg5lUS6lsMuuvx77+96lwy6l6z5yAi5O6qaW','WRKbW5BcSW','heNdVaBcHa','W6O6ymokWQW','yqpdKmoHWOq','pCkurW','WQX0WQJcU8oN','sSkXm8kfW4absSoDrwddM8kophWtj1qh6k2P5
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