mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-14 07:29:18 +08:00
13 lines
167 KiB
JavaScript
13 lines
167 KiB
JavaScript
|
/**
|
|||
|
2023/2/7 create
|
|||
|
2023/3/15 fix
|
|||
|
只积分换豆,换积分用jd_washbean.js
|
|||
|
默认定时不执行,自行设置
|
|||
|
33 2 1 1 * https://raw.githubusercontent.com/6dylan6/jdpro/main/jd_fen2bean.js
|
|||
|
问题建议TG -> https://t.me/dylan_jdpro
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('物流积分换豆');
|
|||
|
(function(_0x3e44ff,_0x51dd51){const _0x2261c3={_0x543eae:'\x30\x78\x32\x32\x31',_0x221fc3:'\x33\x2a\x65\x46',_0xd41bdb:'\x30\x78\x33\x30\x30',_0x4c67d1:'\x75\x62\x78\x64',_0x3c4bd1:'\x30\x78\x64\x31',_0xb45b77:'\x30\x78\x31\x62\x30',_0x15c03f:'\x30\x78\x31\x38\x62',_0x2d3455:'\x30\x78\x31\x32\x32'},_0x56c5d3={_0x2dc19f:'\x30\x78\x35\x61'};function _0x2f3404(_0x1e2832,_0x1b99ec){return _0x335b(_0x1e2832- -'\x30\x78\x32\x62\x38',_0x1b99ec);}const _0xd44f7b=_0x3e44ff();function _0x4b0912(_0x14f630,_0x2897ba){return _0x335b(_0x14f630- -_0x56c5d3._0x2dc19f,_0x2897ba);}while(!![]){try{const _0x2a2383=-parseInt(_0x4b0912('\x30\x78\x33\x38\x64','\x32\x4f\x70\x76'))/(0x25*0xaf+0x2f6*-0x4+-0xd72*0x1)+parseInt(_0x4b0912(_0x2261c3._0x543eae,_0x2261c3._0x221fc3))/(-0x18e7+-0x7*0x4e7+0x3b3a)+parseInt(_0x2f3404(-'\x30\x78\x61\x38','\x72\x47\x67\x35'))/(0x1c6c+0x1*0x7f1+-0x245a)+-parseInt(_0x4b0912(_0x2261c3._0xd41bdb,_0x2261c3._0x4c67d1))/(0xdf8+-0x30e+-0x3e*0x2d)*(parseInt(_0x2f3404(-_0x2261c3._0x3c4bd1,'\x72\x76\x73\x26'))/(0x19*0x92+0x3df+0x2*-0x90e))+parseInt(_0x4b0912(_0x2261c3._0xb45b77,'\x6f\x70\x66\x6a'))/(0xb1b*-0x1+-0xd02+-0x1*-0x1823)*(parseInt(_0x4b0912(_0x2261c3._0x15c03f,'\x25\x78\x4b\x25'))/(0x14eb+-0x231c+-0x34*-0x46))+parseInt(_0x2f3404(_0x2261c3._0x2d3455,'\x6c\x47\x50\x66'))/(0xd*-0x223+0x9d*0x16+0xe51)+-parseInt(_0x4b0912('\x30\x78\x34\x30\x35','\x43\x4b\x31\x32'))/(-0x24cc+0x453*0x1+0x2082);if(_0x2a2383===_0x51dd51)break;else _0xd44f7b['push'](_0xd44f7b['shift']());}catch(_0x55f239){_0xd44f7b['push'](_0xd44f7b['shift']());}}}(_0x3edc,0x1204*-0x11+-0x2*0x22b62+0x7f22a));const _0x2ddbd8=(function(){let _0x3882ea=!![];return function(_0x5b74c8,_0x15f8d2){const _0xa4bb36={_0x2338e3:'\x30\x78\x33\x63\x34',_0x207c54:'\x30\x78\x32\x66\x36'},_0x39cbf3={_0x5e1121:'\x30\x78\x31\x35\x37'},_0x5088f5=_0x3882ea?function(){function _0x41e25b(_0x2472a2,_0xc8275b){return _0x335b(_0xc8275b-_0x39cbf3._0x5e1121,_0x2472a2);}function _0x37b573(_0x1d0179,_0x191c5c){return _0x335b(_0x191c5c-'\x30\x78\x35\x35',_0x1d0179);}if('\x47\x65\x6a\x64\x67'!==_0x37b573('\x28\x74\x28\x31',_0xa4bb36._0x2338e3))return!![];else{if(_0x15f8d2){const _0x2c7b27=_0x15f8d2[_0x37b573('\x38\x5e\x28\x4a',_0xa4bb36._0x207c54)](_0x5b74c8,arguments);return _0x15f8d2=null,_0x2c7b27;}}}:function(){};return _0x3882ea=![],_0x5088f5;};}()),_0x5ca337=_0x2ddbd8(this,function(){const _0x340bfb={_0x142202:'\x6f\x70\x66\x6a',_0x9aa279:'\x30\x78\x32\x30\x65',_0x10d345:'\x24\x21\x28\x78',_0x27eead:'\x30\x78\x33\x35\x31',_0x699369:'\x6d\x6d\x62\x25',_0x3bcdfd:'\x30\x78\x63\x32',_0x279b4a:'\x43\x4b\x31\x32'},_0x303ddd={_0x37ed02:'\x30\x78\x32\x66\x36'},_0x240762={};_0x240762[_0x273c1a('\x30\x78\x38\x32',_0x340bfb._0x142202)]=_0x273c1a('\x30\x78\x31\x37\x35','\x6f\x70\x66\x6a');function _0x273c1a(_0x9f630c,_0x43bc8c){return _0x335b(_0x9f630c- -_0x303ddd._0x37ed02,_0x43bc8c);}function _0x2de178(_0x1c34c8,_0x5630be){return _0x335b(_0x5630be- -'\x30\x78\x38\x65',_0x1c34c8);}const _0x13f943=_0x240762;return _0x5ca337[_0x2de178('\x37\x74\x23\x53',_0x340bfb._0x9aa279)]()[_0x2de178(_0x340bfb._0x10d345,_0x340bfb._0x27eead)](_0x13f943[_0x273c1a(-'\x30\x78\x37\x38',_0x340bfb._0x699369)])[_0x273c1a(_0x340bfb._0x3bcdfd,_0x340bfb._0x279b4a)]()['\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72'](_0x5ca337)[_0x2de178('\x7a\x6b\x2a\x67','\x30\x78\x33\x32\x39')](_0x13f943['\x46\x67\x6f\x74\x64']);});_0x5ca337();function _0x12daec(_0x2c7568,_0x5dc7b8){const _0x5e49ae={_0x582ea3:'\x30\x78\x32\x39\x30'};return _0x335b(_0x2c7568-_0x5e49ae._0x582ea3,_0x5dc7b8);}const _0x596636=(function(){const _0x398000={_0x470868:'\x4c\x61\x5a\x4e',_0x290254:'\x30\x78\x31\x66\x39',_0x548a62:'\x72\x47\x67\x35',_0x5d7d3c:'\x30\x78\x33\x61\x63'},_0x10b13d={_0x2091a8:'\x30\x78\x36\x38\x64',_0x2e9daa:'\x25\x78\x4b\x25'},_0x578855={_0x321a91:'\x6f\x51\x59\x44',_0x3793b7:'\x30\x78\x35\x62\x66',_0x2af5d3:'\x30\x78\x37\x30\x64',_0x4d4b94:'\x35\x52\x7a\x47'},_0x14a221={_0x18f14a:'\x30\x78\x33\x38\x62'},_0x28bbaf={_0x5610a6:'\x30\x78\x39\x36'};function _0x4f3988(_0x57c394,_0x33fc20){return _0x335b(_0x57c394- -_0x28bbaf._0x5610a6
|
|||
|
|
|||
|
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
|