krsyer-server-monitor-pro 1.0.31 → 1.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/cli.js ADDED
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { Command } = require('commander');
4
+ const path = require('path');
5
+ const program = new Command();
6
+
7
+ program
8
+ .name('server-monitor')
9
+ .description('Comprehensive server monitoring API and Dashboard')
10
+ .version('1.0.33');
11
+
12
+ const fs = require('fs');
13
+ const { execSync } = require('child_process');
14
+
15
+ program
16
+ .command('start')
17
+ .description('Start the monitoring server')
18
+ .option('-p, --port <number>', 'Port to run on', 3014)
19
+ .action((options) => {
20
+ process.env.PORT = options.port;
21
+ // When running from NPM, we'll point to the obfuscated lib folder
22
+ // For development, we point to src
23
+ const serverPath = process.env.NODE_ENV === 'development'
24
+ ? path.join(__dirname, '../src/server.js')
25
+ : path.join(__dirname, '../lib/server.js');
26
+
27
+ require(serverPath);
28
+ });
29
+
30
+ program
31
+ .command('setup')
32
+ .description('Install as a Systemd service (Linux only, requires sudo)')
33
+ .action(() => {
34
+ if (process.platform !== 'linux') {
35
+ console.error('Service installation is only supported on Linux.');
36
+ return;
37
+ }
38
+
39
+ console.log('Installing Systemd Service...');
40
+
41
+ // Detect current config directory
42
+ const cwd = process.cwd();
43
+ const nodePath = process.execPath;
44
+ const cliPath = __filename;
45
+
46
+ const serviceContent = `[Unit]
47
+ Description=Krsyer Server Monitor Pro
48
+ After=network.target
49
+
50
+ [Service]
51
+ Type=simple
52
+ User=root
53
+ WorkingDirectory=${cwd}
54
+ ExecStart=${nodePath} "${cliPath}" start
55
+ Restart=always
56
+ Environment=NODE_ENV=production
57
+
58
+ [Install]
59
+ WantedBy=multi-user.target
60
+ `;
61
+
62
+ try {
63
+ fs.writeFileSync('/etc/systemd/system/krsyer-monitor.service', serviceContent);
64
+ console.log('Created /etc/systemd/system/krsyer-monitor.service');
65
+
66
+ console.log('Reloading Daemon...');
67
+ execSync('systemctl daemon-reload');
68
+
69
+ console.log('Enabling Service...');
70
+ execSync('systemctl enable krsyer-monitor');
71
+
72
+ console.log('Starting Service...');
73
+ execSync('systemctl start krsyer-monitor');
74
+
75
+ console.log('------------------------------------------------');
76
+ console.log('✅ Service installed and started successfully!');
77
+ console.log('📊 Check status: systemctl status krsyer-monitor');
78
+ console.log('------------------------------------------------');
79
+ } catch (e) {
80
+ console.error('❌ Failed to install service. Please run with sudo.', e.message);
81
+ }
82
+ });
83
+
84
+ program.parse();
@@ -0,0 +1 @@
1
+ const a0_0x58eab3=a0_0x1a4c;(function(_0x39ce0f,_0x263a9e){const _0x2a5ec7=a0_0x1a4c,_0x1e00c0=_0x39ce0f();while(!![]){try{const _0x47148b=parseInt(_0x2a5ec7(0x186))/0x1*(-parseInt(_0x2a5ec7(0x12e))/0x2)+parseInt(_0x2a5ec7(0x156))/0x3+-parseInt(_0x2a5ec7(0x174))/0x4+parseInt(_0x2a5ec7(0x17a))/0x5*(parseInt(_0x2a5ec7(0x190))/0x6)+parseInt(_0x2a5ec7(0x14a))/0x7+parseInt(_0x2a5ec7(0x17b))/0x8+parseInt(_0x2a5ec7(0x185))/0x9*(-parseInt(_0x2a5ec7(0x183))/0xa);if(_0x47148b===_0x263a9e)break;else _0x1e00c0['push'](_0x1e00c0['shift']());}catch(_0x372663){_0x1e00c0['push'](_0x1e00c0['shift']());}}}(a0_0x3f62,0xe9b06));const {exec}=require(a0_0x58eab3(0x130)),util=require(a0_0x58eab3(0x16e)),fs=require('fs')[a0_0x58eab3(0x136)],yaml=require('js-yaml'),os=require('os'),path=require(a0_0x58eab3(0x182)),execPromise=util['promisify'](exec),CONFIG_DIR=process[a0_0x58eab3(0x181)][a0_0x58eab3(0x15d)]||'/etc/cloudflared',DOMAIN_ROOT=process['env'][a0_0x58eab3(0x169)]||'mulasofttechnologies.com',runCommand=async _0x96be63=>{const _0x56bfce=a0_0x58eab3;try{console[_0x56bfce(0x163)](_0x56bfce(0x164)+_0x96be63);const {stdout:_0x122228,stderr:_0x5c38d6}=await execPromise(_0x96be63);if(_0x5c38d6)console[_0x56bfce(0x166)](_0x56bfce(0x187)+_0x96be63+'):',_0x5c38d6);return _0x122228;}catch(_0x5a9f49){if(_0x5a9f49[_0x56bfce(0x176)][_0x56bfce(0x149)](_0x56bfce(0x13b))||_0x5a9f49[_0x56bfce(0x176)]['includes'](_0x56bfce(0x12d))){const _0x218bee=os[_0x56bfce(0x167)]()['username'];throw new Error(_0x56bfce(0x194)+_0x218bee+_0x56bfce(0x12f)+_0x5a9f49[_0x56bfce(0x176)]);}throw _0x5a9f49;}},SUDO_PASS=process[a0_0x58eab3(0x181)]['ADMIN_PASS']||a0_0x58eab3(0x15c),runSudo=async _0x2561a5=>{const _0x2e494b=a0_0x58eab3,_0x39f012=_0x2e494b(0x189)+SUDO_PASS+'\x22\x20|\x20sudo\x20-S\x20'+_0x2561a5;try{const {stdout:_0x484892}=await execPromise(_0x39f012);return _0x484892;}catch(_0x3ce323){throw _0x3ce323;}};function a0_0x1a4c(_0x4ed36b,_0x1212ba){_0x4ed36b=_0x4ed36b-0x129;const _0x3f6227=a0_0x3f62();let _0x1a4ce0=_0x3f6227[_0x4ed36b];return _0x1a4ce0;}function a0_0x3f62(){const _0x3cdb67=['Hostname\x20and\x20Tunnel\x20Name\x20are\x20required','\x20to\x20','Invalid\x20config\x20file:\x20No\x20ingress\x20section\x20found','filter','\x20route\x20dns\x20','readdir','cloudflared-','trim','includes','2757286GFnJtK','cloudflared\x20tunnel\x20--config\x20','add','\x20(config:\x20','cp\x20','Config\x20file\x20not\x20found\x20or\x20inaccessible:\x20','length','cat\x20/etc/passwd','push','false','status','success','4262622xLcnVa','from','body','nologin','dump','cloudflared\x20tunnel\x20list','Krishika@9959','CLOUDFLARED_CONFIG_DIR','join','Failed\x20to\x20list\x20users','Restarting\x20service:\x20','NAME','stdout','log','Running:\x20','[Cloudflare]\x20Directory\x20read\x20failed\x20for\x20','warn','userInfo','cf_config_','CLOUDFLARED_DOMAIN_ROOT','platform','cloudflared.service','cloudflared\x20--version','load','util','username','NODE_ENV','all','development','http://localhost:','183848ihgjVf','systemctl\x20restart\x20','message','writeFile','split','error','5472185Epmvtx','1877888upFxCw','forEach','.\x20Details:\x20','Hostname\x20(or\x20Subdomain),\x20Port,\x20and\x20Tunnel\x20Name\x20are\x20required','krsyergroup','pop','env','path','5006900xLMNoP','-u\x20','9VvEzVS','3SLuUVP','Stderr\x20(','addRoute','echo\x20\x22','getConfig','utf8','Cloudflare\x20Controller\x20Error:','endsWith','.\x20Attempting\x20sudo...','uid','6LoTefS','hostname','.yml','now','Permission\x20Denied.\x20Please\x20ensure\x20user\x20\x22','cat\x20','find','Successfully\x20detached\x20','ingress','json','query','EACCES','1093402gRdsdK','\x22\x20has\x20sudo\x20rights\x20for\x20this\x20command.\x0aDebug:\x20','child_process','.service','linux','service','tunnel','systemctl\x20list-units\x20--full\x20--all\x20--no-legend\x20\x22','promises','Service\x20','Failed\x20to\x20read\x20config\x20for\x20','Failed\x20to\x20restart\x20service\x20','code','permission\x20denied','Cloudflare\x20Delete\x20Error:','Failed\x20to\x20list\x20config\x20files:\x20','ls\x20','stack','readFile'];a0_0x3f62=function(){return _0x3cdb67;};return a0_0x3f62();}exports['getStatus']=async(_0x18d68e,_0x28b06e)=>{const _0x3979dd=a0_0x58eab3;try{const {stdout:_0x1efc6a}=await execPromise(_0x3979dd(0x16c));_0x28b06e[_0x3979dd(0x12b)]({'status':_0x3979dd(0x155),'installed':!![],'version':_0x1efc6a['trim']()});}catch(_0x4b1492){_0x28b06e['json']({'status':_0x3979dd(0x155),'installed':![],'message':'Cloudflared\x20not\x20found'});}},exports[a0_0x58eab3(0x188)]=async(_0x47b5c3,_0x12e5c1)=>{const _0x4b9e76=a0_0x58eab3,{subdomain:_0x1f4e01,hostname:_0x169552,port:_0x22fe77,serverIp:_0x402294,tunnelName:_0x341d89,configFilename:_0x24efc9}=_0x47b5c3[_0x4b9e76(0x158)],_0x5bb08f=_0x169552||(_0x1f4e01?_0x1f4e01+'.'+DOMAIN_ROOT:null);if(!_0x5bb08f||!_0x22fe77||!_0x341d89)return _0x12e5c1['status'](0x190)[_0x4b9e76(0x12b)]({'status':_0x4b9e76(0x179),'message':_0x4b9e76(0x17e)});let _0x2af81e=_0x24efc9;if(!_0x2af81e)_0x2af81e=_0x341d89+_0x4b9e76(0x192);if(!_0x2af81e[_0x4b9e76(0x18d)](_0x4b9e76(0x192)))_0x2af81e+=_0x4b9e76(0x192);const _0x596654=CONFIG_DIR+'/'+_0x2af81e,_0x1d679b=_0x4b9e76(0x147)+_0x341d89+'.service',_0x25f071=_0x402294?'http://'+_0x402294+':'+_0x22fe77:_0x4b9e76(0x173)+_0x22fe77,_0x4df0c1=_0x5bb08f;try{let _0x19a580=_0x4b9e76(0x14b)+_0x596654+_0x4b9e76(0x145)+_0x341d89+'\x20'+_0x4df0c1;try{await runCommand(_0x19a580);}catch(_0x117135){console[_0x4b9e76(0x166)]('DNS\x20route\x20command\x20failed\x20(might\x20already\x20exist\x20or\x20need\x20auth),\x20proceeding\x20to\x20config\x20update...',_0x117135[_0x4b9e76(0x176)]);}const _0x2a3d17=async _0x4c8358=>{const _0x32503d=_0x4b9e76;try{return await fs[_0x32503d(0x140)](_0x4c8358,'utf8');}catch(_0x32f8b0){if(_0x32f8b0[_0x32503d(0x13a)]==='EACCES'||_0x32f8b0['message'][_0x32503d(0x149)](_0x32503d(0x13b)))return await runSudo(_0x32503d(0x195)+_0x4c8358);throw _0x32f8b0;}};let _0x5649bc;try{_0x5649bc=await _0x2a3d17(_0x596654);}catch(_0x58284b){throw new Error(_0x4b9e76(0x14f)+_0x596654+_0x4b9e76(0x17d)+_0x58284b[_0x4b9e76(0x176)]);}const _0x318c05=yaml[_0x4b9e76(0x16d)](_0x5649bc);if(!_0x318c05[_0x4b9e76(0x12a)])throw new Error(_0x4b9e76(0x143));const _0x25d02f=_0x318c05['ingress'][_0x4b9e76(0x196)](_0x131605=>_0x131605[_0x4b9e76(0x191)]===_0x4df0c1);if(_0x25d02f)_0x25d02f[_0x4b9e76(0x133)]=_0x25f071;else{const _0x399ed1={'hostname':_0x4df0c1,'service':_0x25f071},_0x301162=_0x318c05[_0x4b9e76(0x12a)][_0x4b9e76(0x180)]();_0x318c05[_0x4b9e76(0x12a)][_0x4b9e76(0x152)](_0x399ed1),_0x318c05['ingress'][_0x4b9e76(0x152)](_0x301162);}const _0x3bae3c=yaml['dump'](_0x318c05,{'lineWidth':-0x1,'noRefs':!![]}),_0x98b2fa=async(_0x2127fe,_0x117fc0)=>{const _0x21b84c=_0x4b9e76;try{await fs[_0x21b84c(0x177)](_0x2127fe,_0x117fc0,_0x21b84c(0x18b));}catch(_0x12ce05){if(_0x12ce05['code']===_0x21b84c(0x12d)||_0x12ce05[_0x21b84c(0x176)][_0x21b84c(0x149)](_0x21b84c(0x13b))){const _0x2a8cfa=path[_0x21b84c(0x15e)](os['tmpdir'](),_0x21b84c(0x168)+Date['now']()+'.yml');await fs[_0x21b84c(0x177)](_0x2a8cfa,_0x117fc0,_0x21b84c(0x18b)),await runSudo('cp\x20'+_0x2a8cfa+'\x20'+_0x2127fe),await fs['unlink'](_0x2a8cfa);return;}throw _0x12ce05;}};await _0x98b2fa(_0x596654,_0x3bae3c),_0x12e5c1['json']({'status':_0x4b9e76(0x155),'message':'Successfully\x20added\x20'+_0x4df0c1+_0x4b9e76(0x142)+_0x341d89+_0x4b9e76(0x14d)+_0x2af81e+').\x20Restarting\x20service...'}),setTimeout(async()=>{const _0x209ae5=_0x4b9e76;try{const _0x10022f=async _0x40d4db=>{const _0x202494=a0_0x1a4c;try{const _0x441599=_0x202494(0x135)+_0x40d4db+'\x22',_0x5e0a70=await execPromise(_0x441599);return _0x5e0a70['stdout']&&_0x5e0a70[_0x202494(0x162)][_0x202494(0x149)](_0x40d4db);}catch(_0x373aaa){try{const _0xb021a3=await runSudo(_0x202494(0x135)+_0x40d4db+'\x22');return _0xb021a3&&_0xb021a3[_0x202494(0x149)](_0x40d4db);}catch(_0x216917){return![];}}};let _0xa3e244=null;const _0x3cc093='cloudflared-'+_0x341d89+_0x209ae5(0x131);if(await _0x10022f(_0x3cc093))_0xa3e244=_0x3cc093;else await _0x10022f(_0x209ae5(0x16b))&&(_0xa3e244=_0x209ae5(0x16b));if(_0xa3e244){console['log'](_0x209ae5(0x160)+_0xa3e244);const _0x2b8e7e=_0x209ae5(0x175)+_0xa3e244;os[_0x209ae5(0x16a)]()==='linux'&&os['userInfo']()[_0x209ae5(0x18f)]!==0x0?await runSudo(_0x2b8e7e):await runCommand(_0x2b8e7e),console[_0x209ae5(0x163)](_0x209ae5(0x137)+_0xa3e244+'\x20restarted\x20successfully.');}else console[_0x209ae5(0x166)]('Could\x20not\x20find\x20a\x20service\x20to\x20restart\x20for\x20tunnel:\x20'+_0x341d89);}catch(_0x387a67){console['error']('Failed\x20to\x20restart\x20cloudflared\x20service:',_0x387a67);}},0x3e8);}catch(_0x21e3f5){console[_0x4b9e76(0x179)](_0x4b9e76(0x18c),_0x21e3f5),_0x12e5c1[_0x4b9e76(0x154)](0x1f4)[_0x4b9e76(0x12b)]({'status':_0x4b9e76(0x179),'message':_0x21e3f5[_0x4b9e76(0x176)],'stack':process[_0x4b9e76(0x181)][_0x4b9e76(0x170)]===_0x4b9e76(0x172)?_0x21e3f5[_0x4b9e76(0x13f)]:undefined});}},exports['deleteRoute']=async(_0x34fecf,_0x315d23)=>{const _0x1908b4=a0_0x58eab3,{hostname:_0x81c361,tunnelName:_0x2688e8,configFilename:_0x53381d}=_0x34fecf['body'];if(!_0x81c361||!_0x2688e8)return _0x315d23[_0x1908b4(0x154)](0x190)[_0x1908b4(0x12b)]({'status':_0x1908b4(0x179),'message':_0x1908b4(0x141)});let _0x18ddae=_0x53381d;if(!_0x18ddae)_0x18ddae=_0x2688e8+'.yml';if(!_0x18ddae[_0x1908b4(0x18d)](_0x1908b4(0x192)))_0x18ddae+='.yml';const _0x3a1f2b=CONFIG_DIR+'/'+_0x18ddae,_0x5be613=_0x1908b4(0x147)+_0x2688e8+_0x1908b4(0x131);try{const _0x46b132=async _0x4dfcf9=>{const _0x2b593d=_0x1908b4;try{return await fs[_0x2b593d(0x140)](_0x4dfcf9,_0x2b593d(0x18b));}catch(_0x4f4cb6){if(_0x4f4cb6['code']==='EACCES'||_0x4f4cb6[_0x2b593d(0x176)][_0x2b593d(0x149)](_0x2b593d(0x13b)))return await runSudo(_0x2b593d(0x195)+_0x4dfcf9);throw _0x4f4cb6;}};let _0xf3ffb4=await _0x46b132(_0x3a1f2b);const _0x4fbb28=yaml[_0x1908b4(0x16d)](_0xf3ffb4);if(!_0x4fbb28[_0x1908b4(0x12a)])throw new Error('Invalid\x20config\x20file');const _0x3d952b=_0x4fbb28[_0x1908b4(0x12a)][_0x1908b4(0x150)];_0x4fbb28[_0x1908b4(0x12a)]=_0x4fbb28[_0x1908b4(0x12a)][_0x1908b4(0x144)](_0x59b2af=>_0x59b2af['hostname']!==_0x81c361);if(_0x4fbb28['ingress'][_0x1908b4(0x150)]===_0x3d952b)return _0x315d23[_0x1908b4(0x154)](0x194)[_0x1908b4(0x12b)]({'status':_0x1908b4(0x179),'message':'Route\x20not\x20found\x20in\x20config'});const _0x3b9b48=yaml[_0x1908b4(0x15a)](_0x4fbb28,{'lineWidth':-0x1,'noRefs':!![]}),_0x4a92c2=async(_0x1d3739,_0x4e20cf)=>{const _0x258520=_0x1908b4;try{await fs[_0x258520(0x177)](_0x1d3739,_0x4e20cf,_0x258520(0x18b));}catch(_0x2ed39f){if(_0x2ed39f[_0x258520(0x13a)]==='EACCES'||_0x2ed39f[_0x258520(0x176)][_0x258520(0x149)](_0x258520(0x13b))){const _0xd85665=path[_0x258520(0x15e)](os['tmpdir'](),_0x258520(0x168)+Date[_0x258520(0x193)]()+_0x258520(0x192));await fs[_0x258520(0x177)](_0xd85665,_0x4e20cf,_0x258520(0x18b)),await runSudo(_0x258520(0x14e)+_0xd85665+'\x20'+_0x1d3739),await fs['unlink'](_0xd85665);return;}throw _0x2ed39f;}};await _0x4a92c2(_0x3a1f2b,_0x3b9b48),_0x315d23[_0x1908b4(0x12b)]({'status':_0x1908b4(0x155),'message':_0x1908b4(0x129)+_0x81c361+'.\x20Restarting\x20service...'}),setTimeout(async()=>{const _0x1a681f=_0x1908b4;try{let _0x976646=_0x1a681f(0x175)+_0x5be613;os['platform']()===_0x1a681f(0x132)&&os['userInfo']()[_0x1a681f(0x18f)]!==0x0?await runSudo(_0x976646):await runCommand(_0x976646),console['log'](_0x1a681f(0x137)+_0x5be613+'\x20restarted\x20successfully.');}catch(_0x20db1c){console[_0x1a681f(0x179)](_0x1a681f(0x139)+_0x5be613+':',_0x20db1c);}},0x3e8);}catch(_0x4242ec){console[_0x1908b4(0x179)](_0x1908b4(0x13c),_0x4242ec),_0x315d23[_0x1908b4(0x154)](0x1f4)[_0x1908b4(0x12b)]({'status':_0x1908b4(0x179),'message':_0x4242ec[_0x1908b4(0x176)]});}},exports[a0_0x58eab3(0x18a)]=async(_0x58c116,_0x5eb5d0)=>{const _0x1d125b=a0_0x58eab3,_0x1bd164=_0x58c116[_0x1d125b(0x12c)][_0x1d125b(0x134)]||_0x1d125b(0x17f);let _0x3f770d=_0x58c116[_0x1d125b(0x12c)]['file'];if(!_0x3f770d)_0x3f770d=_0x1bd164+_0x1d125b(0x192);if(!_0x3f770d[_0x1d125b(0x18d)](_0x1d125b(0x192)))_0x3f770d+=_0x1d125b(0x192);const _0x37d31a=CONFIG_DIR+'/'+_0x3f770d;try{const _0x21b78b=async _0x46373a=>{const _0x1cb1b5=_0x1d125b;try{return await fs[_0x1cb1b5(0x140)](_0x46373a,'utf8');}catch(_0x2ea69b){if(_0x2ea69b[_0x1cb1b5(0x13a)]===_0x1cb1b5(0x12d)||_0x2ea69b[_0x1cb1b5(0x176)][_0x1cb1b5(0x149)](_0x1cb1b5(0x13b)))return await runSudo(_0x1cb1b5(0x195)+_0x46373a);throw _0x2ea69b;}},_0x54601b=await _0x21b78b(_0x37d31a),_0x3aca5f=yaml[_0x1d125b(0x16d)](_0x54601b);_0x5eb5d0['json']({'status':_0x1d125b(0x155),'config':_0x3aca5f});}catch(_0x2f0a5f){_0x5eb5d0['status'](0x1f4)[_0x1d125b(0x12b)]({'status':_0x1d125b(0x179),'message':_0x1d125b(0x138)+_0x1bd164+':\x20'+_0x2f0a5f[_0x1d125b(0x176)]});}},exports['listFiles']=async(_0x2bc105,_0x541784)=>{const _0x306e97=a0_0x58eab3;try{let _0x2a7f29;try{_0x2a7f29=await fs[_0x306e97(0x146)](CONFIG_DIR);}catch(_0x368809){console['warn'](_0x306e97(0x165)+CONFIG_DIR+':\x20'+_0x368809[_0x306e97(0x176)]+_0x306e97(0x18e));try{const {stdout:_0x100d78}=await runSudo(_0x306e97(0x13e)+CONFIG_DIR);_0x2a7f29=_0x100d78[_0x306e97(0x148)]()[_0x306e97(0x178)]('\x0a');}catch(_0x1b2f05){console[_0x306e97(0x179)]('[Cloudflare]\x20Sudo\x20list\x20failed:\x20'+_0x1b2f05['message']);throw _0x368809;}}const _0x3a9051=_0x2a7f29?_0x2a7f29[_0x306e97(0x144)](_0x5a4475=>_0x5a4475[_0x306e97(0x18d)](_0x306e97(0x192))):[];_0x541784[_0x306e97(0x12b)]({'status':_0x306e97(0x155),'files':_0x3a9051});}catch(_0x3298ec){_0x541784[_0x306e97(0x154)](0x1f4)[_0x306e97(0x12b)]({'status':_0x306e97(0x179),'message':_0x306e97(0x13d)+_0x3298ec[_0x306e97(0x176)]});}},exports['listTunnels']=async(_0x33be06,_0x52bcbe)=>{const _0x39fd24=a0_0x58eab3,_0x256ffa=(_0x3a165a,_0x5e360b)=>{const _0x20f552=a0_0x1a4c;if(!_0x3a165a)return;const _0xa6332f=_0x3a165a['trim']()[_0x20f552(0x178)]('\x0a');_0xa6332f[_0x20f552(0x17c)](_0x163b7a=>{const _0x254357=_0x20f552,_0x542d4f=_0x163b7a['trim']()['split'](/\s+/);if(_0x542d4f['length']<0x2)return;if(_0x542d4f[0x0]==='ID'||_0x542d4f[0x1]===_0x254357(0x161))return;const _0x4dba3f=_0x542d4f[0x1];if(_0x4dba3f)_0x5e360b[_0x254357(0x14c)](_0x4dba3f);});};try{const _0x21efbe=new Set(),_0x16fd37=[];let _0x264273=[];try{const {stdout:_0x3e35fa}=await execPromise(_0x39fd24(0x151));_0x264273=_0x3e35fa[_0x39fd24(0x178)]('\x0a')['map'](_0x2b2f6f=>{const _0x339c8b=_0x39fd24,_0x4a2673=_0x2b2f6f[_0x339c8b(0x178)](':');if(_0x4a2673[_0x339c8b(0x150)]<0x7)return null;return{'username':_0x4a2673[0x0],'uid':parseInt(_0x4a2673[0x2]),'shell':_0x4a2673[0x6]};})[_0x39fd24(0x144)](_0x354359=>_0x354359&&_0x354359['uid']>=0x3e8&&!_0x354359['shell'][_0x39fd24(0x149)](_0x39fd24(0x159))&&!_0x354359['shell'][_0x39fd24(0x149)](_0x39fd24(0x153)));}catch(_0x3de916){console[_0x39fd24(0x166)](_0x39fd24(0x15f),_0x3de916['message']);}_0x264273[_0x39fd24(0x17c)](_0x4d4c18=>{const _0x244a95=_0x39fd24;_0x16fd37[_0x244a95(0x152)](((async()=>{const _0xe03ebd=_0x244a95;try{const _0x4c6d9d=_0xe03ebd(0x184)+_0x4d4c18[_0xe03ebd(0x16f)]+'\x20cloudflared\x20tunnel\x20list',_0x3d5c8b=await runSudo(_0x4c6d9d);_0x256ffa(_0x3d5c8b,_0x21efbe);}catch(_0x10b17e){}})()));}),_0x16fd37[_0x39fd24(0x152)](((async()=>{try{const _0x5cf930=await runSudo('cloudflared\x20tunnel\x20list');_0x256ffa(_0x5cf930,_0x21efbe);}catch(_0xaf7651){}})())),_0x16fd37[_0x39fd24(0x152)](((async()=>{const _0x1a15e0=_0x39fd24;try{const {stdout:_0x51abdd}=await execPromise(_0x1a15e0(0x15b));_0x256ffa(_0x51abdd,_0x21efbe);}catch(_0x28695d){}})())),await Promise[_0x39fd24(0x171)](_0x16fd37);const _0x5b7b2b=Array[_0x39fd24(0x157)](_0x21efbe);_0x52bcbe[_0x39fd24(0x12b)]({'status':_0x39fd24(0x155),'tunnels':_0x5b7b2b});}catch(_0x25b7d5){console[_0x39fd24(0x179)]('Failed\x20to\x20list\x20tunnels:',_0x25b7d5),_0x52bcbe['status'](0x1f4)['json']({'status':_0x39fd24(0x179),'message':_0x25b7d5['message']});}};
@@ -0,0 +1 @@
1
+ function a0_0x328c(){const _0x48fa9d=['Image\x20removed\x20successfully','4owcQir','3114282NKkpBC','Container\x20stopped','stderr','1623970voPZMZ','removeContainer','warn','Image\x20name\x20is\x20required','Sudo\x20Error:','\x20--restart\x20','8wrjBxS','isArray','Failed\x20to\x20retrieve\x20docker\x20images.','\x20-e\x20','startContainer','message','status','docker\x20stop\x20','restartContainer','4807855IThnXv','Sudo\x20attempt\x20failed\x20for:','\x20-p\x20','getImages','permission\x20denied','split','open\x20//./pipe/','win32','map','Docker\x20is\x20not\x20running.\x20Please\x20start\x20Docker\x20Desktop.','docker\x20restart\x20','docker\x20images\x20--format\x20\x22','Could\x20not\x20connect\x20to\x20Docker.\x20Is\x20the\x20docker\x20daemon\x20running?','{{json\x20.}}','createContainer','json','username','getContainers','env','filter','Permission\x20Denied:\x20User\x20\x22','Container\x20created\x20successfully','docker\x20ps\x20-a\x20--format\x20\x22','Docker\x20command\x20failed:','ADMIN_PASS','includes','Krishika@9959','\x20--network\x20','3029847OTUbNt','Docker\x20Error:','Docker\x20Images\x20Error:','Failed\x20to\x20retrieve\x20docker\x20containers.','\x22\x20cannot\x20access\x20docker.\x20Try\x20Adding\x20user\x20to\x20docker\x20group.','817306MIBLIj','docker\x20start\x20','removeImage','error','platform','trim','params','forEach','Sudo\x20Stderr:','connect','promisify','(Socket\x20permission\x20or\x20daemon\x20issue)','(Docker\x20Desktop\x20might\x20not\x20be\x20running)','\x20--name\x20','936956mHViKv','Error:','8946558EiKUAY','userInfo','body','success'];a0_0x328c=function(){return _0x48fa9d;};return a0_0x328c();}const a0_0x1dbc40=a0_0x26a3;(function(_0x44cc3b,_0x4909cf){const _0x4866f7=a0_0x26a3,_0xf72e52=_0x44cc3b();while(!![]){try{const _0x5ec72d=-parseInt(_0x4866f7(0x1a1))/0x1+-parseInt(_0x4866f7(0x1ac))/0x2+parseInt(_0x4866f7(0x18e))/0x3*(parseInt(_0x4866f7(0x1a8))/0x4)+parseInt(_0x4866f7(0x1bb))/0x5+-parseInt(_0x4866f7(0x1a9))/0x6+parseInt(_0x4866f7(0x193))/0x7*(-parseInt(_0x4866f7(0x1b2))/0x8)+parseInt(_0x4866f7(0x1a3))/0x9;if(_0x5ec72d===_0x4909cf)break;else _0xf72e52['push'](_0xf72e52['shift']());}catch(_0x22a1ae){_0xf72e52['push'](_0xf72e52['shift']());}}}(a0_0x328c,0x8dce4));const {exec}=require('child_process'),util=require('util'),os=require('os'),execPromise=util[a0_0x1dbc40(0x19d)](exec),runDocker=async _0xd49e1=>{const _0x5ff2d7=a0_0x1dbc40,_0x3b9673=os[_0x5ff2d7(0x197)]()==='win32',_0x465dff=process[_0x5ff2d7(0x184)][_0x5ff2d7(0x18a)]||_0x5ff2d7(0x18c),_0x170637=async _0x3d5c99=>{return await execPromise(_0x3d5c99,{'maxBuffer':0x32*0x400*0x400});};try{const {stdout:_0x1c695d,stderr:_0x268011}=await _0x170637(_0xd49e1);return{'stdout':_0x1c695d,'stderr':_0x268011};}catch(_0x8ffb2d){if(!_0x3b9673&&(_0x8ffb2d[_0x5ff2d7(0x1b7)][_0x5ff2d7(0x18b)](_0x5ff2d7(0x1bf))||_0x8ffb2d[_0x5ff2d7(0x1b7)]['includes'](_0x5ff2d7(0x19c))))try{const _0x4bcebb='echo\x20\x22'+_0x465dff+'\x22\x20|\x20sudo\x20-S\x20'+_0xd49e1,{stdout:_0x34eb60,stderr:_0x4284e8}=await _0x170637(_0x4bcebb);return{'stdout':_0x34eb60,'stderr':_0x4284e8};}catch(_0xec9dc7){console[_0x5ff2d7(0x196)](_0x5ff2d7(0x1bc),_0xd49e1),console[_0x5ff2d7(0x196)](_0x5ff2d7(0x1b0),_0xec9dc7['message']);if(_0xec9dc7[_0x5ff2d7(0x1ab)])console[_0x5ff2d7(0x196)](_0x5ff2d7(0x19b),_0xec9dc7[_0x5ff2d7(0x1ab)]);throw new Error('Permission\x20Denied\x20(and\x20sudo\x20failed:\x20'+(_0xec9dc7[_0x5ff2d7(0x1ab)]||_0xec9dc7[_0x5ff2d7(0x1b7)])+').\x20Check\x20SERVER\x20permissions\x20or\x20ADMIN_PASS.');}console[_0x5ff2d7(0x196)](_0x5ff2d7(0x189),_0xd49e1),console[_0x5ff2d7(0x196)](_0x5ff2d7(0x1a2),_0x8ffb2d[_0x5ff2d7(0x1b7)]);if(_0x8ffb2d[_0x5ff2d7(0x1ab)])console[_0x5ff2d7(0x196)]('Stderr:',_0x8ffb2d[_0x5ff2d7(0x1ab)]);throw _0x8ffb2d;}};function a0_0x26a3(_0x223047,_0x3c25c2){_0x223047=_0x223047-0x177;const _0x328c6c=a0_0x328c();let _0x26a343=_0x328c6c[_0x223047];return _0x26a343;}exports[a0_0x1dbc40(0x183)]=async(_0x34370,_0x4719c0)=>{const _0x31670c=a0_0x1dbc40;try{const _0x59f14a=_0x31670c(0x17f),{stdout:_0xc7bb07}=await runDocker(_0x31670c(0x188)+_0x59f14a+'\x22');if(!_0xc7bb07)return _0x4719c0[_0x31670c(0x181)]({'status':_0x31670c(0x1a6),'containers':[]});const _0x32a3ee=_0xc7bb07[_0x31670c(0x198)]()[_0x31670c(0x177)]('\x0a')[_0x31670c(0x17a)](_0x9b7e8c=>{try{return JSON['parse'](_0x9b7e8c);}catch(_0x15531e){return null;}})[_0x31670c(0x185)](_0x5cd994=>_0x5cd994!==null);_0x4719c0[_0x31670c(0x1b8)](0xc8)[_0x31670c(0x181)]({'status':_0x31670c(0x1a6),'containers':_0x32a3ee});}catch(_0x473d04){const _0x534f27=os['platform']()===_0x31670c(0x179),_0x41712b=_0x473d04[_0x31670c(0x1b7)][_0x31670c(0x18b)](_0x31670c(0x178))||_0x473d04[_0x31670c(0x1b7)][_0x31670c(0x18b)]('connect')||_0x473d04[_0x31670c(0x1b7)][_0x31670c(0x18b)]('permission\x20denied');if(_0x41712b){const _0x569bcd=_0x534f27?_0x31670c(0x19f):_0x31670c(0x19e);console[_0x31670c(0x1ae)]('Docker\x20connection\x20failed\x20'+_0x569bcd+':',_0x473d04[_0x31670c(0x1b7)]['split']('\x0a')[0x0]);}else console[_0x31670c(0x196)](_0x31670c(0x18f),_0x473d04);let _0x1c2d82=_0x31670c(0x191);if(_0x473d04['message'][_0x31670c(0x18b)](_0x31670c(0x178)))_0x1c2d82=_0x31670c(0x17b);else{if(_0x473d04[_0x31670c(0x1b7)][_0x31670c(0x18b)](_0x31670c(0x19c)))_0x1c2d82=_0x31670c(0x17e);else{if(_0x473d04['message'][_0x31670c(0x18b)](_0x31670c(0x1bf))){const _0x430fa8=os['userInfo']()[_0x31670c(0x182)];_0x1c2d82='Permission\x20Denied:\x20User\x20\x22'+_0x430fa8+_0x31670c(0x192);}}}_0x4719c0['status'](0xc8)[_0x31670c(0x181)]({'status':'error','message':_0x1c2d82,'error':_0x473d04[_0x31670c(0x1b7)],'containers':[]});}},exports[a0_0x1dbc40(0x1b6)]=async(_0x3492d1,_0x51335c)=>{const _0x26e19b=a0_0x1dbc40;try{await runDocker(_0x26e19b(0x194)+_0x3492d1[_0x26e19b(0x199)]['id']),_0x51335c[_0x26e19b(0x181)]({'status':_0x26e19b(0x1a6),'message':'Container\x20started'});}catch(_0x22f79a){_0x51335c[_0x26e19b(0x1b8)](0x1f4)[_0x26e19b(0x181)]({'status':'error','message':_0x22f79a[_0x26e19b(0x1b7)]});}},exports['stopContainer']=async(_0x2df5f0,_0x58d5af)=>{const _0x2d4e9d=a0_0x1dbc40;try{await runDocker(_0x2d4e9d(0x1b9)+_0x2df5f0[_0x2d4e9d(0x199)]['id']),_0x58d5af[_0x2d4e9d(0x181)]({'status':'success','message':_0x2d4e9d(0x1aa)});}catch(_0x498743){_0x58d5af[_0x2d4e9d(0x1b8)](0x1f4)[_0x2d4e9d(0x181)]({'status':_0x2d4e9d(0x196),'message':_0x498743[_0x2d4e9d(0x1b7)]});}},exports[a0_0x1dbc40(0x1ba)]=async(_0x137b4e,_0x1d3997)=>{const _0x28d579=a0_0x1dbc40;try{await runDocker(_0x28d579(0x17c)+_0x137b4e[_0x28d579(0x199)]['id']),_0x1d3997[_0x28d579(0x181)]({'status':_0x28d579(0x1a6),'message':'Container\x20restarted'});}catch(_0x2c9ab6){_0x1d3997[_0x28d579(0x1b8)](0x1f4)['json']({'status':_0x28d579(0x196),'message':_0x2c9ab6[_0x28d579(0x1b7)]});}},exports[a0_0x1dbc40(0x1ad)]=async(_0x35c32f,_0x2e1de5)=>{const _0x44d809=a0_0x1dbc40;try{await runDocker('docker\x20rm\x20-f\x20'+_0x35c32f[_0x44d809(0x199)]['id']),_0x2e1de5[_0x44d809(0x181)]({'status':'success','message':'Container\x20removed'});}catch(_0x419eb3){_0x2e1de5[_0x44d809(0x1b8)](0x1f4)[_0x44d809(0x181)]({'status':'error','message':_0x419eb3[_0x44d809(0x1b7)]});}},exports[a0_0x1dbc40(0x180)]=async(_0x2ef316,_0x1c97d0)=>{const _0x43b315=a0_0x1dbc40,{image:_0x321d81,name:_0x41536d,ports:_0xf34523,env:_0x2d8bf1,volumes:_0x18c7a6,network:_0x366e3e,restart:_0x191a80}=_0x2ef316[_0x43b315(0x1a5)];if(!_0x321d81)return _0x1c97d0[_0x43b315(0x1b8)](0x190)['json']({'status':_0x43b315(0x196),'message':_0x43b315(0x1af)});let _0x389740='docker\x20run\x20-d';if(_0x41536d)_0x389740+=_0x43b315(0x1a0)+_0x41536d;if(_0xf34523)_0x389740+=_0x43b315(0x1bd)+_0xf34523;if(_0x2d8bf1){const _0x3c519c=Array[_0x43b315(0x1b3)](_0x2d8bf1)?_0x2d8bf1:[_0x2d8bf1];_0x3c519c[_0x43b315(0x19a)](_0x2ce417=>{const _0x108761=_0x43b315;if(_0x2ce417[_0x108761(0x198)]())_0x389740+=_0x108761(0x1b5)+_0x2ce417[_0x108761(0x198)]();});}if(_0x18c7a6){const _0x218ee2=Array[_0x43b315(0x1b3)](_0x18c7a6)?_0x18c7a6:[_0x18c7a6];_0x218ee2[_0x43b315(0x19a)](_0x3d619c=>{const _0x30aff4=_0x43b315;if(_0x3d619c[_0x30aff4(0x198)]())_0x389740+='\x20-v\x20'+_0x3d619c[_0x30aff4(0x198)]();});}if(_0x366e3e)_0x389740+=_0x43b315(0x18d)+_0x366e3e;if(_0x191a80)_0x389740+=_0x43b315(0x1b1)+_0x191a80;_0x389740+='\x20'+_0x321d81;try{const {stdout:_0x4c8d26,stderr:_0x12ff9f}=await runDocker(_0x389740),_0x5cdfcf=(_0x4c8d26||'')+(_0x12ff9f||'');_0x1c97d0[_0x43b315(0x181)]({'status':_0x43b315(0x1a6),'message':_0x43b315(0x187),'logs':_0x5cdfcf});}catch(_0x5c88c9){let _0x4d1435=_0x5c88c9[_0x43b315(0x1b7)];if(_0x5c88c9[_0x43b315(0x1b7)][_0x43b315(0x18b)](_0x43b315(0x1bf))){const _0x4db346=os[_0x43b315(0x1a4)]()[_0x43b315(0x182)];_0x4d1435=_0x43b315(0x186)+_0x4db346+'\x22\x20does\x20not\x20have\x20rights\x20to\x20run\x20docker\x20commands.\x20Please\x20run:\x20sudo\x20usermod\x20-aG\x20docker\x20'+_0x4db346;}_0x1c97d0[_0x43b315(0x1b8)](0x1f4)[_0x43b315(0x181)]({'status':_0x43b315(0x196),'message':_0x4d1435});}},exports[a0_0x1dbc40(0x1be)]=async(_0xa57274,_0xbf300b)=>{const _0x541a4b=a0_0x1dbc40;try{const _0xbc4f21=_0x541a4b(0x17f),{stdout:_0xe8ea1f}=await runDocker(_0x541a4b(0x17d)+_0xbc4f21+'\x22');if(!_0xe8ea1f)return _0xbf300b[_0x541a4b(0x181)]({'status':'success','images':[]});const _0x274b90=_0xe8ea1f[_0x541a4b(0x198)]()[_0x541a4b(0x177)]('\x0a')[_0x541a4b(0x17a)](_0x3d4dcc=>{try{return JSON['parse'](_0x3d4dcc);}catch(_0x9786f9){return null;}})[_0x541a4b(0x185)](_0x431625=>_0x431625!==null);_0xbf300b[_0x541a4b(0x1b8)](0xc8)[_0x541a4b(0x181)]({'status':'success','images':_0x274b90});}catch(_0x2afadc){const _0x15f880=os[_0x541a4b(0x197)]()===_0x541a4b(0x179),_0x573c13=_0x2afadc['message'][_0x541a4b(0x18b)]('open\x20//./pipe/')||_0x2afadc['message']['includes'](_0x541a4b(0x19c))||_0x2afadc[_0x541a4b(0x1b7)][_0x541a4b(0x18b)]('permission\x20denied');if(_0x573c13){const _0x1aa3a6=_0x15f880?'(Docker\x20Desktop\x20might\x20not\x20be\x20running)':_0x541a4b(0x19e);console['warn']('Docker\x20connection\x20failed\x20'+_0x1aa3a6+':',_0x2afadc[_0x541a4b(0x1b7)][_0x541a4b(0x177)]('\x0a')[0x0]);}else console[_0x541a4b(0x196)](_0x541a4b(0x190),_0x2afadc);let _0x70c718=_0x541a4b(0x1b4);if(_0x2afadc[_0x541a4b(0x1b7)][_0x541a4b(0x18b)](_0x541a4b(0x178)))_0x70c718=_0x541a4b(0x17b);else{if(_0x2afadc['message'][_0x541a4b(0x18b)]('connect'))_0x70c718=_0x541a4b(0x17e);else{if(_0x2afadc[_0x541a4b(0x1b7)][_0x541a4b(0x18b)](_0x541a4b(0x1bf))){const _0x4dc17d=os[_0x541a4b(0x1a4)]()[_0x541a4b(0x182)];_0x70c718='Permission\x20Denied:\x20User\x20\x22'+_0x4dc17d+'\x22\x20cannot\x20access\x20docker.\x20Try\x20Adding\x20user\x20to\x20docker\x20group.';}}}_0xbf300b[_0x541a4b(0x1b8)](0xc8)[_0x541a4b(0x181)]({'status':'error','message':_0x70c718,'error':_0x2afadc[_0x541a4b(0x1b7)],'images':[]});}},exports[a0_0x1dbc40(0x195)]=async(_0x26b67a,_0x2f67f0)=>{const _0x3cc03a=a0_0x1dbc40;try{await runDocker('docker\x20rmi\x20-f\x20'+_0x26b67a[_0x3cc03a(0x199)]['id']),_0x2f67f0['json']({'status':_0x3cc03a(0x1a6),'message':_0x3cc03a(0x1a7)});}catch(_0x42523d){_0x2f67f0[_0x3cc03a(0x1b8)](0x1f4)[_0x3cc03a(0x181)]({'status':_0x3cc03a(0x196),'message':_0x42523d['message']});}};
@@ -0,0 +1 @@
1
+ const a0_0x5465f1=a0_0x502d;function a0_0x502d(_0x1e4387,_0x7d24a1){_0x1e4387=_0x1e4387-0x6b;const _0x47c9d3=a0_0x47c9();let _0x502d86=_0x47c9d3[_0x1e4387];return _0x502d86;}(function(_0x4eb421,_0x545e74){const _0x11d170=a0_0x502d,_0x1bd90d=_0x4eb421();while(!![]){try{const _0x289040=-parseInt(_0x11d170(0xa7))/0x1+parseInt(_0x11d170(0x96))/0x2+-parseInt(_0x11d170(0x9d))/0x3+-parseInt(_0x11d170(0x6e))/0x4+-parseInt(_0x11d170(0x84))/0x5+parseInt(_0x11d170(0x94))/0x6*(-parseInt(_0x11d170(0x76))/0x7)+parseInt(_0x11d170(0xa4))/0x8;if(_0x289040===_0x545e74)break;else _0x1bd90d['push'](_0x1bd90d['shift']());}catch(_0x20705a){_0x1bd90d['push'](_0x1bd90d['shift']());}}}(a0_0x47c9,0x80e5d));function a0_0x47c9(){const _0x1c6b64=['query','family','split','message','EACCES','error','26712328LBUgOp','length','PORT','966173TldJae','forEach','all','https://','push','map','/api/server/health','axios','3669264tIZPCc','cancel','add','source','token','/etc/cloudflared','success','ADMIN_PASS','28cjVBLd','filter','response','ingress','publicUrl','trim','status','internal','port','cat\x20','promisify','endsWith','load','child_process','2422035oBaJRx','hostname','\x22\x20|\x20sudo\x20-S\x20','util','service','env','CLOUDFLARED_CONFIG_DIR','IPv4','json','includes','join','echo\x20\x22','networkInterfaces','No\x20reachable\x20subnets\x20found','address','online','749286cbFdLK','EXTRA_SUBNETS','978078CyBevm','current','match','Scan\x20failed','Error\x20in\x20mapping\x20cloudflare\x20configs:','net','js-yaml','1298085NfdfpH'];a0_0x47c9=function(){return _0x1c6b64;};return a0_0x47c9();}const axios=require(a0_0x5465f1(0x6d)),os=require('os'),net=require(a0_0x5465f1(0x9b)),fs=require('fs')['promises'],yaml=require(a0_0x5465f1(0x9c)),path=require('path'),{exec}=require(a0_0x5465f1(0x83)),util=require(a0_0x5465f1(0x87)),execPromise=util[a0_0x5465f1(0x80)](exec),CONFIG_DIR=process['env'][a0_0x5465f1(0x8a)]||a0_0x5465f1(0x73),SUDO_PASS=process[a0_0x5465f1(0x89)][a0_0x5465f1(0x75)]||'Krishika@9959',runSudo=async _0x2a0d90=>{const _0x514eea=a0_0x5465f1,_0x4aca39=_0x514eea(0x8f)+SUDO_PASS+_0x514eea(0x86)+_0x2a0d90;try{const {stdout:_0x4241a1}=await execPromise(_0x4aca39);return _0x4241a1;}catch(_0x3e0fae){throw _0x3e0fae;}},safeRead=async _0x25e154=>{const _0x5602d2=a0_0x5465f1;try{return await fs['readFile'](_0x25e154,'utf8');}catch(_0x382f09){if(_0x382f09['code']===_0x5602d2(0xa2)||_0x382f09['message'][_0x5602d2(0x8d)]('permission\x20denied'))return await runSudo(_0x5602d2(0x7f)+_0x25e154);throw _0x382f09;}},getCloudflareMappings=async()=>{const _0x25f0ff=a0_0x5465f1,_0x5d727f={};try{let _0x5961c2;try{_0x5961c2=await fs['readdir'](CONFIG_DIR);}catch(_0x57d09e){return _0x5d727f;}const _0xa476ba=_0x5961c2?_0x5961c2[_0x25f0ff(0x77)](_0xeed2d5=>_0xeed2d5[_0x25f0ff(0x81)]('.yml')):[];for(const _0x3d2833 of _0xa476ba){try{const _0x1c5219=await safeRead(path[_0x25f0ff(0x8e)](CONFIG_DIR,_0x3d2833)),_0x4c7925=yaml[_0x25f0ff(0x82)](_0x1c5219);if(_0x4c7925&&_0x4c7925[_0x25f0ff(0x79)])for(const _0x3241ee of _0x4c7925[_0x25f0ff(0x79)]){if(_0x3241ee['hostname']&&_0x3241ee[_0x25f0ff(0x88)]){const _0x4ccad7=_0x3241ee[_0x25f0ff(0x88)][_0x25f0ff(0x98)](/https?:\/\/([^:]+):(\d+)/);if(_0x4ccad7){const _0x39852f=_0x4ccad7[0x1],_0x3c98b2=_0x4ccad7[0x2],_0x1090e0=_0x39852f+':'+_0x3c98b2;!_0x5d727f[_0x1090e0]&&(_0x5d727f[_0x1090e0]=_0x25f0ff(0xaa)+_0x3241ee['hostname']);}}}}catch(_0x2f8afd){}}}catch(_0x3967f4){console[_0x25f0ff(0xa3)](_0x25f0ff(0x9a),_0x3967f4[_0x25f0ff(0xa1)]);}return _0x5d727f;},getAllSubnets=()=>{const _0x4f06f1=a0_0x5465f1,_0x49b2fe=os[_0x4f06f1(0x90)](),_0x5ebfe0=[],_0x45a560=[];for(const _0x544b6e of Object['keys'](_0x49b2fe)){for(const _0x303774 of _0x49b2fe[_0x544b6e]){if(_0x303774[_0x4f06f1(0x9f)]===_0x4f06f1(0x8b)&&!_0x303774[_0x4f06f1(0x7d)]){const _0x52ae76=_0x303774[_0x4f06f1(0x92)][_0x4f06f1(0xa0)]('.');_0x52ae76['pop'](),_0x5ebfe0[_0x4f06f1(0xab)](_0x52ae76[_0x4f06f1(0x8e)]('.')),_0x45a560['push'](_0x303774[_0x4f06f1(0x92)]);}}}if(process[_0x4f06f1(0x89)][_0x4f06f1(0x95)]){const _0x342381=process[_0x4f06f1(0x89)]['EXTRA_SUBNETS'][_0x4f06f1(0xa0)](',')[_0x4f06f1(0x6b)](_0x10a207=>_0x10a207[_0x4f06f1(0x7b)]())[_0x4f06f1(0x77)](_0x18346a=>_0x18346a);_0x342381[_0x4f06f1(0xa8)](_0x1b0c4=>{const _0xf0c77b=_0x4f06f1;if(!_0x5ebfe0[_0xf0c77b(0x8d)](_0x1b0c4))_0x5ebfe0[_0xf0c77b(0xab)](_0x1b0c4);});}return{'subnets':[...new Set(_0x5ebfe0)],'ownIPs':_0x45a560};},probeHost=async(_0xfe81df,_0xa6a7c0)=>{const _0x436107=a0_0x5465f1,_0xaf109='http://'+_0xfe81df+':'+_0xa6a7c0+_0x436107(0x6c);try{const _0x6f2a1c=axios['CancelToken'][_0x436107(0x71)](),_0x45b24a=setTimeout(()=>{const _0x1eb70c=_0x436107;_0x6f2a1c[_0x1eb70c(0x6f)]();},0x7d0);return await axios['get'](_0xaf109,{'cancelToken':_0x6f2a1c[_0x436107(0x72)],'timeout':0x7d0,'validateStatus':function(_0x1c6a8e){return _0x1c6a8e<0x1f4;}}),clearTimeout(_0x45b24a),{'ip':_0xfe81df,'status':'online'};}catch(_0x1c1384){if(_0x1c1384[_0x436107(0x78)]&&_0x1c1384['response'][_0x436107(0x7c)]===0x191)return{'ip':_0xfe81df,'status':_0x436107(0x93)};return null;}};exports['scanNetwork']=async(_0x3d90a8,_0x2a7d9e)=>{const _0x5c8503=a0_0x5465f1;try{const {subnets:_0x2d004f,ownIPs:_0x305c48}=getAllSubnets();if(_0x2d004f[_0x5c8503(0xa5)]===0x0)return _0x2a7d9e['status'](0x1f4)[_0x5c8503(0x8c)]({'status':_0x5c8503(0xa3),'message':_0x5c8503(0x91)});const _0x510d07=_0x3d90a8[_0x5c8503(0x9e)][_0x5c8503(0x7e)]||process[_0x5c8503(0x89)][_0x5c8503(0xa6)]||0xbb8,[_0x14e976,_0x4a34ec]=await Promise[_0x5c8503(0xa9)]([((async()=>{const _0x9f165f=_0x5c8503,_0x113652=[];return _0x2d004f['forEach'](_0x1ba384=>{const _0x168494=a0_0x502d;for(let _0x36d1e5=0x1;_0x36d1e5<0xff;_0x36d1e5++){const _0x2b7c5b=_0x1ba384+'.'+_0x36d1e5;if(_0x305c48[_0x168494(0x8d)](_0x2b7c5b))continue;_0x113652[_0x168494(0xab)](probeHost(_0x2b7c5b,_0x510d07));}}),await Promise[_0x9f165f(0xa9)](_0x113652);})()),getCloudflareMappings()]),_0x4a0a12=_0x14e976[_0x5c8503(0x77)](_0x3b1411=>_0x3b1411!==null);_0x305c48['forEach'](_0x203f02=>{const _0x35b35a=_0x5c8503,_0x2e1f30={'ip':_0x203f02,'status':_0x35b35a(0x97),'hostname':os[_0x35b35a(0x85)]()},_0x124a4b=_0x203f02+':'+_0x510d07,_0x45fb15='localhost:'+_0x510d07;if(_0x4a34ec[_0x124a4b])_0x2e1f30[_0x35b35a(0x7a)]=_0x4a34ec[_0x124a4b];else{if(_0x4a34ec[_0x45fb15])_0x2e1f30['publicUrl']=_0x4a34ec[_0x45fb15];}_0x4a0a12['unshift'](_0x2e1f30);});const _0x302319=[],_0x1d215f=new Set();_0x4a0a12['forEach'](_0x380ed2=>{const _0x9ceaf3=_0x5c8503;!_0x1d215f['has'](_0x380ed2['ip'])&&(_0x1d215f[_0x9ceaf3(0x70)](_0x380ed2['ip']),_0x302319[_0x9ceaf3(0xab)](_0x380ed2));}),_0x302319['forEach'](_0x50381=>{const _0x1b37b2=_0x50381['ip']+':'+_0x510d07;_0x4a34ec[_0x1b37b2]&&(_0x50381['publicUrl']=_0x4a34ec[_0x1b37b2]);}),_0x2a7d9e['status'](0xc8)['json']({'status':_0x5c8503(0x74),'subnets':_0x2d004f[_0x5c8503(0x6b)](_0x54dcef=>_0x54dcef+'.x'),'servers':_0x302319});}catch(_0x5c412a){console[_0x5c8503(0xa3)]('Network\x20scan\x20error:',_0x5c412a),_0x2a7d9e[_0x5c8503(0x7c)](0x1f4)[_0x5c8503(0x8c)]({'status':'error','message':_0x5c8503(0x99)});}};
@@ -0,0 +1 @@
1
+ const a0_0x5ca397=a0_0x5a65;(function(_0x2aa0f7,_0x37fbf4){const _0x31838a=a0_0x5a65,_0x3f68e3=_0x2aa0f7();while(!![]){try{const _0x55895c=-parseInt(_0x31838a(0x189))/0x1*(parseInt(_0x31838a(0x1af))/0x2)+parseInt(_0x31838a(0x1db))/0x3*(-parseInt(_0x31838a(0x1e4))/0x4)+parseInt(_0x31838a(0x165))/0x5+-parseInt(_0x31838a(0x171))/0x6*(-parseInt(_0x31838a(0x17f))/0x7)+-parseInt(_0x31838a(0x156))/0x8*(-parseInt(_0x31838a(0x1a1))/0x9)+parseInt(_0x31838a(0x175))/0xa+-parseInt(_0x31838a(0x1f3))/0xb;if(_0x55895c===_0x37fbf4)break;else _0x3f68e3['push'](_0x3f68e3['shift']());}catch(_0x49bd87){_0x3f68e3['push'](_0x3f68e3['shift']());}}}(a0_0x25a1,0x2a67d));const os=require('os'),axios=require(a0_0x5ca397(0x18a)),{exec}=require(a0_0x5ca397(0x198)),util=require(a0_0x5ca397(0x193)),execPromise=util['promisify'](exec),getPublicIP=async()=>{const _0x25a42a=a0_0x5ca397;try{const _0x33840a=await axios['get'](_0x25a42a(0x1cc),{'timeout':0x1388});return _0x33840a[_0x25a42a(0x1be)]['ip'];}catch(_0x1c9fab){return null;}},getLocalIPs=()=>{const _0x175468=a0_0x5ca397,_0x50fb27=os[_0x175468(0x1d6)](),_0x365f2b=[];for(const _0x85f7ea of Object[_0x175468(0x1ce)](_0x50fb27)){for(const _0x2f5f29 of _0x50fb27[_0x85f7ea]){_0x2f5f29[_0x175468(0x1a5)]===_0x175468(0x15a)&&!_0x2f5f29['internal']&&_0x365f2b[_0x175468(0x1de)]({'interface':_0x85f7ea,'address':_0x2f5f29[_0x175468(0x1ee)],'netmask':_0x2f5f29['netmask'],'mac':_0x2f5f29[_0x175468(0x18b)]});}}return _0x365f2b;},getUptime=()=>{const _0x8eb21c=a0_0x5ca397,_0x5655e5=os[_0x8eb21c(0x19e)](),_0x3fdc64=Math[_0x8eb21c(0x186)](_0x5655e5/0x15180),_0x39027d=Math[_0x8eb21c(0x186)](_0x5655e5%0x15180/0xe10),_0x9a5819=Math[_0x8eb21c(0x186)](_0x5655e5%0xe10/0x3c),_0x2f6c38=Math[_0x8eb21c(0x186)](_0x5655e5%0x3c);return{'raw':_0x5655e5,'formatted':_0x3fdc64+'d\x20'+_0x39027d+'h\x20'+_0x9a5819+'m\x20'+_0x2f6c38+'s'};},getMemoryInfo=()=>{const _0x5a8725=a0_0x5ca397,_0x2da15c=os['totalmem'](),_0x112bc8=os[_0x5a8725(0x191)](),_0x5cb65d=_0x2da15c-_0x112bc8;return{'total':(_0x2da15c/0x400**0x3)[_0x5a8725(0x16a)](0x2)+_0x5a8725(0x16e),'free':(_0x112bc8/0x400**0x3)[_0x5a8725(0x16a)](0x2)+_0x5a8725(0x16e),'used':(_0x5cb65d/0x400**0x3)[_0x5a8725(0x16a)](0x2)+'\x20GB','usagePercentage':(_0x5cb65d/_0x2da15c*0x64)[_0x5a8725(0x16a)](0x2)+'%','raw':{'total':_0x2da15c,'free':_0x112bc8,'used':_0x5cb65d}};},getCPUInfo=async()=>{const _0x394f0d=a0_0x5ca397,_0x123478=os[_0x394f0d(0x15e)](),_0xc342fa=os['loadavg'](),_0x28536e=cpuAverage();await new Promise(_0x3ac159=>setTimeout(_0x3ac159,0x64));const _0x952105=cpuAverage(),_0x190d26=_0x952105[_0x394f0d(0x200)]-_0x28536e[_0x394f0d(0x200)],_0x20572c=_0x952105[_0x394f0d(0x15d)]-_0x28536e[_0x394f0d(0x15d)],_0x5e4aa5=0x64-~~(0x64*_0x190d26/_0x20572c);return{'model':_0x123478[0x0]['model'],'cores':_0x123478['length'],'speed':_0x123478[0x0][_0x394f0d(0x1c0)]+_0x394f0d(0x188),'loadAverage':{'1min':os[_0x394f0d(0x19c)]()===_0x394f0d(0x1a7)?_0x5e4aa5:_0xc342fa[0x0][_0x394f0d(0x16a)](0x2),'5min':_0xc342fa[0x1][_0x394f0d(0x16a)](0x2),'15min':_0xc342fa[0x2]['toFixed'](0x2),'percentage':_0x5e4aa5}};};function cpuAverage(){const _0x3169d1=a0_0x5ca397;let _0x56e570=0x0,_0x5647fe=0x0;const _0x2be79f=os[_0x3169d1(0x15e)]();for(let _0x1208ff=0x0,_0x27f718=_0x2be79f[_0x3169d1(0x1e7)];_0x1208ff<_0x27f718;_0x1208ff++){const _0xf09e75=_0x2be79f[_0x1208ff];for(const _0x57fa79 in _0xf09e75[_0x3169d1(0x1eb)]){_0x5647fe+=_0xf09e75[_0x3169d1(0x1eb)][_0x57fa79];}_0x56e570+=_0xf09e75[_0x3169d1(0x1eb)]['idle'];}return{'idle':_0x56e570/_0x2be79f[_0x3169d1(0x1e7)],'total':_0x5647fe/_0x2be79f[_0x3169d1(0x1e7)]};}function a0_0x5a65(_0x53b72d,_0x24b02c){_0x53b72d=_0x53b72d-0x14e;const _0x25a103=a0_0x25a1();let _0x5a65f9=_0x25a103[_0x53b72d];return _0x5a65f9;}const getDiskInfo=async()=>{const _0x351af2=a0_0x5ca397;try{if(os[_0x351af2(0x19c)]()===_0x351af2(0x1a7)){const {stdout:_0x238539}=await execPromise(_0x351af2(0x1f6)),_0xa743c7=_0x238539[_0x351af2(0x203)]()[_0x351af2(0x170)]('\x0a')['slice'](0x1),_0x4ae0bf=_0xa743c7[_0x351af2(0x1d5)](_0x37a8d2=>{const _0x881aa7=_0x351af2,_0x69001e=_0x37a8d2[_0x881aa7(0x203)]()[_0x881aa7(0x170)](/\s+/);if(_0x69001e[_0x881aa7(0x1e7)]<0x3)return null;const _0x19c603=_0x69001e[0x0],_0x237c3a=parseInt(_0x69001e[0x1]),_0x39ce41=parseInt(_0x69001e[0x2]),_0x479a36=_0x39ce41-_0x237c3a,_0x20cc28=(_0x479a36/_0x39ce41*0x64)[_0x881aa7(0x16a)](0x1);return{'drive':_0x19c603,'total':(_0x39ce41/0x400**0x3)[_0x881aa7(0x16a)](0x2)+_0x881aa7(0x16e),'used':(_0x479a36/0x400**0x3)[_0x881aa7(0x16a)](0x2)+_0x881aa7(0x16e),'available':(_0x237c3a/0x400**0x3)[_0x881aa7(0x16a)](0x2)+_0x881aa7(0x16e),'percent':_0x20cc28+'%'};})['filter'](_0x10ea29=>_0x10ea29!==null);return _0x4ae0bf[0x0];}else{const {stdout:_0x56c2a3}=await execPromise(_0x351af2(0x1ef)),_0x318f2e=_0x56c2a3['trim']()[_0x351af2(0x170)](/\s+/);return{'drive':_0x318f2e[0x0],'total':_0x318f2e[0x1],'used':_0x318f2e[0x2],'available':_0x318f2e[0x3],'percent':_0x318f2e[0x4]};}}catch(_0x1a4322){return{'total':'-','used':'-','available':'-','percent':'0%'};}},getOSDetails=async()=>{const _0xf5fe34=a0_0x5ca397;try{const _0x5aba17=os[_0xf5fe34(0x19c)]();if(_0x5aba17===_0xf5fe34(0x1a7)){const {stdout:_0xfd7cce}=await execPromise(_0xf5fe34(0x19b)),_0x496b4a=_0xfd7cce[_0xf5fe34(0x203)]()[_0xf5fe34(0x170)]('\x0a'),_0x2ae6be=_0x496b4a[_0xf5fe34(0x1e7)]>0x1?_0x496b4a[0x1][_0xf5fe34(0x203)]():_0xf5fe34(0x1fd);return{'name':_0x2ae6be,'distro':_0xf5fe34(0x1fd),'kernel':os[_0xf5fe34(0x1e0)]()};}else{if(_0x5aba17==='linux')try{const {stdout:_0x244cdb}=await execPromise(_0xf5fe34(0x1a9)),_0x136d71=_0x244cdb[_0xf5fe34(0x170)]('\x0a');let _0x1b8c17=_0xf5fe34(0x17e),_0x3e736d='linux';return _0x136d71[_0xf5fe34(0x1d4)](_0x56e117=>{const _0x3d720d=_0xf5fe34;_0x56e117['startsWith']('PRETTY_NAME=')&&(_0x1b8c17=_0x56e117[_0x3d720d(0x170)]('=')[0x1][_0x3d720d(0x1cb)](/"/g,'')),_0x56e117[_0x3d720d(0x161)](_0x3d720d(0x1c5))&&(_0x3e736d=_0x56e117[_0x3d720d(0x170)]('=')[0x1][_0x3d720d(0x1cb)](/"/g,''));}),{'name':_0x1b8c17,'distro':_0x3e736d,'kernel':os[_0xf5fe34(0x1e0)]()};}catch(_0x3e76dc){return{'name':_0xf5fe34(0x1c1)+os[_0xf5fe34(0x1e0)](),'distro':_0xf5fe34(0x150),'kernel':os[_0xf5fe34(0x1e0)]()};}else return{'name':os[_0xf5fe34(0x16f)]()+'\x20'+os[_0xf5fe34(0x1e0)](),'distro':os[_0xf5fe34(0x19c)](),'kernel':os[_0xf5fe34(0x1e0)]()};}}catch(_0x24e7c8){return{'name':os['type'](),'distro':_0xf5fe34(0x17b),'kernel':os[_0xf5fe34(0x1e0)]()};}},getPM2Apps=async()=>{const _0x38d7db=a0_0x5ca397;let _0x2f2752=[];const _0x3dfdd9=(_0x3adfb9,_0x3e1187)=>{const _0x366076=a0_0x5a65;try{const _0x3c724b=JSON[_0x366076(0x1ae)](_0x3adfb9);return _0x3c724b[_0x366076(0x1d5)](_0x45bf8d=>{const _0x50c2ff=_0x366076;let _0x2a6739='-';const _0x5b61b9=_0x45bf8d[_0x50c2ff(0x1d2)][_0x50c2ff(0x18c)];if(_0x5b61b9&&_0x5b61b9>0x0){const _0x232fec=Date[_0x50c2ff(0x1dd)]()-_0x5b61b9,_0x4dfe72=Math[_0x50c2ff(0x186)](_0x232fec/(0x3e8*0x3c*0x3c*0x18)),_0x2395b5=Math[_0x50c2ff(0x186)](_0x232fec%(0x3e8*0x3c*0x3c*0x18)/(0x3e8*0x3c*0x3c)),_0x49fe1c=Math['floor'](_0x232fec%(0x3e8*0x3c*0x3c)/(0x3e8*0x3c));_0x2a6739=''+(_0x4dfe72>0x0?_0x4dfe72+'d\x20':'')+_0x2395b5+'h\x20'+_0x49fe1c+'m';}return{'name':_0x45bf8d[_0x50c2ff(0x17d)],'user':_0x3e1187,'pid':_0x45bf8d[_0x50c2ff(0x1e8)],'status':_0x45bf8d[_0x50c2ff(0x1d2)]['status'],'uptime':_0x2a6739,'restarts':_0x45bf8d[_0x50c2ff(0x1d2)][_0x50c2ff(0x196)],'memory':(_0x45bf8d['monit'][_0x50c2ff(0x1c9)]/0x400**0x2)[_0x50c2ff(0x16a)](0x2)+_0x50c2ff(0x190),'cpu':_0x45bf8d['monit'][_0x50c2ff(0x1c2)]+'%','mode':_0x45bf8d[_0x50c2ff(0x1d2)][_0x50c2ff(0x1d3)],'instances':_0x45bf8d[_0x50c2ff(0x1d2)][_0x50c2ff(0x1ca)]||0x1};});}catch(_0x2ec1dd){return[];}};try{const {stdout:_0x1391b9}=await execPromise('pm2\x20jlist'),_0xeb515f=os[_0x38d7db(0x152)]()[_0x38d7db(0x18e)];_0x2f2752=_0x2f2752['concat'](_0x3dfdd9(_0x1391b9,_0xeb515f));}catch(_0x70116c){}if(os[_0x38d7db(0x19c)]()!==_0x38d7db(0x1a7))try{const _0x29334f=_0x38d7db(0x1e1),{stdout:_0x180921}=await execPromise(_0x29334f),_0x22e588=os['userInfo']()[_0x38d7db(0x18e)],_0xada01c=_0x180921[_0x38d7db(0x203)]()[_0x38d7db(0x170)]('\x0a')[_0x38d7db(0x14f)](_0x599483=>_0x599483&&_0x599483!==_0x22e588&&!_0x599483[_0x38d7db(0x154)]('+')),_0x161dfd=process[_0x38d7db(0x195)]['ADMIN_PASS']||_0x38d7db(0x160);console[_0x38d7db(0x167)](_0x38d7db(0x1f9)+_0xada01c[_0x38d7db(0x16c)](',\x20'));for(const _0x24ce4a of _0xada01c){try{console[_0x38d7db(0x167)](_0x38d7db(0x1f4)+_0x24ce4a);const _0x2b4469=_0x38d7db(0x1cd)+_0x161dfd+_0x38d7db(0x1ad)+_0x24ce4a+_0x38d7db(0x164),{stdout:_0x524a59}=await execPromise(_0x2b4469),_0x376d9f=_0x3dfdd9(_0x524a59,_0x24ce4a);console[_0x38d7db(0x167)](_0x38d7db(0x197)+_0x376d9f[_0x38d7db(0x1e7)]+_0x38d7db(0x17a)+_0x24ce4a),_0x2f2752=_0x2f2752[_0x38d7db(0x1f0)](_0x376d9f);}catch(_0x2c2a46){console['warn'](_0x38d7db(0x19f)+_0x24ce4a+':\x20'+_0x2c2a46[_0x38d7db(0x16b)]);}}}catch(_0x3cb382){console['error'](_0x38d7db(0x1f2),_0x3cb382[_0x38d7db(0x16b)]);}return _0x2f2752['length']>0x0?_0x2f2752:null;},getHostServices=async()=>{const _0x678c34=a0_0x5ca397,_0x3a371f=process[_0x678c34(0x195)]['ADMIN_PASS']||_0x678c34(0x160);let _0x14779d=[];const _0x50e19c=_0x489392=>{const _0x5c1434=_0x678c34;return _0x489392['trim']()[_0x5c1434(0x170)]('\x0a')[_0x5c1434(0x1d5)](_0x2fc2a6=>{const _0x45dad5=_0x5c1434,_0x1bfe71=_0x2fc2a6[_0x45dad5(0x203)]()[_0x45dad5(0x170)](/\s+/);if(_0x1bfe71[_0x45dad5(0x1e7)]<0x6)return null;const _0x453dd4=_0x1bfe71[0x3],_0x5ea107=_0x1bfe71[_0x45dad5(0x1c6)](0x5)[_0x45dad5(0x16c)]('\x20');let _0x875c94=_0x45dad5(0x17b),_0x5798ff='-';const _0x3bdc03=_0x5ea107[_0x45dad5(0x1a8)](/"([^"]+)",pid=(\d+)/);return _0x3bdc03&&(_0x875c94=_0x3bdc03[0x1],_0x5798ff=_0x3bdc03[0x2]),{'command':_0x875c94,'pid':_0x5798ff,'user':_0x45dad5(0x184),'protocol':_0x45dad5(0x1ed),'address':_0x453dd4};})[_0x5c1434(0x14f)](_0x4bc03e=>_0x4bc03e!==null&&_0x4bc03e[_0x5c1434(0x1e8)]!=='-');};try{const _0x23151c=_0x678c34(0x1cd)+_0x3a371f+_0x678c34(0x178),{stdout:_0xdbc1b}=await execPromise(_0x23151c);if(_0xdbc1b)_0x14779d=_0xdbc1b[_0x678c34(0x203)]()[_0x678c34(0x170)]('\x0a')[_0x678c34(0x1d5)](_0x4ae79b=>{const _0x43a20b=_0x678c34,_0xbb93b2=_0x4ae79b[_0x43a20b(0x203)]()[_0x43a20b(0x170)](/\s+/);if(_0xbb93b2['length']<0x9)return null;return{'command':_0xbb93b2[0x0],'pid':_0xbb93b2[0x1],'user':_0xbb93b2[0x2],'protocol':_0xbb93b2[0x7],'address':_0xbb93b2[0x8]};})[_0x678c34(0x14f)](_0x37f447=>_0x37f447!==null);else throw new Error(_0x678c34(0x1bf));}catch(_0x43da68){try{const _0x5592b9=_0x678c34(0x1cd)+_0x3a371f+_0x678c34(0x163),{stdout:_0x3b600e}=await execPromise(_0x5592b9);if(_0x3b600e)_0x14779d=_0x50e19c(_0x3b600e);}catch(_0xd341f9){}}if(_0x14779d[_0x678c34(0x1e7)]===0x0)return[];try{const _0x420584=_0x14779d['map'](_0x5299f8=>_0x5299f8[_0x678c34(0x1e8)])[_0x678c34(0x16c)](','),_0x3510ce=_0x678c34(0x18f)+_0x420584+_0x678c34(0x169),{stdout:_0x220585}=await execPromise(_0x3510ce),_0x5d1820={};_0x220585[_0x678c34(0x203)]()['split']('\x0a')['forEach'](_0x3fd756=>{const _0x54daef=_0x678c34,_0x112fb4=_0x3fd756[_0x54daef(0x203)]()[_0x54daef(0x170)](/\s+/);_0x112fb4[_0x54daef(0x1e7)]>=0x4&&(_0x5d1820[_0x112fb4[0x0]]={'memory':_0x112fb4[0x1]+'%','cpu':_0x112fb4[0x2]+'%','uptime':_0x112fb4[0x3],'unit':_0x112fb4[_0x54daef(0x1e7)]>0x4&&_0x112fb4[0x4]!=='-'?_0x112fb4[0x4]:null});}),_0x14779d[_0x678c34(0x1d4)](_0x33457f=>{const _0x1b4e10=_0x678c34,_0x3083c1=_0x5d1820[_0x33457f[_0x1b4e10(0x1e8)]];_0x3083c1?(_0x33457f[_0x1b4e10(0x1c9)]=_0x3083c1['memory'],_0x33457f[_0x1b4e10(0x1c2)]=_0x3083c1['cpu'],_0x33457f[_0x1b4e10(0x19e)]=_0x3083c1[_0x1b4e10(0x19e)],_0x33457f['unit']=_0x3083c1[_0x1b4e10(0x1b2)]):(_0x33457f[_0x1b4e10(0x1c9)]='0%',_0x33457f['cpu']='0%',_0x33457f[_0x1b4e10(0x19e)]='-',_0x33457f[_0x1b4e10(0x1b2)]=null),_0x33457f[_0x1b4e10(0x1a4)]=_0x1b4e10(0x1fb);});}catch(_0x2c2ed5){console['warn'](_0x678c34(0x1df),_0x2c2ed5[_0x678c34(0x16b)]);}try{const _0xd74629=[_0x678c34(0x15f),_0x678c34(0x1f5),_0x678c34(0x1ab),_0x678c34(0x1b3),_0x678c34(0x1f1),'mariadb',_0x678c34(0x1d8),'mongod',_0x678c34(0x1e6)],_0xaa5e66=_0x14779d['map'](_0x263519=>_0x263519['command']);for(const _0x2a16e1 of _0xd74629){if(!_0xaa5e66['some'](_0x4140ca=>_0x4140ca[_0x678c34(0x1a2)](_0x2a16e1)))try{let _0x282d56=_0x2a16e1;if(_0x2a16e1===_0x678c34(0x1fc))_0x282d56=_0x678c34(0x1fc);if(_0x2a16e1===_0x678c34(0x1f1))_0x282d56=_0x678c34(0x1b3);if(_0x2a16e1===_0x678c34(0x1e6))_0x282d56='redis';const _0x522401=_0x678c34(0x15c)+_0x282d56,{stdout:_0x556de1}=await execPromise(_0x522401)[_0x678c34(0x15b)](_0x5bddd7=>({'stdout':_0x5bddd7[_0x678c34(0x1b4)]}));_0x556de1&&_0x556de1[_0x678c34(0x1a2)]('Loaded:\x20loaded')&&((_0x556de1['includes']('Active:\x20inactive')||_0x556de1[_0x678c34(0x1a2)](_0x678c34(0x1f7)))&&_0x14779d[_0x678c34(0x1de)]({'command':_0x2a16e1,'pid':'-','user':_0x678c34(0x159),'protocol':_0x678c34(0x1ed),'address':'-','memory':'-','cpu':'-','uptime':'-','unit':_0x282d56+'.service','status':_0x678c34(0x1a6)}));}catch(_0x5bbad5){}}}catch(_0x43d1aa){}return _0x14779d;};exports['killProcess']=async(_0x503158,_0x50a2c4)=>{const _0x5b017d=a0_0x5ca397,{pid:_0x5eb874}=_0x503158[_0x5b017d(0x19d)],_0x25ea77=process[_0x5b017d(0x195)][_0x5b017d(0x1e9)]||_0x5b017d(0x160);if(!/^\d+$/[_0x5b017d(0x176)](_0x5eb874))return _0x50a2c4[_0x5b017d(0x1a4)](0x190)[_0x5b017d(0x185)]({'status':_0x5b017d(0x1ac),'message':_0x5b017d(0x1b6)});try{const _0x1dfc36='echo\x20\x22'+_0x25ea77+_0x5b017d(0x1ea)+_0x5eb874;await execPromise(_0x1dfc36),_0x50a2c4[_0x5b017d(0x1a4)](0xc8)[_0x5b017d(0x185)]({'status':'success','message':_0x5b017d(0x158)+_0x5eb874+_0x5b017d(0x1b5)});}catch(_0x435e28){console['error'](_0x5b017d(0x1a3)+_0x5eb874+':',_0x435e28[_0x5b017d(0x16b)]),_0x50a2c4[_0x5b017d(0x1a4)](0x1f4)[_0x5b017d(0x185)]({'status':'error','message':_0x5b017d(0x1d0)+_0x5eb874+'.','error':_0x435e28['message']});}};const fs=require('fs')[a0_0x5ca397(0x1b1)],yaml=require(a0_0x5ca397(0x17c)),path=require('path'),CONFIG_DIR=process[a0_0x5ca397(0x195)]['CLOUDFLARED_CONFIG_DIR']||a0_0x5ca397(0x153),getCloudflareLocalMappings=async()=>{const _0x2e03b6=a0_0x5ca397,_0x242713={};try{let _0x5a04e1;try{_0x5a04e1=await fs[_0x2e03b6(0x1c4)](CONFIG_DIR);}catch(_0x5c734e){return _0x242713;}const _0x219a53=_0x5a04e1?_0x5a04e1[_0x2e03b6(0x14f)](_0x374594=>_0x374594[_0x2e03b6(0x154)](_0x2e03b6(0x151))):[];for(const _0x2e2deb of _0x219a53){try{const _0x5261c6=await fs['readFile'](path['join'](CONFIG_DIR,_0x2e2deb),_0x2e03b6(0x187)),_0x588bb7=yaml['load'](_0x5261c6);if(_0x588bb7&&_0x588bb7['ingress'])for(const _0x3eba2c of _0x588bb7[_0x2e03b6(0x179)]){if(_0x3eba2c[_0x2e03b6(0x1c3)]&&_0x3eba2c[_0x2e03b6(0x182)]){const _0x5e9724=_0x3eba2c[_0x2e03b6(0x182)][_0x2e03b6(0x1a8)](/https?:\/\/(localhost|127\.0\.0\.1|0\.0\.0\.0):(\d+)/);if(_0x5e9724){const _0x48469b=_0x5e9724[0x2];!_0x242713[_0x48469b]&&(_0x242713[_0x48469b]=_0x2e03b6(0x201)+_0x3eba2c[_0x2e03b6(0x1c3)]);}}}}catch(_0x4d6ddd){}}}catch(_0x54b76f){}return _0x242713;};exports[a0_0x5ca397(0x1b7)]=async(_0x1d1ea7,_0xf1bafc)=>{const _0x44a682=a0_0x5ca397;try{const _0x5d9dfa=await getPublicIP(),_0x50ed05=getLocalIPs(),_0x51b4ad=getUptime(),_0x50d735=getMemoryInfo(),_0x322339=await getCPUInfo(),_0x480ab5=await getPM2Apps(),_0x2ec0ec=await getHostServices(),_0x4c9df7=await getCloudflareLocalMappings();_0x2ec0ec['forEach'](_0x422a1d=>{const _0x1778ac=a0_0x5a65,_0x485832=_0x422a1d[_0x1778ac(0x1ee)][_0x1778ac(0x170)](':'),_0x71439d=_0x485832[_0x485832[_0x1778ac(0x1e7)]-0x1];_0x4c9df7[_0x71439d]&&(_0x422a1d[_0x1778ac(0x1b0)]=_0x4c9df7[_0x71439d]);});const _0x1ab305=await getDiskInfo(),_0x52de90=await getOSDetails(),_0x333ec1={'status':'success','timestamp':new Date()[_0x44a682(0x162)](),'server':{'hostname':os[_0x44a682(0x1c3)](),'platform':os[_0x44a682(0x19c)](),'os':_0x52de90[_0x44a682(0x17d)],'distro':_0x52de90['distro'],'kernel':_0x52de90[_0x44a682(0x1ec)],'architecture':os[_0x44a682(0x1bc)](),'type':os['type'](),'release':os[_0x44a682(0x1e0)](),'uptime':_0x51b4ad},'network':{'publicIP':_0x5d9dfa||_0x44a682(0x1b9),'localIPs':_0x50ed05},'cpu':_0x322339,'memory':_0x50d735,'disk':_0x1ab305,'node':{'version':process[_0x44a682(0x183)],'processUptime':{'raw':process[_0x44a682(0x19e)](),'formatted':Math[_0x44a682(0x186)](process['uptime']()/0xe10)+'h\x20'+Math[_0x44a682(0x186)](process[_0x44a682(0x19e)]()%0xe10/0x3c)+'m'},'pid':process[_0x44a682(0x1e8)]},'applications':_0x480ab5||[],'hostServices':_0x2ec0ec,'subscription':_0x1d1ea7[_0x44a682(0x180)]||{'plan':'Unknown','active':![]}};_0xf1bafc[_0x44a682(0x1a4)](0xc8)['json'](_0x333ec1);}catch(_0x31987c){console[_0x44a682(0x1ac)](_0x44a682(0x192),_0x31987c),_0xf1bafc[_0x44a682(0x1a4)](0x1f4)['json']({'status':_0x44a682(0x1ac),'message':_0x44a682(0x1fa),'error':_0x31987c[_0x44a682(0x16b)]});}},exports[a0_0x5ca397(0x1bb)]=async(_0x247ded,_0x4448fb)=>{const _0x390314=a0_0x5ca397;try{const _0x2b1d1b=getMemoryInfo(),_0x3e183b=await getCPUInfo(),_0x1c8c90=getUptime();let _0x14b884=_0x390314(0x177);const _0x26420c=[],_0x515941=parseFloat(_0x2b1d1b[_0x390314(0x173)]);if(_0x515941>0x5a)_0x14b884='critical',_0x26420c[_0x390314(0x1de)](_0x390314(0x1e2));else _0x515941>0x4b&&(_0x14b884='warning',_0x26420c[_0x390314(0x1de)](_0x390314(0x1fe)));const _0x8f69fc=parseFloat(_0x3e183b[_0x390314(0x1da)]['1min']);_0x8f69fc>_0x3e183b[_0x390314(0x14e)]*0x2&&(_0x14b884=_0x14b884===_0x390314(0x202)?_0x390314(0x202):_0x390314(0x1f8),_0x26420c[_0x390314(0x1de)](_0x390314(0x157))),_0x4448fb[_0x390314(0x1a4)](0xc8)[_0x390314(0x185)]({'status':_0x14b884,'timestamp':new Date()[_0x390314(0x162)](),'uptime':_0x1c8c90[_0x390314(0x172)],'checks':{'memory':{'status':_0x515941>0x5a?_0x390314(0x202):_0x515941>0x4b?'warning':'ok','usage':_0x2b1d1b[_0x390314(0x173)]},'cpu':{'status':_0x8f69fc>_0x3e183b[_0x390314(0x14e)]*0x2?'warning':'ok','loadAverage':_0x3e183b[_0x390314(0x1da)]['1min'],'cores':_0x3e183b[_0x390314(0x14e)]}},'warnings':_0x26420c[_0x390314(0x1e7)]>0x0?_0x26420c:null});}catch(_0x216382){console[_0x390314(0x1ac)](_0x390314(0x1e5),_0x216382),_0x4448fb[_0x390314(0x1a4)](0x1f4)[_0x390314(0x185)]({'status':_0x390314(0x1ac),'message':_0x390314(0x199),'error':_0x216382[_0x390314(0x16b)]});}},exports[a0_0x5ca397(0x1d9)]=async(_0xd22e52,_0x468f3c)=>{const _0x209fa6=a0_0x5ca397;try{const _0x4cc0fa=await getPM2Apps();if(!_0x4cc0fa)return _0x468f3c[_0x209fa6(0x1a4)](0xc8)[_0x209fa6(0x185)]({'status':_0x209fa6(0x16d),'message':'PM2\x20is\x20not\x20available\x20or\x20no\x20applications\x20are\x20running','applications':[]});_0x468f3c['status'](0xc8)[_0x209fa6(0x185)]({'status':_0x209fa6(0x16d),'timestamp':new Date()['toISOString'](),'count':_0x4cc0fa[_0x209fa6(0x1e7)],'applications':_0x4cc0fa});}catch(_0x358069){console['error'](_0x209fa6(0x1d7),_0x358069),_0x468f3c[_0x209fa6(0x1a4)](0x1f4)[_0x209fa6(0x185)]({'status':_0x209fa6(0x1ac),'message':_0x209fa6(0x1ff),'error':_0x358069['message']});}},exports['restartApp']=async(_0xbaccd7,_0x4ec736)=>{const _0x28c4f0=a0_0x5ca397,{id:_0x4a0222}=_0xbaccd7[_0x28c4f0(0x19d)],{user:_0x41e5e6}=_0xbaccd7['body'],_0xbedf36=process[_0x28c4f0(0x195)][_0x28c4f0(0x1e9)]||'Krishika@9959';if(!/^[a-zA-Z0-9_-]+$/[_0x28c4f0(0x176)](_0x4a0222))return _0x4ec736[_0x28c4f0(0x1a4)](0x190)[_0x28c4f0(0x185)]({'status':_0x28c4f0(0x1ac),'message':_0x28c4f0(0x1ba)});try{let _0x37262a=_0x28c4f0(0x168)+_0x4a0222;_0x41e5e6&&os['platform']()!==_0x28c4f0(0x1a7)&&_0x41e5e6!==os[_0x28c4f0(0x152)]()['username']&&(_0x37262a=_0x28c4f0(0x1cd)+_0xbedf36+_0x28c4f0(0x1ad)+_0x41e5e6+_0x28c4f0(0x194)+_0x4a0222),await execPromise(_0x37262a),_0x4ec736[_0x28c4f0(0x1a4)](0xc8)['json']({'status':_0x28c4f0(0x16d),'message':_0x28c4f0(0x18d)+_0x4a0222+_0x28c4f0(0x166)});}catch(_0x3e805d){console['error']('Error\x20restarting\x20app\x20'+_0x4a0222+':',_0x3e805d),_0x4ec736['status'](0x1f4)[_0x28c4f0(0x185)]({'status':_0x28c4f0(0x1ac),'message':'Failed\x20to\x20restart\x20application','error':_0x3e805d[_0x28c4f0(0x16b)]});}},exports['restartService']=async(_0x4e857f,_0x349ba3)=>{const _0x24b2ea=a0_0x5ca397,{name:_0x1db7cb}=_0x4e857f['params'],_0x464597=process[_0x24b2ea(0x195)][_0x24b2ea(0x1e9)]||_0x24b2ea(0x160);if(!/^[a-zA-Z0-9_\-\.]+$/[_0x24b2ea(0x176)](_0x1db7cb))return _0x349ba3['status'](0x190)[_0x24b2ea(0x185)]({'status':_0x24b2ea(0x1ac),'message':'Invalid\x20service\x20name'});try{const _0x2790e0='echo\x20\x22'+_0x464597+_0x24b2ea(0x1e3)+_0x1db7cb;await execPromise(_0x2790e0),_0x349ba3[_0x24b2ea(0x1a4)](0xc8)[_0x24b2ea(0x185)]({'status':_0x24b2ea(0x16d),'message':'Service\x20'+_0x1db7cb+_0x24b2ea(0x166)});}catch(_0x167011){console[_0x24b2ea(0x1ac)](_0x24b2ea(0x1c8)+_0x1db7cb+':',_0x167011[_0x24b2ea(0x16b)]),_0x349ba3[_0x24b2ea(0x1a4)](0x1f4)[_0x24b2ea(0x185)]({'status':_0x24b2ea(0x1ac),'message':_0x24b2ea(0x1a0)+_0x1db7cb+_0x24b2ea(0x1b8),'error':_0x167011['message']});}},exports['stopService']=async(_0xf92cae,_0x48ff93)=>{const _0x405a23=a0_0x5ca397,{name:_0x18c656}=_0xf92cae[_0x405a23(0x19d)],_0x4b74da=process[_0x405a23(0x195)][_0x405a23(0x1e9)]||_0x405a23(0x160);if(!/^[a-zA-Z0-9_\-\.]+$/['test'](_0x18c656))return _0x48ff93[_0x405a23(0x1a4)](0x190)['json']({'status':_0x405a23(0x1ac),'message':_0x405a23(0x1aa)});try{const _0x273969=_0x405a23(0x1cd)+_0x4b74da+_0x405a23(0x155)+_0x18c656;await execPromise(_0x273969),_0x48ff93[_0x405a23(0x1a4)](0xc8)[_0x405a23(0x185)]({'status':_0x405a23(0x16d),'message':_0x405a23(0x1bd)+_0x18c656+_0x405a23(0x1dc)});}catch(_0x4bbaee){console[_0x405a23(0x1ac)](_0x405a23(0x1d1)+_0x18c656+':',_0x4bbaee['message']),_0x48ff93[_0x405a23(0x1a4)](0x1f4)[_0x405a23(0x185)]({'status':'error','message':'Failed\x20to\x20stop\x20service\x20'+_0x18c656+'.','error':_0x4bbaee['message']});}},exports[a0_0x5ca397(0x1c7)]=async(_0x2edf9a,_0x4721cd)=>{const _0x576773=a0_0x5ca397,{name:_0x81cb84}=_0x2edf9a[_0x576773(0x19d)],_0x646b3f=process['env'][_0x576773(0x1e9)]||_0x576773(0x160);if(!/^[a-zA-Z0-9_\-\.]+$/[_0x576773(0x176)](_0x81cb84))return _0x4721cd[_0x576773(0x1a4)](0x190)[_0x576773(0x185)]({'status':'error','message':'Invalid\x20service\x20name'});try{const _0x8bdb33=_0x576773(0x1cd)+_0x646b3f+_0x576773(0x174)+_0x81cb84;await execPromise(_0x8bdb33),_0x4721cd[_0x576773(0x1a4)](0xc8)[_0x576773(0x185)]({'status':_0x576773(0x16d),'message':_0x576773(0x1bd)+_0x81cb84+_0x576773(0x19a)});}catch(_0x152f5f){console['error'](_0x576773(0x1cf)+_0x81cb84+':',_0x152f5f['message']),_0x4721cd[_0x576773(0x1a4)](0x1f4)['json']({'status':'error','message':_0x576773(0x181)+_0x81cb84+'.','error':_0x152f5f['message']});}};function a0_0x25a1(){const _0x3951e6=['[PM2\x20Scan]\x20listing\x20apps\x20for\x20user:\x20','httpd','wmic\x20logicaldisk\x20get\x20size,freespace,caption','Active:\x20failed','warning','[PM2\x20Scan]\x20Found\x20potential\x20PM2\x20users:\x20','Failed\x20to\x20retrieve\x20server\x20information','online','mongod','Windows','Memory\x20usage\x20is\x20high','Failed\x20to\x20retrieve\x20applications','idle','https://','critical','trim','cores','filter','linux','.yml','userInfo','/etc/cloudflared','endsWith','\x22\x20|\x20sudo\x20-S\x20systemctl\x20stop\x20','8pVAPQI','CPU\x20load\x20is\x20high','Process\x20','root','IPv4','catch','systemctl\x20status\x20','total','cpus','apache2','Krishika@9959','startsWith','toISOString','\x22\x20|\x20sudo\x20-S\x20ss\x20-lptn\x20|\x20grep\x20LISTEN','\x20pm2\x20jlist','808665PLxDWN','\x20restarted\x20successfully','log','pm2\x20restart\x20','\x20-o\x20pid,pmem,pcpu,etime,unit\x20--no-headers','toFixed','message','join','success','\x20GB','type','split','30hpbKru','formatted','usagePercentage','\x22\x20|\x20sudo\x20-S\x20systemctl\x20start\x20','3005690dlpCyf','test','healthy','\x22\x20|\x20sudo\x20-S\x20lsof\x20-iTCP\x20-sTCP:LISTEN\x20-P\x20-n\x20|\x20tail\x20-n\x20+2','ingress','\x20apps\x20for\x20','unknown','js-yaml','name','Linux','22463LgOpcl','subscription','Failed\x20to\x20start\x20service\x20','service','version','system','json','floor','utf8','\x20MHz','2hKOJuR','axios','mac','pm_uptime','Application\x20','username','ps\x20-p\x20','\x20MB','freemem','Error\x20getting\x20server\x20info:','util','\x20pm2\x20restart\x20','env','restart_time','[PM2\x20Scan]\x20Found\x20','child_process','Failed\x20to\x20retrieve\x20health\x20status','\x20started\x20successfully','wmic\x20os\x20get\x20Caption','platform','params','uptime','[PM2\x20Scan]\x20Failed\x20to\x20list\x20for\x20','Failed\x20to\x20restart\x20service\x20','842967jYSidr','includes','Error\x20killing\x20process\x20','status','family','stopped','win32','match','cat\x20/etc/os-release','Invalid\x20service\x20name','nginx','error','\x22\x20|\x20sudo\x20-S\x20-u\x20','parse','152462QLGBen','publicUrl','promises','unit','mysql','stdout','\x20killed\x20successfully','Invalid\x20PID','getServerInfo','.\x20Ensure\x20it\x20is\x20a\x20systemd\x20service.','Unable\x20to\x20fetch','Invalid\x20application\x20ID\x20or\x20name','getHealthStatus','arch','Service\x20','data','lsof\x20empty','speed','Linux\x20','cpu','hostname','readdir','ID=','slice','startService','Error\x20restarting\x20service\x20','memory','instances','replace','https://api.ipify.org?format=json','echo\x20\x22','keys','Error\x20starting\x20service\x20','Failed\x20to\x20kill\x20process\x20','Error\x20stopping\x20service\x20','pm2_env','exec_mode','forEach','map','networkInterfaces','Error\x20getting\x20applications:','postgresql','getApplications','loadAverage','63DFWxen','\x20stopped\x20successfully','now','push','Failed\x20to\x20fetch\x20process\x20stats\x20for\x20host\x20services:','release','ps\x20-eo\x20user:50,args\x20|\x20grep\x20\x22God\x20Daemon\x22\x20|\x20grep\x20-v\x20grep\x20|\x20awk\x20\x27{print\x20$1}\x27\x20|\x20sort\x20|\x20uniq','Memory\x20usage\x20is\x20critically\x20high','\x22\x20|\x20sudo\x20-S\x20systemctl\x20restart\x20','24364ASAINN','Error\x20getting\x20health\x20status:','redis-server','length','pid','ADMIN_PASS','\x22\x20|\x20sudo\x20-S\x20kill\x20-9\x20','times','kernel','TCP','address','df\x20-h\x20/\x20|\x20tail\x20-1','concat','mysqld','[PM2\x20Scan]\x20Multi-user\x20scan\x20error:','1297384UFZrrq'];a0_0x25a1=function(){return _0x3951e6;};return a0_0x25a1();}
@@ -0,0 +1 @@
1
+ function a0_0x397f(_0x4e5108,_0x55f585){_0x4e5108=_0x4e5108-0x14f;var _0x2c2f85=a0_0x2c2f();var _0x397f7a=_0x2c2f85[_0x4e5108];return _0x397f7a;}var a0_0x14118b=a0_0x397f;function a0_0x2c2f(){var _0x4d2a14=['server-details-api','12330855zbEfdv','24HdYcfS','2qrQKmU','production','15275601HDApQP','3525680fMZTfA','8vwhlBN','11540711cUapTP','2216110ezsdlK','exports','6uXSTvW','development','285006MEJQwU','fork','./server.js','224981VgdVBm'];a0_0x2c2f=function(){return _0x4d2a14;};return a0_0x2c2f();}(function(_0x1351df,_0x169137){var _0x7325bc=a0_0x397f,_0x405968=_0x1351df();while(!![]){try{var _0x19bb31=-parseInt(_0x7325bc(0x15c))/0x1*(parseInt(_0x7325bc(0x14f))/0x2)+parseInt(_0x7325bc(0x159))/0x3*(-parseInt(_0x7325bc(0x15f))/0x4)+parseInt(_0x7325bc(0x155))/0x5+parseInt(_0x7325bc(0x157))/0x6*(parseInt(_0x7325bc(0x154))/0x7)+-parseInt(_0x7325bc(0x153))/0x8*(-parseInt(_0x7325bc(0x15e))/0x9)+-parseInt(_0x7325bc(0x152))/0xa+-parseInt(_0x7325bc(0x151))/0xb;if(_0x19bb31===_0x169137)break;else _0x405968['push'](_0x405968['shift']());}catch(_0x307715){_0x405968['push'](_0x405968['shift']());}}}(a0_0x2c2f,0xe202a),module[a0_0x14118b(0x156)]={'apps':[{'name':a0_0x14118b(0x15d),'script':a0_0x14118b(0x15b),'instances':0x1,'exec_mode':a0_0x14118b(0x15a),'autorestart':!![],'watch':![],'max_memory_restart':'1G','env':{'NODE_ENV':a0_0x14118b(0x158),'PORT':0xbc2},'env_production':{'NODE_ENV':a0_0x14118b(0x150),'PORT':0xbc2}}]});
@@ -0,0 +1 @@
1
+ function a0_0x2e91(){const _0x3c75dc=['data','LICENSE_KEY','parse','/activate','/activate?error=Invalid\x20License\x20Key','subscription','1969674aUEWCj','expiry','json','PRO-','node-machine-id','status','get','739128tQyGMa','933506OPnEBS','https://mulasoft.in/api/validate','exports','Pro','error','License\x20Validation\x20Failed:','cwd','licenseKey','valid','Invalid\x20License\x20Key','License\x20Activation\x20Required.','utf8','2HExwpT','redirect','Internal\x20Server\x20Error','originalUrl','3pcjvvr','existsSync','&machineId=','7062840EGdBwh','695881JnNFdz','DEMO-123','Demo','2831596NiJYVz','plan','join','path','message','/api','env','?key=','/payment','send','1474470tFXCIF','Pro\x20(Offline)','startsWith'];a0_0x2e91=function(){return _0x3c75dc;};return a0_0x2e91();}const a0_0x484895=a0_0x3acf;function a0_0x3acf(_0x49188d,_0x223cb2){_0x49188d=_0x49188d-0x17c;const _0x2e919c=a0_0x2e91();let _0x3acff4=_0x2e919c[_0x49188d];return _0x3acff4;}(function(_0x3be05b,_0x100657){const _0x2fdf51=a0_0x3acf,_0x29534b=_0x3be05b();while(!![]){try{const _0x3e83d1=parseInt(_0x2fdf51(0x1aa))/0x1*(-parseInt(_0x2fdf51(0x1a2))/0x2)+parseInt(_0x2fdf51(0x1a6))/0x3*(parseInt(_0x2fdf51(0x1ad))/0x4)+-parseInt(_0x2fdf51(0x185))/0x5+-parseInt(_0x2fdf51(0x18e))/0x6+parseInt(_0x2fdf51(0x196))/0x7+parseInt(_0x2fdf51(0x195))/0x8+parseInt(_0x2fdf51(0x1a9))/0x9;if(_0x3e83d1===_0x100657)break;else _0x29534b['push'](_0x29534b['shift']());}catch(_0x3f2ed9){_0x29534b['push'](_0x29534b['shift']());}}}(a0_0x2e91,0x617fa));const fs=require('fs'),path=require(a0_0x484895(0x17e)),axios=require('axios'),{machineIdSync}=require(a0_0x484895(0x192)),CONFIG_FILE=path[a0_0x484895(0x17d)](process[a0_0x484895(0x19c)](),'monitor-config.json'),verifySubscription=async(_0x232bb2,_0x2623ec,_0x1d6a51)=>{const _0x2eb6b7=a0_0x484895;if(_0x232bb2['path']===_0x2eb6b7(0x18b)||_0x232bb2[_0x2eb6b7(0x17e)]===_0x2eb6b7(0x183))return _0x1d6a51();try{const _0x36e092=machineIdSync();let _0x568f98=process[_0x2eb6b7(0x181)][_0x2eb6b7(0x189)];if(!_0x568f98&&fs[_0x2eb6b7(0x1a7)](CONFIG_FILE))try{const _0x145a28=JSON[_0x2eb6b7(0x18a)](fs['readFileSync'](CONFIG_FILE,_0x2eb6b7(0x1a1)));if(_0x145a28[_0x2eb6b7(0x19d)])_0x568f98=_0x145a28[_0x2eb6b7(0x19d)];}catch(_0x443398){}const _0x48cd61=process[_0x2eb6b7(0x181)]['LICENSE_VALIDATION_URL']||_0x2eb6b7(0x197);if(!_0x568f98){if(_0x232bb2[_0x2eb6b7(0x1a5)][_0x2eb6b7(0x187)](_0x2eb6b7(0x180)))return _0x2623ec[_0x2eb6b7(0x193)](0x191)[_0x2eb6b7(0x190)]({'status':_0x2eb6b7(0x19a),'message':_0x2eb6b7(0x1a0),'redirect':'/activate'});return _0x2623ec[_0x2eb6b7(0x1a3)](_0x2eb6b7(0x18b));}try{if(_0x568f98===_0x2eb6b7(0x1ab))return _0x232bb2[_0x2eb6b7(0x18d)]={'active':!![],'plan':_0x2eb6b7(0x1ac),'key':_0x568f98},_0x1d6a51();const _0x436de0=await axios[_0x2eb6b7(0x194)](_0x48cd61+_0x2eb6b7(0x182)+_0x568f98+_0x2eb6b7(0x1a8)+_0x36e092,{'timeout':0xbb8});if(_0x436de0['data']&&_0x436de0[_0x2eb6b7(0x188)][_0x2eb6b7(0x19e)])return _0x232bb2[_0x2eb6b7(0x18d)]={'active':!![],'plan':_0x436de0[_0x2eb6b7(0x188)][_0x2eb6b7(0x17c)]||_0x2eb6b7(0x199),'expiry':_0x436de0['data'][_0x2eb6b7(0x18f)],'key':_0x568f98},_0x1d6a51();else{if(_0x232bb2['originalUrl'][_0x2eb6b7(0x187)](_0x2eb6b7(0x180)))return _0x2623ec[_0x2eb6b7(0x193)](0x193)['json']({'status':_0x2eb6b7(0x19a),'message':_0x2eb6b7(0x19f)});return _0x2623ec['redirect'](_0x2eb6b7(0x18c));}}catch(_0x2d4bc1){console[_0x2eb6b7(0x19a)](_0x2eb6b7(0x19b),_0x2d4bc1[_0x2eb6b7(0x17f)]);if(_0x568f98['startsWith'](_0x2eb6b7(0x191)))return _0x232bb2[_0x2eb6b7(0x18d)]={'active':!![],'plan':_0x2eb6b7(0x186),'key':_0x568f98},_0x1d6a51();return _0x2623ec['redirect']('/activate?error=Validation\x20Service\x20Unavailable');}}catch(_0x4286c4){console[_0x2eb6b7(0x19a)]('Subscription\x20verify\x20error:',_0x4286c4[_0x2eb6b7(0x17f)]),_0x2623ec[_0x2eb6b7(0x193)](0x1f4)[_0x2eb6b7(0x184)](_0x2eb6b7(0x1a4));}};module[a0_0x484895(0x198)]=verifySubscription;
@@ -0,0 +1,99 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Login - Server Monitor</title>
8
+ <link rel="stylesheet" href="style.css">
9
+ <script type="module" src="https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.esm.js"></script>
10
+ <script nomodule src="https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.js"></script>
11
+ </head>
12
+
13
+ <body>
14
+ <div class="app-layout login-container">
15
+ <div class="card login-card">
16
+ <div class="card-header login-header">
17
+ <div class="card-title">
18
+ <ion-icon name="shield-checkmark-outline" class="card-icon"></ion-icon>
19
+ Authorized Access
20
+ </div>
21
+ </div>
22
+
23
+ <form id="loginForm" class="login-form">
24
+ <div class="form-group">
25
+ <label for="username">Username</label>
26
+ <div class="input-wrapper">
27
+ <ion-icon name="person-outline"></ion-icon>
28
+ <input type="text" id="username" name="username" placeholder="Enter username" required>
29
+ </div>
30
+ </div>
31
+
32
+ <div class="form-group">
33
+ <label for="password">Password</label>
34
+ <div class="input-wrapper">
35
+ <ion-icon name="lock-closed-outline"></ion-icon>
36
+ <input type="password" id="password" name="password" placeholder="Enter password" required>
37
+ </div>
38
+ </div>
39
+
40
+ <div id="error-msg" class="error-message"></div>
41
+
42
+ <button type="submit" class="login-btn">
43
+ Login
44
+ <ion-icon name="arrow-forward-outline"></ion-icon>
45
+ </button>
46
+
47
+ <div
48
+ style="margin-top: 1.5rem; text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1rem;">
49
+ <p style="color: #94a3b8; font-size: 0.9rem; margin-bottom: 0.5rem;">New User?</p>
50
+ <a href="/payment"
51
+ style="color: var(--primary); text-decoration: none; font-weight: 500; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 0.5rem;">
52
+ Subscribe for Access
53
+ <ion-icon name="card-outline"></ion-icon>
54
+ </a>
55
+ </div>
56
+ </form>
57
+ </div>
58
+ </div>
59
+
60
+ <script>
61
+ document.getElementById('loginForm').addEventListener('submit', async (e) => {
62
+ e.preventDefault();
63
+ const username = document.getElementById('username').value;
64
+ const password = document.getElementById('password').value;
65
+ const errorMsg = document.getElementById('error-msg');
66
+ const btn = document.querySelector('.login-btn');
67
+
68
+ // Reset state
69
+ errorMsg.textContent = '';
70
+ btn.disabled = true;
71
+ btn.style.opacity = '0.7';
72
+
73
+ try {
74
+ const response = await fetch('/login', {
75
+ method: 'POST',
76
+ headers: { 'Content-Type': 'application/json' },
77
+ body: JSON.stringify({ username, password })
78
+ });
79
+
80
+ const data = await response.json();
81
+
82
+ if (response.ok) {
83
+ window.location.href = '/';
84
+ } else {
85
+ errorMsg.textContent = data.message || 'Login failed';
86
+ btn.disabled = false;
87
+ btn.style.opacity = '1';
88
+ }
89
+ } catch (error) {
90
+ console.error('Login error:', error);
91
+ errorMsg.textContent = 'An error occurred. Please try again.';
92
+ btn.disabled = false;
93
+ btn.style.opacity = '1';
94
+ }
95
+ });
96
+ </script>
97
+ </body>
98
+
99
+ </html>
@@ -0,0 +1,152 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Subscribe to Server Monitor Pro</title>
8
+ <script src="https://sdk.cashfree.com/js/v3/cashfree.js"></script>
9
+ <style>
10
+ :root {
11
+ --primary: #6366f1;
12
+ --primary-hover: #4f46e5;
13
+ --bg: #0f172a;
14
+ --card-bg: #1e293b;
15
+ --text: #f8fafc;
16
+ }
17
+
18
+ body {
19
+ font-family: 'Inter', system-ui, sans-serif;
20
+ background-color: var(--bg);
21
+ color: var(--text);
22
+ display: flex;
23
+ justify-content: center;
24
+ align-items: center;
25
+ height: 100vh;
26
+ margin: 0;
27
+ }
28
+
29
+ .card {
30
+ background: var(--card-bg);
31
+ padding: 2rem;
32
+ border-radius: 1rem;
33
+ box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
34
+ width: 100%;
35
+ max-width: 400px;
36
+ text-align: center;
37
+ }
38
+
39
+ h1 {
40
+ font-size: 1.5rem;
41
+ margin-bottom: 1rem;
42
+ }
43
+
44
+ p {
45
+ color: #94a3b8;
46
+ margin-bottom: 2rem;
47
+ }
48
+
49
+ .price {
50
+ font-size: 3rem;
51
+ font-weight: bold;
52
+ margin-bottom: 2rem;
53
+ }
54
+
55
+ .price span {
56
+ font-size: 1rem;
57
+ color: #94a3b8;
58
+ }
59
+
60
+ button {
61
+ background-color: var(--primary);
62
+ color: white;
63
+ border: none;
64
+ padding: 0.75rem 1.5rem;
65
+ border-radius: 0.5rem;
66
+ font-weight: 600;
67
+ cursor: pointer;
68
+ width: 100%;
69
+ transition: background 0.2s;
70
+ }
71
+
72
+ button:hover {
73
+ background-color: var(--primary-hover);
74
+ }
75
+
76
+ .input-group {
77
+ text-align: left;
78
+ margin-bottom: 1rem;
79
+ }
80
+
81
+ label {
82
+ display: block;
83
+ margin-bottom: 0.25rem;
84
+ font-size: 0.875rem;
85
+ color: #94a3b8;
86
+ }
87
+
88
+ input {
89
+ width: 100%;
90
+ padding: 0.5rem;
91
+ border-radius: 0.25rem;
92
+ border: 1px solid #334155;
93
+ background: #0f172a;
94
+ color: white;
95
+ box-sizing: border-box;
96
+ }
97
+ </style>
98
+ </head>
99
+
100
+ <body>
101
+ <div class="card">
102
+ <h1>Server Monitor Pro</h1>
103
+ <p>Unlock advanced monitoring, Docker stats, and real-time terminal access.</p>
104
+ <div class="price">₹999<span>/year</span></div>
105
+
106
+ <div class="input-group">
107
+ <label>Email</label>
108
+ <input type="email" id="email" placeholder="email@example.com" value="test@example.com">
109
+ </div>
110
+ <div class="input-group">
111
+ <label>Phone</label>
112
+ <input type="tel" id="phone" placeholder="9999999999" value="9999999999">
113
+ </div>
114
+
115
+ <button id="payBtn">Subscribe Now</button>
116
+ </div>
117
+
118
+ <script>
119
+ const cashfree = Cashfree({
120
+ mode: "production" // Using the production credentials provided
121
+ });
122
+
123
+ document.getElementById('payBtn').addEventListener('click', async () => {
124
+ const email = document.getElementById('email').value;
125
+ const phone = document.getElementById('phone').value;
126
+
127
+ const response = await fetch('/api/payment/create-session', {
128
+ method: 'POST',
129
+ headers: { 'Content-Type': 'application/json' },
130
+ body: JSON.stringify({
131
+ amount: 999,
132
+ customerId: 'USER_' + Math.floor(Math.random() * 10000),
133
+ customerPhone: phone,
134
+ customerEmail: email
135
+ })
136
+ });
137
+
138
+ const session = await response.json();
139
+
140
+ if (session.payment_session_id) {
141
+ cashfree.checkout({
142
+ paymentSessionId: session.payment_session_id,
143
+ redirectTarget: "_self"
144
+ });
145
+ } else {
146
+ alert('Failed to create payment session');
147
+ }
148
+ });
149
+ </script>
150
+ </body>
151
+
152
+ </html>