KR/jd_XLDT.js

26 lines
88 KiB
JavaScript
Raw Normal View History

2023-07-31 11:46:58 +08:00
/*
骁龙答题
随机答题 抽奖
有水的时候运行
请求太频繁会被黑ip
过10分钟再执行
cron:11 11 11 11 *
============Quantumultx===============
[task_local]
#骁龙答题
11 11 11 11 * jd_XLDT.js, tag=骁龙答题, enabled=true
*/
const $ = new Env('骁龙答题')
2023-08-01 11:18:44 +08:00
var version_='jsjiami.com.v7';function Iii11l(){const I1IIIi=(function(){return[version_,'UjlsMjpJiabOYmhi.RcAAohXbmLR.RfvE7VJqAIQ==','qCoMqSkJW40','W7NdM8ksyty','WOLqWR7cPmoV','WP7MIjlKU74l','WRehECkE','W4JcNeRcSby','qH9Iwqq','jcODW43cUa','edyX','n3/cISoWW47dJG','tCoBBY7cOW','W7FdM1NdPSoab3qVfv/dMuC','wmkLaWy','tmoIWOBdM8oB','W5yLWO8xEN9O','jJFdICoerCoFW5BcSCkQtw7dOHrbWPhdKv1uBNhcH8oXe8o8W7lcMSkSWP7cSSkKnSkIwCkkDmoygCknaKxcUmoQW5zLDmofctW','nMVcHSoNW5xdKq','WOf7W5HXiIu4z8oAutJdGv0','nh4fW4vMW6TnW7/dTSoNW5Ovhb7dSG','emomWOu2W5S','WRtcNhzCvSk0mSolWQ7cRmombSkjwG','WR8gsrZdMa','F8oKWQFcGrmnfmo1bCoRW7tdPtrP','dYW1W6xcJSkzW50','5BYp5y2m5lIv5yUh','WPTsWPFcN8oKBW','W4/cJ3hcUJO','WRusAGJdVG','8jUgNE+6JLm','W7RdGmk8WQTOrG','8kwsTSoAW6RNQ6ZMSOa','W5yiWQldGSow','zdBdK8ozq8ocW5S','W4BdICkfWPNcPmk/d8k/WOxdTCkan8o1fmkeFM/dMLxcLSoUW7O6W55icMddL8kqbSoLvCkMpSkwA8oZW6VdQCoIWQtcVMNcOYNdKG','Bmk/WQZdSmkt','W4/dNSkfWOdcOCoSvmoPWQddQ8oz','y8onA8k6DG','W4OXWQC6ra','j8oEW4FdK8k5W5dcScRdRddcQq','pZy5W63cGSkpW53cSHe','cZG/W7i','b2VcJSkmW7RdTx4','8kETVCkN5OoW5zAq6i6r5BYS','sSkCD8ouca','WOy3W5S/j247BmkKzeVdQa8','6Acc6kwM5zUc54Us776U','WOPQWPNcUmow','W7JdGmk0','W7ZdISkCWQP2','WODzWR/dLKffW7e2W43cKq','zCo+qmkLtqpdHa','W70aWQhdGmoV','WOhcTeLNq8kNjW','W7VdGmkHWRPkxwRcV8k5AW','W4xdI8kYWRGjW4JdL8kogSoa','EtZdRt18','WOpcV0X2zG','W6L+W6ldJmkd','WPtWSisW','W4/cR0RcJXKwW7hdHHq','W6pdNcVcKW0','WPj0WRVcVSox','rXblsZG','W6BcO8oYWOqGmSoGf2RcIxac','WPLqWPFcImo9','W7VdLCkJWRDW','mg8dW4nIW49CW7xdHSoPW5me','hvlcGSoBW4C','WP5FWP7cIa','BmkgyG','WRCUAtpdHqKBpg1ToCo7mmoFW5e4oeCQFfrTxSoNqSkNW7/dHSoXi8k1sSonWPb5WPNdJ8oVcCkLuwtcHmklA8kVW4xcPIeQqvldRgvXW5/dItRdRCoVorFdR2RcTKvQaLJcHSo0W5BcVCoYWPpdUbhcOdddQCoJWOlcJrhdJt8zW6ZdKbRcSCkvua7dQSkpW7dcIMuYW6vsWQldQSoBW53dQtddRHqeAbyaW59pkCo0W5FcIW','F8kRgaWes8kSW7ON','W5FcLmogWR8J','tmoorNGk','W6pcPxpdT3dcQCoxW5JdH8kcjmkTh8kVWPi','W5FcMmokWOO0','s8ogWOW','sCkOWQddLCkxuq4AWPK','W4ZcMgnPbW','eJG7W6m','tCk9aXyz','qSoQwSk/W4S','o3qsW4DEW6nuW6m','W7VdGmk7W7nNxxhcVCk2DW','W47dLWhcJa','t8kcx8oTeq','W7xdNLddVmoa','W4xcU8oOWQCh','WOJdU11XvmohvSoBWOS','BH1RzG','kMVcKmosW43dGSkE','wCoqWQFdLmos','A0ZcMGC','W6hdI0JdMmonpNiVpG','tX9pFIy','kxhcGW','W7KqWP7dQ8oOxmk7','kxVcISoZW5xdIW','ySkZz8oQoa','W7pcQfZdN2C','WRLkWRJcMmoX','wZVdLSomBq','WQmezapdVG','W6vKW4tdI8kso8oBW6pcKHO','W7FcOvJcJsW','WOhdGMnUDG','WOvjWP3cRSow','uCk1WR3dSmkEEqC','W5tcHMbZjWZdGmkVWRD7','xcb3mSkq','WQf9WQxcJ8ol','W7pcS3xdOxFcS8o0W5NdRmk8pSkT','5lMn5yU75A2j5OIL776V6i+t5B2b5P+Q5l2N77+h','W7pdISkKWOil','WOPvWQW','W4eUWPG2F2y','W7xdHqNcMWZdN8kOuW','iSopW5ldJCkmW5BcQIFdJddcUq','u8o6uSkH','WPJdRuXTuSo7tmoCWQBcNW','WPX6WOVcVCoUmWJcTa','vSonWQdcQcW','W6/dGmk7WO9Xv23cOSk2Fw/cIIPcqG','44ke5lId5lUp6lsn5y6z','8j2gGU+6R8kk5lIX5lIo5lMj','W6VcQhtdT3VcLCo9','W6KuWP7dQ8oR','WOddTK17xG','mConW4JdGmkvW5i','smkRhaideW','8jgeI++7HSkw','WRRdM2r6DG','8ygNGU+7OSoP5lQX5lUX5lQm','WPxcVMPYAa','W6bPW6RdP8kY','fSkafwJdPXtdTCk9CmoJBmosWONdKfBdIa','W6NdHSk7WRDYw2RcR8kwDG','eCkrW6tdR2LsW6SDaG','c8kAW6pdUhrPW50','nhmcW5T1W7a','WRFcMq/cRmknvYKGog/dHv3cRa','W694WOa','WRVcVgjnrq','W6VcPCo0WPSHrCkQs3xcKNmDj8kzWPSIW6hcRSkgwCoRW70jWOFcIHih','WO8aDXtdJG','WO7dSu9QB8o8rCoD','rmoFr8kJtq','wmk0WRRdGCkxAJivWPeeWQi','WO59WONcRmoemXxcPCod','wmoUuSkguWFdKq','W6m4WOXSW7q','W4zwW7ldUmk3','uSoPvmkVtsVdK2lcLNtcQrm','WOFdSuP1smoZtSox','W7mJWP3dLmoa','W6FdL0NdLmoe','5Rw+5yQ257I35P+l','W77dGLBdSmo1','W43cNNvAoW','W5RdRCk3WO7cPa','ysFdLmoAuCkFWPhdT8oPrgVdQqbFW47dMuLnlJFcH8oYcCo6W6ZcL8kRWPVdSSkJpCkU','W7OmWPSQvq','b8o6W4ldGmk7','t8otWR3dICoT','W4CVWQbgW5CnWRNcVJtcUt5ar8knWQK','t8k0gW4z','smkyWQ/dKCkF','W6tdL8k5','WQ7dQSk4gmoS','WPDpWQ7dJenfW6OHW43cKrxdTCoQW6/dN0u','ggZcK8kPW7pdNxFcI8oc','nCkzW5/dHgS','W4FdNCk4WRKy','WP7cTeLHtSk0','6iYz5y2RWPlcHSk4W65jW7xLP5JOTQO','W6ZcP33dTW','W7dcO2pdP2/cRG','W6eTWRddLSoX','W5xcGfnokW','l8odW4e','xsr/dCka','CmofDLmD','W6KVW7lcNSkI','WPD8WORcJmoqka','WQFcUKTKCG','jh3cLCkhW64','rmkTbWa1','b3xcSmk/W4e','WRJdOvVcR09kvG','b8kAW6pdIwvlW54','q8oJDf4n','B8orWQW1W6ldKfRcVCk3u0tcOGxcN8oCeSkwW6jFd8oqW7hcN1RcHqasAmoAqr9kW7RcQdxcVeDaDIKAbqlcQSolqSkwrmooWRj0nmomu8kPrYmwb8knW5JcK8kfW6O','r3RcK8kKW7hdRNhcHmkcW77d
2023-07-31 11:46:58 +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