diff --git a/agents/meshcore.js b/agents/meshcore.js index 807bcbf7..f3398f24 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -1671,6 +1671,20 @@ function createMeshCore(agent) break; } /* + case 'npm': { + var child = require('child_process').execFile('C:\\Program Files\\nodejs\\node.exe', ['-v']); + child.stdout.str = ''; + child.stdout.on('data', function (chunk) { + sendConsoleText(chunk, sessionid); + //this.str += chunk.toString(); + }); + child.waitExit(); + response = 'Response: ' + child.stdout.str; + //exec('npm -v', function (error, stdout, stderr) { console.log('stdout: ', stdout); }); + break; + } + */ + /* case 'border': { if ((args['_'].length == 1) && (args['_'][0] == 'on')) { diff --git a/agents/meshcore.min.js b/agents/meshcore.min.js index 807bcbf7..f3398f24 100644 --- a/agents/meshcore.min.js +++ b/agents/meshcore.min.js @@ -1671,6 +1671,20 @@ function createMeshCore(agent) break; } /* + case 'npm': { + var child = require('child_process').execFile('C:\\Program Files\\nodejs\\node.exe', ['-v']); + child.stdout.str = ''; + child.stdout.on('data', function (chunk) { + sendConsoleText(chunk, sessionid); + //this.str += chunk.toString(); + }); + child.waitExit(); + response = 'Response: ' + child.stdout.str; + //exec('npm -v', function (error, stdout, stderr) { console.log('stdout: ', stdout); }); + break; + } + */ + /* case 'border': { if ((args['_'].length == 1) && (args['_'][0] == 'on')) { diff --git a/package.json b/package.json index 3743046a..a4242ed6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.4.0-o", + "version": "0.4.0-p", "keywords": [ "Remote Management", "Intel AMT", diff --git a/webserver.js b/webserver.js index 2b9320ca..6f038899 100644 --- a/webserver.js +++ b/webserver.js @@ -2267,7 +2267,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { } else { // Log to recording file data = Buffer.from(data, 'binary'); - recordingEntry(ws.logfile.fd, 2, 2, data, function () { try { ws.send(data); } catch (e) { } }); // TODO: Add TLS support + recordingEntry(ws.logfile.fd, 2, 0, data, function () { try { ws.send(data); } catch (e) { } }); // TODO: Add TLS support } } };