jdpro/jd_zwb.js

7 lines
94 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-13 12:47:28 +00:00
var _0xodc='jsjiami.com.v7';const _0x1513d6=_0x41f2;(function(_0xd16bd5,_0x3d95f0,_0x332035,_0x5b8c68,_0x34ae7c,_0x25937c,_0x33bb1d){return _0xd16bd5=_0xd16bd5>>0x5,_0x25937c='hs',_0x33bb1d='hs',function(_0x199359,_0x48e67a,_0xd85b8f,_0x8f9968,_0x5af8e1){const _0x2088f3=_0x41f2;_0x8f9968='tfi',_0x25937c=_0x8f9968+_0x25937c,_0x5af8e1='up',_0x33bb1d+=_0x5af8e1,_0x25937c=_0xd85b8f(_0x25937c),_0x33bb1d=_0xd85b8f(_0x33bb1d),_0xd85b8f=0x0;const _0x4e5eda=_0x199359();while(!![]&&--_0x5b8c68+_0x48e67a){try{_0x8f9968=-parseInt(_0x2088f3(0x29a,'gN*f'))/0x1*(-parseInt(_0x2088f3(0x446,'zLZh'))/0x2)+parseInt(_0x2088f3(0x237,'ZoCC'))/0x3*(-parseInt(_0x2088f3(0x5a5,')b2x'))/0x4)+-parseInt(_0x2088f3(0x186,'x(#b'))/0x5*(-parseInt(_0x2088f3(0x280,'837H'))/0x6)+-parseInt(_0x2088f3(0x593,'WiRr'))/0x7+parseInt(_0x2088f3(0x52b,'WiRr'))/0x8*(-parseInt(_0x2088f3(0x288,'LcO8'))/0x9)+parseInt(_0x2088f3(0x48b,'nmXQ'))/0xa+-parseInt(_0x2088f3(0x234,'kUNw'))/0xb*(parseInt(_0x2088f3(0x1cf,'RuiL'))/0xc);}catch(_0x1e4f79){_0x8f9968=_0xd85b8f;}finally{_0x5af8e1=_0x4e5eda[_0x25937c]();if(_0xd16bd5<=_0x5b8c68)_0xd85b8f?_0x34ae7c?_0x8f9968=_0x5af8e1:_0x34ae7c=_0x5af8e1:_0xd85b8f=_0x5af8e1;else{if(_0xd85b8f==_0x34ae7c['replace'](/[lVbwtnyXJLgBNUPCuWA=]/g,'')){if(_0x8f9968===_0x48e67a){_0x4e5eda['un'+_0x25937c](_0x5af8e1);break;}_0x4e5eda[_0x33bb1d](_0x5af8e1);}}}}}(_0x332035,_0x3d95f0,function(_0x259374,_0x23dca7,_0xa04e3e,_0x460e56,_0x455fb7,_0x54c834,_0x2d0ef4){return _0x23dca7='\x73\x70\x6c\x69\x74',_0x259374=arguments[0x0],_0x259374=_0x259374[_0x23dca7](''),_0xa04e3e=`\x72\x65\x76\x65\x72\x73\x65`,_0x259374=_0x259374[_0xa04e3e]('\x76'),_0x460e56=`\x6a\x6f\x69\x6e`,(0x178913,_0x259374[_0x460e56](''));});}(0x18c0,0x7531b,_0x4442,0xc8),_0x4442)&&(_0xodc=`\x06c`);const _0x54d374=(function(){let _0x5a38a7=!![];return function(_0x15456b,_0x1880ab){const _0x310c37=_0x5a38a7?function(){const _0x46f629=_0x41f2;if(_0x1880ab){const _0x47cc9a=_0x1880ab[_0x46f629(0x3eb,']r81')](_0x15456b,arguments);return _0x1880ab=null,_0x47cc9a;}}:function(){};return _0x5a38a7=![],_0x310c37;};}()),_0x4b012d=_0x54d374(this,function(){const _0x4a2b2a=_0x41f2,_0x217ceb={'SInaq':_0x4a2b2a(0x3a1,'nmXQ')};return _0x4b012d[_0x4a2b2a(0x4fd,'aM29')]()[_0x4a2b2a(0x27b,'zLZh')](_0x217ceb[_0x4a2b2a(0x192,'Lj@*')])[_0x4a2b2a(0x56d,'ZoCC')]()[_0x4a2b2a(0x1f5,'zLZh')](_0x4b012d)[_0x4a2b2a(0x463,'RuiL')](_0x217ceb[_0x4a2b2a(0x250,')b2x')]);});_0x4b012d();const _0x2bf4bf=$[_0x1513d6(0x3ec,'3Q9K')]()?require(_0x1513d6(0x2a2,'LNdV')):'',_0x928a39=$[_0x1513d6(0x1bc,'&%2)')]()?require(_0x1513d6(0x326,'%7*2')):'',_0x13c631=require(_0x1513d6(0x44b,'s!6u')),_0x131e48=require(_0x1513d6(0x26e,'h6*o'));let _0x3b7dfb=[],_0x31e562='',_0x1730da=0x0,_0xd89c0a={};if(process[_0x1513d6(0x22a,'gN*f')][_0x1513d6(0x328,'@RCq')]){const _0x5c152d=process[_0x1513d6(0x1ef,'Y6nO')][_0x1513d6(0x36b,'c3lP')]?(process[_0x1513d6(0x510,'[Y]Z')][_0x1513d6(0x4b3,'g!BW')]+_0x1513d6(0x562,'LNdV'))[_0x1513d6(0x2ec,'Nk3x')]('&'):'';if(_0x5c152d=='')try{require(_0x1513d6(0x232,'(Vq#')),_0xd89c0a=require(_0x1513d6(0x15b,'[Y]Z')),$[_0x1513d6(0x4e5,'Nk3x')]=_0xd89c0a[_0x1513d6(0x1c5,'7h!l')]($[_0x1513d6(0x1cc,'&%2)')][_0x1513d6(0x24c,'0#vM')]($)),$[_0x1513d6(0x565,'c3lP')]=_0xd89c0a[_0x1513d6(0x527,'(Vq#')]($[_0x1513d6(0x54e,'[Y]Z')][_0x1513d6(0x241,'(Vq#')]($));}catch{$[_0x1513d6(0x12f,'zLZh')](_0x1513d6(0x4d6,'lsPL')),$[_0x1513d6(0x4e4,'U$$3')]=$[_0x1513d6(0x432,'aprw')],$[_0x1513d6(0x5b3,'7h!l')]=$[_0x1513d6(0x372,'DP09')];}else{if(_0x5c152d[_0x1513d6(0x278,'cmpL')](_0x3b8f99=>process[_0x1513d6(0x191,'5Mr!')][_0x1513d6(0x12d,'&%2)')][_0x1513d6(0x560,'WiRr')](_0x3b8f99))[_0x1513d6(0x42b,'RuiL')]!=0x0)try{require(_0x1513d6(0x390,'Y6nO')),_0xd89c0a=require(_0x1513d6(0x535,'V)1!')),$[_0x1513d6(0x272,'7h!l')]=_0xd89c0a[_0x1513d6(0x224,'zLZh')]($[_0x1513d6(0x37a,'RuiL')][_0x1513d6(0x26a,'5Mr!')]($)),$[_0x1513d6(0x2f3,'[Y]Z')]=_0xd89c0a[_0x1513d6(0x2e3,'gN*f')]($[_0x1513d6(0x2bd,'cmpL')][_0x1513d6(0x49f,'[Y]Z')]($));}catch{$[_0x1513d6(0x516,'Lj@*')](_0x1513d6(0x513,'gN*f')),$[_0x1513d6(0x1c2,'LcO8')]=$[_0x1513d6(0x41f,'DP09')],$[_0x1513d6(
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