1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Fixed AV status on Windows Server, started work on session recording

This commit is contained in:
Ylian Saint-Hilaire 2019-08-05 11:30:07 -07:00
parent bf0fc6d7dc
commit 14030260fe
9 changed files with 61 additions and 20 deletions

View file

@ -2241,8 +2241,8 @@ function createMeshCore(agent)
if ((flags & 4) && (process.platform == 'win32')) {
// Update anti-virus information
var av = [];
//try { av = require('win-info').av(); } catch (ex) { av = [ { product: 'Error', updated: false, enabled: false } ]; }
var av;
try { av = require('win-info').av(); } catch (ex) { av = []; }
if ((meshCoreObj.av == null) || (JSON.stringify(meshCoreObj.av) != JSON.stringify(av))) { meshCoreObj.av = av; mesh.SendCommand(meshCoreObj); }
}
}

View file

@ -2241,8 +2241,8 @@ function createMeshCore(agent)
if ((flags & 4) && (process.platform == 'win32')) {
// Update anti-virus information
var av = [];
//try { av = require('win-info').av(); } catch (ex) { av = [ { product: 'Error', updated: false, enabled: false } ]; }
var av;
try { av = require('win-info').av(); } catch (ex) { av = []; }
if ((meshCoreObj.av == null) || (JSON.stringify(meshCoreObj.av) != JSON.stringify(av))) { meshCoreObj.av = av; mesh.SendCommand(meshCoreObj); }
}
}

View file

@ -20,6 +20,7 @@ function qfe()
{
var child = require('child_process').execFile(process.env['windir'] + '\\System32\\wbem\\wmic.exe', ['wmic', 'qfe', 'list', 'full', '/FORMAT:CSV']);
child.stdout.str = ''; child.stdout.on('data', function (c) { this.str += c.toString(); });
child.stderr.str = ''; child.stderr.on('data', function (c) { this.str += c.toString(); });
child.waitExit();
var lines = child.stdout.str.trim().split('\r\n');
@ -44,6 +45,7 @@ function av()
{
var child = require('child_process').execFile(process.env['windir'] + '\\System32\\wbem\\wmic.exe', ['wmic', '/Namespace:\\\\root\\SecurityCenter2', 'Path', 'AntiVirusProduct', 'get', '/FORMAT:CSV']);
child.stdout.str = ''; child.stdout.on('data', function (c) { this.str += c.toString(); });
child.stderr.str = ''; child.stderr.on('data', function (c) { this.str += c.toString(); })
child.waitExit();
var lines = child.stdout.str.trim().split('\r\n');

File diff suppressed because one or more lines are too long