1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-18 01:03:14 +00:00

First commit of MeshAgent for MeshCentral

This commit is contained in:
Ylian Saint-Hilaire
2017-10-12 14:28:03 -07:00
commit 75d86eb4c8
349 changed files with 210459 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
var nm = require('NetworkMonitor');
nm.on('change', function () { console.log("Change detected..."); });
nm.on('add', function (addr) { console.log("Address (" + addr + ") added"); });
nm.on('remove', function (addr) { console.log("Address (" + addr + ") removed"); });
console.log("Started Test");
function OnChange()
{
var interfaces = require('os').networkInterfaces();
for(var key in interfaces)
{
for (var i in interfaces[key])
{
console.log("Address ==> " + interfaces[key][i].address);
console.log(" status ==> " + interfaces[key][i].status);
}
}
}