jdpro/jd_txtotal.js

9 lines
60 KiB
JavaScript
Raw Normal View History

2024-01-02 12:59:48 +00:00
/*
统计转赚红包和特价抽现金提现金额
1 1 11 1 * https://raw.githubusercontent.com/6dylan6/jdpro/main/jd_txtotal.js
*/
const $ = new Env('抽现金提现统计');
2024-01-20 12:29:25 +00:00
var _0xod6='jsjiami.com.v7';function _0x13a3(_0xeaaad7,_0x5e2522){const _0x2fe8dc=_0xcd76();return _0x13a3=function(_0x4bdad6,_0x291432){_0x4bdad6=_0x4bdad6-0x1c8;let _0xcd7691=_0x2fe8dc[_0x4bdad6];if(_0x13a3['yeUXql']===undefined){var _0x13a309=function(_0x4a0112){const _0x38573f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x43fb6c='',_0x3ec26f='',_0x1e133e=_0x43fb6c+_0x13a309;for(let _0x53d45a=0x0,_0x53366a,_0x230b55,_0x506a7b=0x0;_0x230b55=_0x4a0112['charAt'](_0x506a7b++);~_0x230b55&&(_0x53366a=_0x53d45a%0x4?_0x53366a*0x40+_0x230b55:_0x230b55,_0x53d45a++%0x4)?_0x43fb6c+=_0x1e133e['charCodeAt'](_0x506a7b+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x53366a>>(-0x2*_0x53d45a&0x6)):_0x53d45a:0x0){_0x230b55=_0x38573f['indexOf'](_0x230b55);}for(let _0x26d079=0x0,_0x309e54=_0x43fb6c['length'];_0x26d079<_0x309e54;_0x26d079++){_0x3ec26f+='%'+('00'+_0x43fb6c['charCodeAt'](_0x26d079)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3ec26f);};const _0x204192=function(_0x37caba,_0x4f82b4){let _0x1e19b3=[],_0x29ee84=0x0,_0x9a56db,_0x564beb='';_0x37caba=_0x13a309(_0x37caba);let _0xc2272b;for(_0xc2272b=0x0;_0xc2272b<0x100;_0xc2272b++){_0x1e19b3[_0xc2272b]=_0xc2272b;}for(_0xc2272b=0x0;_0xc2272b<0x100;_0xc2272b++){_0x29ee84=(_0x29ee84+_0x1e19b3[_0xc2272b]+_0x4f82b4['charCodeAt'](_0xc2272b%_0x4f82b4['length']))%0x100,_0x9a56db=_0x1e19b3[_0xc2272b],_0x1e19b3[_0xc2272b]=_0x1e19b3[_0x29ee84],_0x1e19b3[_0x29ee84]=_0x9a56db;}_0xc2272b=0x0,_0x29ee84=0x0;for(let _0xbccece=0x0;_0xbccece<_0x37caba['length'];_0xbccece++){_0xc2272b=(_0xc2272b+0x1)%0x100,_0x29ee84=(_0x29ee84+_0x1e19b3[_0xc2272b])%0x100,_0x9a56db=_0x1e19b3[_0xc2272b],_0x1e19b3[_0xc2272b]=_0x1e19b3[_0x29ee84],_0x1e19b3[_0x29ee84]=_0x9a56db,_0x564beb+=String['fromCharCode'](_0x37caba['charCodeAt'](_0xbccece)^_0x1e19b3[(_0x1e19b3[_0xc2272b]+_0x1e19b3[_0x29ee84])%0x100]);}return _0x564beb;};_0x13a3['XPUyqu']=_0x204192,_0xeaaad7=arguments,_0x13a3['yeUXql']=!![];}const _0x1591b1=_0x2fe8dc[0x0],_0x1dff38=_0x4bdad6+_0x1591b1,_0x4f4f41=_0xeaaad7[_0x1dff38];if(!_0x4f4f41){if(_0x13a3['uqCUsR']===undefined){const _0x470b2e=function(_0x3ef627){this['czwiwS']=_0x3ef627,this['wiswWr']=[0x1,0x0,0x0],this['MyapLe']=function(){return'newState';},this['MfjTSq']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['OXTWmh']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x470b2e['prototype']['bcatHB']=function(){const _0x27b7b2=new RegExp(this['MfjTSq']+this['OXTWmh']),_0x429ce9=_0x27b7b2['test'](this['MyapLe']['toString']())?--this['wiswWr'][0x1]:--this['wiswWr'][0x0];return this['aJvrwD'](_0x429ce9);},_0x470b2e['prototype']['aJvrwD']=function(_0x134946){if(!Boolean(~_0x134946))return _0x134946;return this['wIOGTA'](this['czwiwS']);},_0x470b2e['prototype']['wIOGTA']=function(_0x3a2189){for(let _0x4d9ead=0x0,_0x483c66=this['wiswWr']['length'];_0x4d9ead<_0x483c66;_0x4d9ead++){this['wiswWr']['push'](Math['round'](Math['random']())),_0x483c66=this['wiswWr']['length'];}return _0x3a2189(this['wiswWr'][0x0]);},new _0x470b2e(_0x13a3)['bcatHB'](),_0x13a3['uqCUsR']=!![];}_0xcd7691=_0x13a3['XPUyqu'](_0xcd7691,_0x291432),_0xeaaad7[_0x1dff38]=_0xcd7691;}else _0xcd7691=_0x4f4f41;return _0xcd7691;},_0x13a3(_0xeaaad7,_0x5e2522);}const _0x31fe5f=_0x13a3;(function(_0xa0c29d,_0x18632b,_0x28c502,_0x15b4ad,_0x35c421,_0x368ad0,_0x2a67d6){return _0xa0c29d=_0xa0c29d>>0x2,_0x368ad0='hs',_0x2a67d6='hs',function(_0x41bb62,_0x3336a0,_0x90b548,_0x3f316e,_0x57d092){const _0x1aa42f=_0x13a3;_0x3f316e='tfi',_0x368ad0=_0x3f316e+_0x368ad0,_0x57d092='up',_0x2a67d6+=_0x57d092,_0x368ad0=_0x90b548(_0x368ad0),_0x2a67d6=_0x90b548(_0x2a67d6),_0x90b548=0x0;const _0x38fb0a=_0x41bb62();while(!![]&&--_0x15b4ad+_0x3336a0){try{_0x3f316e=-parseInt(_0x1aa42f(0x2a5,'Bh)!'))/0x1*(-parseInt(_0x1aa42f(0x282,'rMxN'))/0x2)+-parseInt(_0x1aa42f(0x279,'[tMe'))/0x3*(parseInt(_0x1aa42f(0x355,'^HRm'))/0x4)+-parseInt(_0x1aa42f(0x3bb,'Xa%D'))/0x5*(-parseInt(_0x1aa42f(0x228,'Wprg'))/0x6)+-parseInt(_0x1aa42f(0x20d,'kc9N'))/0x7+parseInt(_0x1aa42f(0x1ec,'J@Xc'))/0x8+parseInt(_0x1aa42f(0x3e7,'HZzw'))/0x9+-parseInt(_0x1aa42f(0x2dd,'$8cG'))/0
2024-01-02 12:59:48 +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