diff --git a/agents/MeshCmd-signed.exe b/agents/MeshCmd-signed.exe index 19601b6e..59695d94 100644 Binary files a/agents/MeshCmd-signed.exe and b/agents/MeshCmd-signed.exe differ diff --git a/agents/MeshCmd64-signed.exe b/agents/MeshCmd64-signed.exe index 76fbb380..b12c2d80 100644 Binary files a/agents/MeshCmd64-signed.exe and b/agents/MeshCmd64-signed.exe differ diff --git a/agents/MeshService-signed.exe b/agents/MeshService-signed.exe index 252291fd..3ffcd0d3 100644 Binary files a/agents/MeshService-signed.exe and b/agents/MeshService-signed.exe differ diff --git a/agents/MeshService.exe b/agents/MeshService.exe index c9389033..8f283914 100644 Binary files a/agents/MeshService.exe and b/agents/MeshService.exe differ diff --git a/agents/MeshService64-signed.exe b/agents/MeshService64-signed.exe index 23b0808a..9bc250b0 100644 Binary files a/agents/MeshService64-signed.exe and b/agents/MeshService64-signed.exe differ diff --git a/agents/MeshService64.exe b/agents/MeshService64.exe index 52dae3af..dd58964c 100644 Binary files a/agents/MeshService64.exe and b/agents/MeshService64.exe differ diff --git a/agents/meshcore.js b/agents/meshcore.js index eb907df1..f8ab8d2f 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -822,7 +822,6 @@ function createMeshCore(agent) sendConsoleText('getScript: ' + JSON.stringify(data)); break; } - /* case 'sysinfo': { // Fetch system information if (process.platform != 'win32') break; // Remove this when Linux/MacOS support this. @@ -838,6 +837,7 @@ function createMeshCore(agent) try { delete x.TotalVirtualMemorySize; } catch (ex) { } try { delete x.TotalVisibleMemorySize; } catch (ex) { } } + /* if (process.platform == 'win32') { var defragResult = function (r) @@ -862,13 +862,13 @@ function createMeshCore(agent) pr.sessionid = data.sessionid; pr.then(defragResult, defragResult); } else { + */ results.hash = require('SHA384Stream').create().syncHash(JSON.stringify(results)).toString('hex'); if (data.hash != results.hash) { mesh.SendCommand({ "action": "sysinfo", "sessionid": this.sessionid, "data": results }); } - } + //} } catch (ex) { } break; } - */ case 'ping': { mesh.SendCommand('{"action":"pong"}'); break; } case 'pong': { break; } default: @@ -1650,7 +1650,7 @@ function createMeshCore(agent) var response = null; switch (cmd) { case 'help': { // Displays available commands - response = 'Available commands: help, info, osinfo, args, print, type, dbget, dbset, dbcompact, eval, parseuri, httpget,\r\nwslist, wsconnect, wssend, wsclose, notify, ls, ps, kill, amt, netinfo, location, power, wakeonlan, scanwifi,\r\nscanamt, setdebug, smbios, rawsmbios, toast, lock, users, sendcaps, openurl, amtreset, amtccm, amtacm,\r\namtdeactivate, amtpolicy, getscript, getclip, setclip, log, av.'; // cpuinfo, sysinfo + response = 'Available commands: help, info, osinfo, args, print, type, dbget, dbset, dbcompact, eval, parseuri, httpget,\r\nwslist, wsconnect, wssend, wsclose, notify, ls, ps, kill, amt, netinfo, location, power, wakeonlan, scanwifi,\r\nscanamt, setdebug, smbios, rawsmbios, toast, lock, users, sendcaps, openurl, amtreset, amtccm, amtacm,\r\namtdeactivate, amtpolicy, getscript, getclip, setclip, log, av, cpuinfo, sysinfo.'; break; } /* @@ -1814,7 +1814,6 @@ function createMeshCore(agent) } break; } - /* case 'cpuinfo': { // Return system information // CPU & memory utilization pr = require('sysinfo').cpuUtilization(); @@ -1850,7 +1849,6 @@ function createMeshCore(agent) } break; } - */ case 'info': { // Return information about the agent and agent core module response = 'Current Core: ' + meshCoreObj.value + '.\r\nAgent Time: ' + Date() + '.\r\nUser Rights: 0x' + rights.toString(16) + '.\r\nPlatform: ' + process.platform + '.\r\nCapabilities: ' + meshCoreObj.caps + '.\r\nServer URL: ' + mesh.ServerUrl + '.'; if (amt != null) { response += '\r\nBuilt-in LMS: ' + ['Disabled', 'Connecting..', 'Connected'][amt.lmsstate] + '.'; } diff --git a/agents/meshcore.min.js b/agents/meshcore.min.js index eb907df1..f8ab8d2f 100644 --- a/agents/meshcore.min.js +++ b/agents/meshcore.min.js @@ -822,7 +822,6 @@ function createMeshCore(agent) sendConsoleText('getScript: ' + JSON.stringify(data)); break; } - /* case 'sysinfo': { // Fetch system information if (process.platform != 'win32') break; // Remove this when Linux/MacOS support this. @@ -838,6 +837,7 @@ function createMeshCore(agent) try { delete x.TotalVirtualMemorySize; } catch (ex) { } try { delete x.TotalVisibleMemorySize; } catch (ex) { } } + /* if (process.platform == 'win32') { var defragResult = function (r) @@ -862,13 +862,13 @@ function createMeshCore(agent) pr.sessionid = data.sessionid; pr.then(defragResult, defragResult); } else { + */ results.hash = require('SHA384Stream').create().syncHash(JSON.stringify(results)).toString('hex'); if (data.hash != results.hash) { mesh.SendCommand({ "action": "sysinfo", "sessionid": this.sessionid, "data": results }); } - } + //} } catch (ex) { } break; } - */ case 'ping': { mesh.SendCommand('{"action":"pong"}'); break; } case 'pong': { break; } default: @@ -1650,7 +1650,7 @@ function createMeshCore(agent) var response = null; switch (cmd) { case 'help': { // Displays available commands - response = 'Available commands: help, info, osinfo, args, print, type, dbget, dbset, dbcompact, eval, parseuri, httpget,\r\nwslist, wsconnect, wssend, wsclose, notify, ls, ps, kill, amt, netinfo, location, power, wakeonlan, scanwifi,\r\nscanamt, setdebug, smbios, rawsmbios, toast, lock, users, sendcaps, openurl, amtreset, amtccm, amtacm,\r\namtdeactivate, amtpolicy, getscript, getclip, setclip, log, av.'; // cpuinfo, sysinfo + response = 'Available commands: help, info, osinfo, args, print, type, dbget, dbset, dbcompact, eval, parseuri, httpget,\r\nwslist, wsconnect, wssend, wsclose, notify, ls, ps, kill, amt, netinfo, location, power, wakeonlan, scanwifi,\r\nscanamt, setdebug, smbios, rawsmbios, toast, lock, users, sendcaps, openurl, amtreset, amtccm, amtacm,\r\namtdeactivate, amtpolicy, getscript, getclip, setclip, log, av, cpuinfo, sysinfo.'; break; } /* @@ -1814,7 +1814,6 @@ function createMeshCore(agent) } break; } - /* case 'cpuinfo': { // Return system information // CPU & memory utilization pr = require('sysinfo').cpuUtilization(); @@ -1850,7 +1849,6 @@ function createMeshCore(agent) } break; } - */ case 'info': { // Return information about the agent and agent core module response = 'Current Core: ' + meshCoreObj.value + '.\r\nAgent Time: ' + Date() + '.\r\nUser Rights: 0x' + rights.toString(16) + '.\r\nPlatform: ' + process.platform + '.\r\nCapabilities: ' + meshCoreObj.caps + '.\r\nServer URL: ' + mesh.ServerUrl + '.'; if (amt != null) { response += '\r\nBuilt-in LMS: ' + ['Disabled', 'Connecting..', 'Connected'][amt.lmsstate] + '.'; } diff --git a/meshagent.js b/meshagent.js index baf10701..86b4c314 100644 --- a/meshagent.js +++ b/meshagent.js @@ -910,8 +910,8 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) { try { obj.send(JSON.stringify({ action: 'amtPolicy', amtPolicy: completeIntelAmtPolicy(common.Clone(mesh.amt)) })); } catch (ex) { } } - // Fetch system information /* + // Fetch system information db.GetHash('si' + obj.dbNodeKey, function (err, results) { if ((results != null) && (results.length == 1)) { obj.send(JSON.stringify({ action: 'sysinfo', hash: results[0].hash })); } else { obj.send(JSON.stringify({ action: 'sysinfo' })); } }); @@ -1306,9 +1306,8 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) { } break; } - /* case 'sysinfo': { - //console.log('sysinfo', obj.nodeid, JSON.stringify(command.data.hash)); + console.log('sysinfo', obj.nodeid, JSON.stringify(command.data.hash)); command.data._id = 'si' + obj.dbNodeKey; db.Set(command.data); // Update system information in the database. break; @@ -1320,7 +1319,6 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) { }); break; } - */ default: { parent.agentStats.unknownAgentActionCount++; console.log('Unknown agent action (' + obj.remoteaddrport + '): ' + command.action + '.');