Fixed CIRA session recording issue.

Ylian Saint-Hilaire committed Sep 14, 2019 at 16:57 UTC 34c156b932d2d73f998b1be0a9bd789bd0629b13
4 files changed +30 -2
agents/meshcore.js
+14
@@ -1671,6 +1671,20 @@ function createMeshCore(agent)
1671 break;
1672 }
1673 /*
1674 + case 'npm': {
1675 + var child = require('child_process').execFile('C:\\Program Files\\nodejs\\node.exe', ['-v']);
1676 + child.stdout.str = '';
1677 + child.stdout.on('data', function (chunk) {
1678 + sendConsoleText(chunk, sessionid);
1679 + //this.str += chunk.toString();
1680 + });
1681 + child.waitExit();
1682 + response = 'Response: ' + child.stdout.str;
1683 + //exec('npm -v', function (error, stdout, stderr) { console.log('stdout: ', stdout); });
1684 + break;
1685 + }
1686 + */
1687 + /*
1688 case 'border':
1689 {
1690 if ((args['_'].length == 1) && (args['_'][0] == 'on')) {
agents/meshcore.min.js
+14
@@ -1671,6 +1671,20 @@ function createMeshCore(agent)
1671 break;
1672 }
1673 /*
1674 + case 'npm': {
1675 + var child = require('child_process').execFile('C:\\Program Files\\nodejs\\node.exe', ['-v']);
1676 + child.stdout.str = '';
1677 + child.stdout.on('data', function (chunk) {
1678 + sendConsoleText(chunk, sessionid);
1679 + //this.str += chunk.toString();
1680 + });
1681 + child.waitExit();
1682 + response = 'Response: ' + child.stdout.str;
1683 + //exec('npm -v', function (error, stdout, stderr) { console.log('stdout: ', stdout); });
1684 + break;
1685 + }
1686 + */
1687 + /*
1688 case 'border':
1689 {
1690 if ((args['_'].length == 1) && (args['_'][0] == 'on')) {
package.json
+1 -1
@@ -1,6 +1,6 @@
1 {
2 "name": "meshcentral",
3 - "version": "0.4.0-o",
3 + "version": "0.4.0-p",
4 "keywords": [
5 "Remote Management",
6 "Intel AMT",
webserver.js
+1 -1
@@ -2267,7 +2267,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
2267 } else {
2268 // Log to recording file
2269 data = Buffer.from(data, 'binary');
2270 - recordingEntry(ws.logfile.fd, 2, 2, data, function () { try { ws.send(data); } catch (e) { } }); // TODO: Add TLS support
2270 + recordingEntry(ws.logfile.fd, 2, 0, data, function () { try { ws.send(data); } catch (e) { } }); // TODO: Add TLS support
2271 }
2272 }
2273 };