mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-20 18:06:05 -05:00
add windows defender signature version
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
@@ -6047,13 +6047,10 @@ function sendPeriodicServerUpdate(flags, force) {
|
|||||||
} catch (ex) { }
|
} catch (ex) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get Defender for Windows Server
|
// Get Defender Information
|
||||||
try {
|
try {
|
||||||
var d = require('win-info').defender();
|
meshCoreObj.defender = require('win-info').defender();
|
||||||
d.then(function(res){
|
|
||||||
meshCoreObj.defender = res;
|
|
||||||
meshCoreObjChanged();
|
meshCoreObjChanged();
|
||||||
});
|
|
||||||
} catch (ex) { }
|
} catch (ex) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -241,24 +241,16 @@ function installedApps()
|
|||||||
}
|
}
|
||||||
|
|
||||||
function defender(){
|
function defender(){
|
||||||
var promise = require('promise');
|
|
||||||
var ret = new promise(function (a, r) { this._resolve = a; this._reject = r; });
|
|
||||||
ret.child = require('child_process').execFile(process.env['windir'] + '\\System32\\WindowsPowerShell\\v1.0\\powershell.exe', ['powershell', '-noprofile', '-nologo', '-command', '-'], {});
|
|
||||||
ret.child.promise = ret;
|
|
||||||
ret.child.stdout.str = ''; ret.child.stdout.on('data', function (c) { this.str += c.toString(); });
|
|
||||||
ret.child.stderr.str = ''; ret.child.stderr.on('data', function (c) { this.str += c.toString(); });
|
|
||||||
ret.child.stdin.write('Get-MpComputerStatus | Select-Object RealTimeProtectionEnabled,IsTamperProtected | ConvertTo-JSON\r\n');
|
|
||||||
ret.child.stdin.write('exit\r\n');
|
|
||||||
ret.child.on('exit', function (c) {
|
|
||||||
if (this.stdout.str == '') { this.promise._resolve({}); return; }
|
|
||||||
try {
|
try {
|
||||||
var abc = JSON.parse(this.stdout.str.trim());
|
var tokens = require('win-wmi').query('ROOT\\Microsoft\\Windows\\Defender', 'SELECT * FROM MSFT_MpComputerStatus', ['RealTimeProtectionEnabled','IsTamperProtected','AntivirusSignatureVersion','AntivirusSignatureLastUpdated']);
|
||||||
this.promise._resolve({ RealTimeProtection: abc.RealTimeProtectionEnabled, TamperProtected: abc.IsTamperProtected });
|
if (tokens[0]){
|
||||||
} catch (ex) {
|
return ({ RealTimeProtection: tokens[0].RealTimeProtectionEnabled, TamperProtected: tokens[0].IsTamperProtected, AntivirusSignatureVersion: tokens[0].AntivirusSignatureVersion, AntivirusSignatureLastUpdated: tokens[0].AntivirusSignatureLastUpdated });
|
||||||
this.promise._resolve({}); return;
|
} else {
|
||||||
|
return ({});
|
||||||
|
}
|
||||||
|
} catch (ex) {
|
||||||
|
return ({});
|
||||||
}
|
}
|
||||||
});
|
|
||||||
return (ret);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.platform == 'win32')
|
if (process.platform == 'win32')
|
||||||
|
|||||||
10410
translate/translate.json
10410
translate/translate.json
File diff suppressed because it is too large
Load Diff
@@ -6345,6 +6345,7 @@
|
|||||||
var y = [];
|
var y = [];
|
||||||
if (node.defender.RealTimeProtection != null) { if (node.defender.RealTimeProtection == true) { y.push("RealTimeProtection" + ' - <span style=color:green>' + "On" + '</span>'); } else { y.push("RealTimeProtection" + ' - <span style=color:red>' + "Off" + '</span>'); } }
|
if (node.defender.RealTimeProtection != null) { if (node.defender.RealTimeProtection == true) { y.push("RealTimeProtection" + ' - <span style=color:green>' + "On" + '</span>'); } else { y.push("RealTimeProtection" + ' - <span style=color:red>' + "Off" + '</span>'); } }
|
||||||
if (node.defender.TamperProtected != null) { if (node.defender.TamperProtected == true) { y.push("TamperProtection" + ' - <span style=color:green>' + "On" + '</span>'); } else { y.push("TamperProtection" + ' - <span style=color:red>' + "Off" + '</span>'); } }
|
if (node.defender.TamperProtected != null) { if (node.defender.TamperProtected == true) { y.push("TamperProtection" + ' - <span style=color:green>' + "On" + '</span>'); } else { y.push("TamperProtection" + ' - <span style=color:red>' + "Off" + '</span>'); } }
|
||||||
|
if (node.defender.AntivirusSignatureVersion != null) { y.push("SignatureVersion" + ' - <span style=color:green>' + EscapeHtml(node.defender.AntivirusSignatureVersion) + '</span>'); }
|
||||||
if (y.length > 0) x += addDetailItem("Windows Defender", y.join(', '));
|
if (y.length > 0) x += addDetailItem("Windows Defender", y.join(', '));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7689,6 +7689,7 @@
|
|||||||
var y = [];
|
var y = [];
|
||||||
if (node.defender.RealTimeProtection != null) { if (node.defender.RealTimeProtection == true) { y.push("RealTimeProtection" + ' - <span style=color:green>' + "On" + '</span>'); } else { y.push("RealTimeProtection" + ' - <span style=color:red>' + "Off" + '</span>'); } }
|
if (node.defender.RealTimeProtection != null) { if (node.defender.RealTimeProtection == true) { y.push("RealTimeProtection" + ' - <span style=color:green>' + "On" + '</span>'); } else { y.push("RealTimeProtection" + ' - <span style=color:red>' + "Off" + '</span>'); } }
|
||||||
if (node.defender.TamperProtected != null) { if (node.defender.TamperProtected == true) { y.push("TamperProtection" + ' - <span style=color:green>' + "On" + '</span>'); } else { y.push("TamperProtection" + ' - <span style=color:red>' + "Off" + '</span>'); } }
|
if (node.defender.TamperProtected != null) { if (node.defender.TamperProtected == true) { y.push("TamperProtection" + ' - <span style=color:green>' + "On" + '</span>'); } else { y.push("TamperProtection" + ' - <span style=color:red>' + "Off" + '</span>'); } }
|
||||||
|
if (node.defender.AntivirusSignatureVersion != null) { y.push("SignatureVersion" + ' - <span style=color:green>' + EscapeHtml(node.defender.AntivirusSignatureVersion) + '</span>'); }
|
||||||
if (y.length > 0) x += addDeviceAttribute("Windows Defender", y.join(', '));
|
if (y.length > 0) x += addDeviceAttribute("Windows Defender", y.join(', '));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8550,6 +8550,7 @@
|
|||||||
var y = [];
|
var y = [];
|
||||||
if (node.defender.RealTimeProtection != null) { if (node.defender.RealTimeProtection == true) { y.push("RealTimeProtection" + ' - <span style=color:green>' + "On" + '</span>'); } else { y.push("RealTimeProtection" + ' - <span style=color:red>' + "Off" + '</span>'); } }
|
if (node.defender.RealTimeProtection != null) { if (node.defender.RealTimeProtection == true) { y.push("RealTimeProtection" + ' - <span style=color:green>' + "On" + '</span>'); } else { y.push("RealTimeProtection" + ' - <span style=color:red>' + "Off" + '</span>'); } }
|
||||||
if (node.defender.TamperProtected != null) { if (node.defender.TamperProtected == true) { y.push("TamperProtection" + ' - <span style=color:green>' + "On" + '</span>'); } else { y.push("TamperProtection" + ' - <span style=color:red>' + "Off" + '</span>'); } }
|
if (node.defender.TamperProtected != null) { if (node.defender.TamperProtected == true) { y.push("TamperProtection" + ' - <span style=color:green>' + "On" + '</span>'); } else { y.push("TamperProtection" + ' - <span style=color:red>' + "Off" + '</span>'); } }
|
||||||
|
if (node.defender.AntivirusSignatureVersion != null) { y.push("SignatureVersion" + ' - <span style=color:green>' + EscapeHtml(node.defender.AntivirusSignatureVersion) + '</span>'); }
|
||||||
if (y.length > 0) x += addDeviceAttribute("Windows Defender", y.join(', '));
|
if (y.length > 0) x += addDeviceAttribute("Windows Defender", y.join(', '));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user