Fixed CIRA session recording issue.

This commit is contained in:
Ylian Saint-Hilaire 2019-09-14 16:57:54 -07:00
parent 12ea6f7b3a
commit 34c156b932
4 changed files with 30 additions and 2 deletions

View File

@ -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')) {

View File

@ -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')) {

View File

@ -1,6 +1,6 @@
{
"name": "meshcentral",
"version": "0.4.0-o",
"version": "0.4.0-p",
"keywords": [
"Remote Management",
"Intel AMT",

View File

@ -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
}
}
};