mirror of https://github.com/6dylan6/jdpro.git
15 lines
36 KiB
JavaScript
15 lines
36 KiB
JavaScript
|
/*
|
||
|
京东快递优惠券领券
|
||
|
|
||
|
[task_local]
|
||
|
#京东快递领卷
|
||
|
5 10 * * * jd_jdkdcoupon.js, tag=京东快递领卷, enabled=true
|
||
|
|
||
|
*/
|
||
|
|
||
|
|
||
|
const $ = new Env('快递领卷');
|
||
|
var _0xod0='jsjiami.com.v7';const _0x3eec45=_0x2158;(function(_0x5e11fc,_0x26b362,_0x55a8e4,_0x435212,_0x3cff17,_0x479704,_0xe28ed2){return _0x5e11fc=_0x5e11fc>>0x6,_0x479704='hs',_0xe28ed2='hs',function(_0x515598,_0x4a35ea,_0x72ada2,_0x1c5406,_0x35f604){const _0x35b04a=_0x2158;_0x1c5406='tfi',_0x479704=_0x1c5406+_0x479704,_0x35f604='up',_0xe28ed2+=_0x35f604,_0x479704=_0x72ada2(_0x479704),_0xe28ed2=_0x72ada2(_0xe28ed2),_0x72ada2=0x0;const _0x338e27=_0x515598();while(!![]&&--_0x435212+_0x4a35ea){try{_0x1c5406=-parseInt(_0x35b04a(0x17e,'G8TQ'))/0x1*(parseInt(_0x35b04a(0x163,'ln^%'))/0x2)+-parseInt(_0x35b04a(0x10c,'QMWW'))/0x3+parseInt(_0x35b04a(0x184,'L5RU'))/0x4*(parseInt(_0x35b04a(0xdc,'uj^b'))/0x5)+-parseInt(_0x35b04a(0x160,'i6OA'))/0x6*(-parseInt(_0x35b04a(0xd8,'Y#aq'))/0x7)+parseInt(_0x35b04a(0xc3,'OJzT'))/0x8*(-parseInt(_0x35b04a(0x18d,'j*]4'))/0x9)+parseInt(_0x35b04a(0x111,'y5@f'))/0xa*(-parseInt(_0x35b04a(0x1a2,'QMWW'))/0xb)+parseInt(_0x35b04a(0x108,'bFcg'))/0xc*(parseInt(_0x35b04a(0xc6,'wWcq'))/0xd);}catch(_0x16b672){_0x1c5406=_0x72ada2;}finally{_0x35f604=_0x338e27[_0x479704]();if(_0x5e11fc<=_0x435212)_0x72ada2?_0x3cff17?_0x1c5406=_0x35f604:_0x3cff17=_0x35f604:_0x72ada2=_0x35f604;else{if(_0x72ada2==_0x3cff17['replace'](/[tNWyhJVkxpPTEGYUDnA=]/g,'')){if(_0x1c5406===_0x4a35ea){_0x338e27['un'+_0x479704](_0x35f604);break;}_0x338e27[_0xe28ed2](_0x35f604);}}}}}(_0x55a8e4,_0x26b362,function(_0x4064c0,_0x5e324b,_0x580592,_0x476fd1,_0x2cde08,_0x449d2c,_0x5d191d){return _0x5e324b='\x73\x70\x6c\x69\x74',_0x4064c0=arguments[0x0],_0x4064c0=_0x4064c0[_0x5e324b](''),_0x580592='\x72\x65\x76\x65\x72\x73\x65',_0x4064c0=_0x4064c0[_0x580592]('\x76'),_0x476fd1='\x6a\x6f\x69\x6e',(0x159092,_0x4064c0[_0x476fd1](''));});}(0x2f80,0x8f67e,_0x4c1a,0xc0),_0x4c1a)&&(_0xod0=_0x3eec45(0x110,'j*]4'));const notify=$[_0x3eec45(0x109,'$U9^')]()?require('./sendNotify'):'',jdCookieNode=$['isNode']()?require(_0x3eec45(0x170,'q(u9')):'';let cookiesArr=[],cookie='';function _0x4c1a(){const _0x5263f4=(function(){return[_0xod0,'kjNtsjDiEtWaTGnmDpip.cxomP.vEh7YAVJnGUyh==','W7dcKComWQ7cTG','W6urW5TaWP4','W7fpFSkB','WOldHCoSpmkcmmktW7RcUa','w8oAzf57W5ldMCo9hue/xCkOWR4CW6bgW77cOmk/WPD/W6qPF2m3WOxdSSo+bdpcHW8iWRyJWRS4kK/cL8oJ','kNJdHbfGW73dMSk2WPGqhCkpoxVdJ8oLW5dcSsJcNZ/dVG/dMKFcS27cTfJdNmknWP8wW6bYCCk2sY/cUd8vW7zgW7i0WQjMBCkImCkQDCovWR51W59VW5fPhqbIpSkyW4BcQ8kaW5RdNwuFmSozW4ldQmkZuHZcOSkgW7fFhsVdV8o+WPlcRmorW685WQ1TW4NcKSkIW5qLuCkWp0SWcZKeW7Ocq8kbW7ZdULP9WPFcTvO3dcC7W4pdPmo9v8oZW6rwWPFcUrRdRCk4W4rJs1/dOLpdJvDdW6xcV8kTW5ldI17cRmoeW4/dUrelWRdcRmoTA8opWQbfW4NdTx0eW5lcJ2ldJsRdT8oqW5y1W6ZcOKNcU8k1ySkxh8oNW7y8','mCo0wxjXzgqg','WOHrW50pWP5oW67dMwH6WPj6','DqhdQtRdNWmqjCoSmLZdKa','FmoaahOyW70','oXZdOs0z','WO4Fa8kIWQeNWO/cMdqVWQ/cOmoE','jGddTsaf','CstcGv0','W4vjcXldUhri','5lUU5lMT6lA95y6Z','WPu7d0C','WRrgWOVcQxX5t8oOW6OLkbRdM8kAhCkFWPtdJvK','5lIw5lUO5P+r5yUY5zQp6l6M5zIK56UY5PA95O+h','DeeZW4hdVKZcJevwW7y','W4rddtpdUgnb','W5PrW60','lhddIWdORAtMSz7LPidOTjFVV4BORkNMOkFMNQtNVlBOT43PHkRORQK','dmkvW4pdPL4','C30c','W7i8zJmu','ldWGWQxcTvBcLCokAa','qdPjrIW','WPeQs8otW5e','WOBcRmoFyHu1mGtcPGtcHmo1','ccqIW4VcKSkJW6ldQq','W6eEW7XEW7K','CgP/WRJcTG','WO8lWR1gqmk9rmksW5jNrG','BfW9mmoQ','W7vvxSkhW6NcQYNcMW','Dx0Gg8oM','WP7dMCko','W4tdM0RcNG','cSoMuwu','W53cKCkOn8kgbSkB','jutcRx7cLaf4u8oRCHNcH8knW6bIWPGNsCkBWPi','W5jAECo5W7r/W5y','wuldVJVdNx1CvW','kg4keKlcPtJdNG','WQTtWPBcRq','W6VcUCoBW5NdKCo6jSkwW5bypmoQamoMWOBdGCkOn04Qd3RdJwxdQs4fW4f/k8kHWPHp','W5jhuCoZW6S','WPFdLCk8hUIVKUAXGUwLLoI1To+/SUIUU+AGIUADMEE8TUI1IUMhMUITLa','z8oUbftcTW','tctcIeaUWR3cSCk5WO0EdCkpmtddRmoUW43dVxFcHd3cIw3cTX/dOWZdQHxcNSoIWP95WPnYymkHnMJcIgvqW7qnWQnXWQajimolmCofbSovW4z8W51BW5u7s0uxkmoyWQhdImouW5xdI3ukpmokWO/cTCoYua7dICoSW5j3mYxdS8kyW5VdP8kuW69EW6GSW4JcI8o5W5zjfmoGFWXVsYChW68aESkpW63dUJCYW5xdVKuMrZq0WQBdT8kdlSoHWOCfW4lcH1RcS8kKW4zGseNdSq','ASkrnSou','dmotW5HkWRikWR/cPYpcSqFdOmkjWQhcT1n/rI7dSSo+WPmeW6tdImovW4CVFSkgxCo0ivBdNSoPW5hdHcZdHSo0FuufWQ/cKCoBqfCjW5eOW6RdHq','W5NcKCohW7NdVW','WPyHDq','dCouW6bvWQzzW74','zY7dQmkmpG','iCoqtCkdW6CgWRi','rSo+W4exiqG','W7bRkdldUG','AwzdWPRcL0ZcRCoG','W5BdHSkDuxW','xMz/WOxcJedcSmo
|
||
|
// 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
|