jdpro/jd_zwb.js

7 lines
93 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
2024-06-30 10:40:42 +00:00
22 10 * * * jd_zwb.js
2024-06-28 07:47:44 +00:00
*/
const $ = new Env('做任务赚汪贝');
2024-07-14 06:36:59 +00:00
var _0xodG='jsjiami.com.v7';const _0x22d3a3=_0x5e02;(function(_0x2682fc,_0x461d4d,_0x16f494,_0x3419c0,_0x1074d3,_0x4f1eb8,_0x1b929f){return _0x2682fc=_0x2682fc>>0x5,_0x4f1eb8='hs',_0x1b929f='hs',function(_0x1fd1aa,_0x40fcd4,_0x5bc1ee,_0x5d9d81,_0x4e3a1a){const _0x2861ec=_0x5e02;_0x5d9d81='tfi',_0x4f1eb8=_0x5d9d81+_0x4f1eb8,_0x4e3a1a='up',_0x1b929f+=_0x4e3a1a,_0x4f1eb8=_0x5bc1ee(_0x4f1eb8),_0x1b929f=_0x5bc1ee(_0x1b929f),_0x5bc1ee=0x0;const _0x47666a=_0x1fd1aa();while(!![]&&--_0x3419c0+_0x40fcd4){try{_0x5d9d81=-parseInt(_0x2861ec(0x411,'rOM^'))/0x1+parseInt(_0x2861ec(0x53d,'NDy)'))/0x2*(parseInt(_0x2861ec(0x58f,')0)['))/0x3)+parseInt(_0x2861ec(0x58c,'#PpA'))/0x4+-parseInt(_0x2861ec(0x41c,'lX)E'))/0x5*(parseInt(_0x2861ec(0x3b6,'U2]L'))/0x6)+parseInt(_0x2861ec(0x1a8,'a!LL'))/0x7+-parseInt(_0x2861ec(0x1c1,'fL4H'))/0x8*(-parseInt(_0x2861ec(0x245,'^xz1'))/0x9)+parseInt(_0x2861ec(0x44f,'rOM^'))/0xa*(-parseInt(_0x2861ec(0x580,'2T2X'))/0xb);}catch(_0x58e09d){_0x5d9d81=_0x5bc1ee;}finally{_0x4e3a1a=_0x47666a[_0x4f1eb8]();if(_0x2682fc<=_0x3419c0)_0x5bc1ee?_0x1074d3?_0x5d9d81=_0x4e3a1a:_0x1074d3=_0x4e3a1a:_0x5bc1ee=_0x4e3a1a;else{if(_0x5bc1ee==_0x1074d3['replace'](/[IlnOkwfGELDKbuAYeCp=]/g,'')){if(_0x5d9d81===_0x40fcd4){_0x47666a['un'+_0x4f1eb8](_0x4e3a1a);break;}_0x47666a[_0x1b929f](_0x4e3a1a);}}}}}(_0x16f494,_0x461d4d,function(_0x5ad5f4,_0x2139e0,_0x46bc9f,_0x4d75b8,_0x1a1f7f,_0x41f2bb,_0x40ed41){return _0x2139e0='\x73\x70\x6c\x69\x74',_0x5ad5f4=arguments[0x0],_0x5ad5f4=_0x5ad5f4[_0x2139e0](''),_0x46bc9f=`\x72\x65\x76\x65\x72\x73\x65`,_0x5ad5f4=_0x5ad5f4[_0x46bc9f]('\x76'),_0x4d75b8=`\x6a\x6f\x69\x6e`,(0x1789be,_0x5ad5f4[_0x4d75b8](''));});}(0x1820,0x9b240,_0x15ab,0xc3),_0x15ab)&&(_0xodG=`\x90c`);const _0x27aef9=(function(){let _0x20832c=!![];return function(_0x4d230b,_0x162092){const _0x4712d2=_0x20832c?function(){const _0x3e546c=_0x5e02;if(_0x162092){const _0x314077=_0x162092[_0x3e546c(0x235,'MwJN')](_0x4d230b,arguments);return _0x162092=null,_0x314077;}}:function(){};return _0x20832c=![],_0x4712d2;};}()),_0x5e65fd=_0x27aef9(this,function(){const _0x57a116=_0x5e02,_0xc569ef={'iJBSr':_0x57a116(0x4fe,'B0Xu')};return _0x5e65fd[_0x57a116(0x2cd,'mZ!u')]()[_0x57a116(0x50c,'V*ek')](_0xc569ef[_0x57a116(0x11a,'vD%K')])[_0x57a116(0x382,'he1P')]()[_0x57a116(0x3fa,')0)[')](_0x5e65fd)[_0x57a116(0x2bc,'D!]R')](_0xc569ef[_0x57a116(0x341,']9PC')]);});_0x5e65fd();function _0x5e02(_0x380f55,_0xc7e952){const _0x27b7de=_0x15ab();return _0x5e02=function(_0xfe4723,_0x562323){_0xfe4723=_0xfe4723-0x116;let _0x15aba6=_0x27b7de[_0xfe4723];if(_0x5e02['wtLygs']===undefined){var _0x5e027c=function(_0x33fbbb){const _0x1a6829='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x7a7741='',_0x2d3d2a='',_0x7a5623=_0x7a7741+_0x5e027c;for(let _0x201f0e=0x0,_0x56eb84,_0x267f0a,_0x124bc6=0x0;_0x267f0a=_0x33fbbb['charAt'](_0x124bc6++);~_0x267f0a&&(_0x56eb84=_0x201f0e%0x4?_0x56eb84*0x40+_0x267f0a:_0x267f0a,_0x201f0e++%0x4)?_0x7a7741+=_0x7a5623['charCodeAt'](_0x124bc6+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x56eb84>>(-0x2*_0x201f0e&0x6)):_0x201f0e:0x0){_0x267f0a=_0x1a6829['indexOf'](_0x267f0a);}for(let _0x441ba4=0x0,_0x49aeca=_0x7a7741['length'];_0x441ba4<_0x49aeca;_0x441ba4++){_0x2d3d2a+='%'+('00'+_0x7a7741['charCodeAt'](_0x441ba4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2d3d2a);};const _0x1ac748=function(_0x125574,_0x55eea1){let _0xffa649=[],_0x413141=0x0,_0x675370,_0x1a0051='';_0x125574=_0x5e027c(_0x125574);let _0x1063fb;for(_0x1063fb=0x0;_0x1063fb<0x100;_0x1063fb++){_0xffa649[_0x1063fb]=_0x1063fb;}for(_0x1063fb=0x0;_0x1063fb<0x100;_0x1063fb++){_0x413141=(_0x413141+_0xffa649[_0x1063fb]+_0x55eea1['charCodeAt'](_0x1063fb%_0x55eea1['length']))%0x100,_0x675370=_0xffa649[_0x1063fb],_0xffa649[_0x1063fb]=_0xffa649[_0x413141],_0xffa649[_0x413141]=_0x675370;}_0x1063fb=0x0,_0x413141=0x0;for(let _0x3356f1=0x0;_0x3356f1<_0x125574['length'];_0x3356f1++){_0x1063fb=(_0x1063fb+0x1)%0x100,_0x413141=(_0x413141+_0xffa649[_0x1063fb])%0x100,_0x675370=_0xffa649[_0x1063fb],_0xffa649[_0x1063fb]=_0xffa649[_0x413141],_0xffa649[_0x413141]=_0x6
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