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

AMT Manager improvements.

This commit is contained in:
Ylian Saint-Hilaire 2021-02-22 14:41:54 -08:00
parent b7117641a0
commit 5298d1c5c9
6 changed files with 48 additions and 26 deletions

View file

@ -167,7 +167,7 @@ module.exports.CreateAmtScanner = function (parent) {
const ciraConnections = obj.parent.mpsserver ? obj.parent.mpsserver.GetConnectionToNode(doc._id, null, true) : null; // See if any OOB connections are present
if ((host != '127.0.0.1') && (host != '::1') && (host.toLowerCase() != 'localhost') && (ciraConnections == null)) {
var scaninfo = obj.scanTable[doc._id];
if (scaninfo == undefined) {
if (scaninfo == null) {
var tag = obj.nextTag++;
obj.scanTableTags[tag] = obj.scanTable[doc._id] = scaninfo = { nodeinfo: doc, present: true, tag: tag, state: 0 };
//console.log('Scan ' + host + ', state=' + scaninfo.state + ', delta=' + delta);
@ -212,6 +212,17 @@ module.exports.CreateAmtScanner = function (parent) {
return true;
};
// Look for all Intel AMT computers that may be locally reachable and poll their presence
obj.performSpecificScan = function (node) {
var host = node.host.toLowerCase();
const ciraConnections = obj.parent.mpsserver ? obj.parent.mpsserver.GetConnectionToNode(node._id, null, true) : null; // See if any OOB connections are present
if ((host != '127.0.0.1') && (host != '::1') && (host.toLowerCase() != 'localhost') && (ciraConnections == null)) {
obj.checkTcpPresence(host, (node.intelamt.tls == 1) ? 16993 : 16992, { nodeinfo: node }, function (tag, result, version) {
if ((result == true) && (obj.parent.amtManager != null)) { obj.parent.amtManager.startAmtManagement(tag.nodeinfo._id, 3, tag.nodeinfo.host); }
});
}
};
// Check the presense of a specific Intel AMT computer using RMCP
obj.checkAmtPresence = function (host, tag) { obj.ResolveName(host, function (hostname, ip) { obj.checkAmtPresenceEx(ip, tag); }); };