jdpro/jd_dwapp.js

10 lines
63 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
积分换话费
入口首页-生活·缴费-积分换话费
update2024/5/6
10 1,14 * * * jd_dwapp.js
*/
const $ = new Env('积分换话费');
2024-08-11 13:51:13 +00:00
var _0xodj='jsjiami.com.v7';function _0x45d2(){const _0x268ae2=(function(){return[...[_0xodj,'urjFXseljhKGiawCmxSCiM.kcHomODN.yHvK7erf==','pSkSo8oaWOy','zmkhWQpdTIC','W7ldKSkPW5NdPa','W7y3ycZdOa','WPZcJmkqWQu','W7NcV2fs','oCkfW7xdRSkq','WPvYWRuPWPa','W43dNCoFWR3cHCoudmkFW5NcOSk/WOvOW75UEG','isVcVSkbmSoqdq','W7/cNSkYcG','W5TtW6/cP2i','W60Rzs7dHa','W4xdISo7uSoj','WPuWpexcIG','W4rmW5/cN0anW63cQxxcOWCHwmk1WQTNgcVcN8odyG','W6JdKSogB8oM','W5pcT15Hia','W63cKSkvpCoa','u8kbW5HTuG','d8oDWO/dJq','W6ZdK8oLBSoe','W5BdISodWQa','W73cV0fsfmkjWPpcSa','WQXHWRC5WOZcKW','ceLwb1u','p0Sm','wSoTgGei','qJibWQZcGYqdWRO','n2BcTttdVq','dtpdTmo/W4ZcO3G0sgO','d8kVmCobWRW9DCo8','W74sAXpdVmkRW5VdKmkRaCoWW77cKG','n2yqwtFcIddcVa','WP9diG5E','W4/dNCkzW4pdPa','iSkFgSo3WR8','CaXCBmkn','5lU25lUa6lwY5y2e','W53cJ0ZcI8kH','fmkyvmk3BG','b2XMWRVcTsa/WORcHa','gSkKcSoAha','rhFdJHNdRSkfW7pcQq','umksW5NcUcSN','e8oBWOCxBq','WQfthJO','W5xdT8kcW77dICoABqK','dXZdSh8','iZhdRxxdMq','h1FcGdm','mdJdM8oUDHRcRSotWPpdU8kYW7FcL8oqFCovwSkODG','W6KHjSkCqmkwW6xcTH4','av7cHtFdJW','f8olkbdORQZMSPVLP6hOTBNVVkBOR6dMOAVMNPxNVzVOTRNPHR7ORl8','WRlcR8kQWOrodSoXe8k8lKXMiG','l355lhbR','uSk6W4i','AbD0C8k3','W6FcSx9d','WOXvW5C','W7TchZDxuCo8','WQzdWPCiWPS','j8kulmodlq','WQyEbKBcOq','WQBcMSkzmmklhwvaCSoQga','W4RcHhLupW','h8kHaCoNndpdG8oKW6FdKq','WQ5rWRyoWRu','exauwrRcGq','hCkZW7/cO8kv','WQ16WRSmWQG','W53cVmkdpCov','F3pdSmop5QYZ5lMy5yUF5Bsj57M06Ao/5yYD6lY95lUO','kCkOjSoAWPW7CCo/sq','b8obW5i8WPGkFHu','lSkqx8kOsq','WO/dOeNcUCkyW7BcS8o2dba','WQvegtPn','W7FcLhm','EtutWORcLq','W77cSSo0WPi','W5FdJmojWQe','W787iG','fCkoW4RcUSkS','m8kVgSoCWPy5','gbBdIWRcImotW5ZdTISoW6yIs8kFF8oGmmo0WQvbBSokWQKgcCo8oaDbaXTAdW','WPVdSbxcR8k9','W47dHSoxvSoa','W4KaaSkVFG','WQNdGrK','jJhcImksj8ogdmk4W5OkWQ4','e8oJWQCEfaCzW5jSWPnHwGVdKG','WRbxj1dMR7BKUlxLIjBLTBhNUiVPO7lLJztOVzRKUBe','W7q0oCkq','WRdcJ8khWPji','W5mNpmk5qa','wCoRftW','5OoB56Ev5yQ27763','W5BdISoiWQ7cLmoj5BAg5AEw5PEPW7RdQSoD','WQhcImkMWOD5','zfRdHdtdKG','W6hcVxTIhG','k8o4WQuWBG','cSo1WQtdGmkx','F8k8WOddGZ0','jrRdM2/dPa','W7lcP8o0WOm4beq1dSoWhmoeD8k/WQNcR08rW7FdKHCDuW','WRLBfIHhy8oBu8o9W4u','qGJdNHlcLSoFW4/dQw0wW6fRwSkjzCo4i8k8WQ8bDCo3W6WCfCo1BfGowKrEd1XHACooFcxdTeXdzW1cW6BcHgtdQCkfW5BdQ8kUW5ddVgmkB8o4W7hcG2/cU083W5LSW7tcUqZcHGzHW5C/W4iAW7KCuCkWBWZdP8o5gezsWPVdLWBcPmoFW7ldMmkCW7FcSmkZWPlcM8oXW53dGcLhWQlcMmo4BCoAWRiYW4pcObDnW4e4WOyFW5xcJtDYWRKeW6RcHmoSWQ1QD8ommWNdISkqDmkecCk4WOZcKGX5lCoPWOKeFHFdVSk/WRfYxcRdImkXvSkkWQmsDmkexSkNWP0LvCkpWQmwWRdcHCowhSkjWPddJYf/pI0hsrX7wxb4WR5EmH1JW7zqpSk1dMZdJhJcSNddV2aYaCk7WPW','zY19wSk9','jSojWO0SDa','F1ddJq/dUW','WOzlqSkuWRyZWPu','u8k7W5Pn','BwpdJ8oYDH7cS8oCWOu','WP3cGmkuWQbB','5y6Y5yk0W6i','W7aXnCkfxSokW6xcGa/dTqvfm8kkuahdV8otW6XCg8kXW7JdT2G','EeNdMItdKq','WRFcM8o1WPtcP8kXe2FdINFcUSk5','W5JdP8ouWQ3cUW','rNhdUbRdJ8kyW7ZcUSoxW6e','bCk4mCoJhq','prddQJhcTW','s1tcIf/dL8kjWO3dHqCpW71lsq','W7xcLSkLamowWQhcVmoK','5y2P6Aol56AG5yIo','mMjKn2zNjmom','vCkoW7a','aSopWRGGwG','lmkofSo2WQa','W5pdO8kCW5ZdPG','jCkeW6ddU8kg','mr7dJSomW5RcLuWh','vg/dIb7dUCkEW4NcR8orW7K','veVcLKVPOAFLJABKUyBLIkpMIzlLI74','xfVdP8ojtW','j2jnj20','k8kdt8kkt8oFkvW','W7NdI8ocCmoxoq','WOK5c1/cVa','WRNdTcVcI8kH','f33cOXhdPW','aeFcSgbP','fWFdLGm','5BAn5AY+5OUS56+h5yUc77+j77YI77+OBW','j3VcSK9B','E8kBtmo/W59ay8kZjCo4m8kGW5O','WQPQpJfA','WOy4f1fI','o8k5W5tdNSk6WRbkEYO','W7BcVdXUpq','xSk6W6nbaJuRW7roWObj','W4xdHmovWRBcMa','l8oWWQ/dRmke','nSkrCSkor8ot','ANJdICo6DdFcR8ox','WOZcHmkbWRbXbCowiq','BCovvmkssSocdKu','WOVcN8khWRHZlmokkSke','dhVcMWBdOq','W4hcLCk1h8op','W5/dJ8orC8oV','BhldJCo3ErRcVW','ggFdJgHX','W4xdGSoBFa','WPddQN/cVCohW77cSCo4','W53cRSksed1pfLm','W6RcHmk2otW','44kk5OYd56A644oI6k685yw26i+C5y+m5lUp5lQv6lwk5y2C5lIEWRlcSSoUtHZcVmk755Qm5O+v5lYd55AtWQZdPmojeSk2WOxNMQVKU6VKUA/NRj7LIPlOJBZLJ6m','uCkvW6pcPZX4zde1Ds5fACkPsmoYWO5SW6vlWPVcSCkHk8k4A8oFwGZcMmoZiJ4yW6JdS8k2hsSgFWTT','W6/cUxXhcSkmWOq','gSkvW4pdLSkB','hSkRE8kRDW','cbldOhS','W5ZdQSooFCoX','jmohW447WQ4','rCkLCSoJW60','uHe+WPFcSG','bwRcLw9+WQTt','sJDormk3FSoXgH7dUSocbmkIwxpdUCohvxxdGNa4W7pcLSkqiCo4WOZcJr3dGdxdPmoYW7bfWQjFWQddTmouW5SW','W7BcVmoN','ESkhWOJdKcK','W7pdJCoj','W7XwW6/cLLS','A8k5W7lcTGa','W7xcMNNcHG','W6KvwqNdOmkNW5
2024-06-28 07:47:44 +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