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

Intel AMT password discovery added to amtactivation.log.

This commit is contained in:
Ylian Saint-Hilaire 2021-04-05 14:55:52 -07:00
parent 3f6856cedc
commit a32081d7d3
2 changed files with 11 additions and 4 deletions

View file

@ -2700,14 +2700,16 @@ function CreateMeshCentralServer(config, args) {
if (amtPasswords[j.amtUuid] == null) {
amtPasswords[j.amtUuid] = [j.password]; // Add password to array
} else {
if (amtPasswords[j.amtUuid].indexOf(j.password) == -1) {
amtPasswords[j.amtUuid].unshift(j.password); // Add password at the start of the array
while (amtPasswords[j.amtUuid].length > 3) { amtPasswords[j.amtUuid].pop(); } // Only keep the 3 last passwords for any given device
}
amtPasswords[j.amtUuid].unshift(j.password); // Add password at the start of the array
}
}
}
}
// Remove all duplicates and only keep the 3 last passwords for any given device
for (var i in amtPasswords) {
amtPasswords[i] = [...new Set(amtPasswords[i])];
while (amtPasswords[i].length > 3) { amtPasswords[i].pop(); }
}
}
func(obj.common.sortObj(amtPasswords)); // Sort by UUID
});