diff --git a/agents/MeshCentralAssistant.exe b/agents/MeshCentralAssistant.exe index a56708cd..96555b80 100644 Binary files a/agents/MeshCentralAssistant.exe and b/agents/MeshCentralAssistant.exe differ diff --git a/agents/meshcore.js b/agents/meshcore.js index f4e04da5..32c49782 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -924,25 +924,30 @@ function handleServerCommand(data) { // Requestion details information about a process if (data.pid) { var info = {}; // TODO: Replace with real data. Feel free not to give all values if not available. + /* + info.processUser = "User"; // String + info.processDomain = "Domain"; // String + info.cmd = "abc"; // String info.processName = "dummydata"; - info.privateMemorySize = 123; - info.virtualMemorySize = 123; - info.workingSet = 123; + info.privateMemorySize = 123; // Bytes + info.virtualMemorySize = 123; // Bytes + info.workingSet = 123; // Bytes info.totalProcessorTime = 123; // Seconds info.userProcessorTime = 123; // Seconds info.startTime = "2012-12-30T23:59:59.000Z"; // Time in UTC ISO format - info.sessionId = 123; + info.sessionId = 123; // Number info.privilegedProcessorTime = 123; // Seconds - info.PriorityBoostEnabled = true; - info.peakWorkingSet = 123; - info.peakVirtualMemorySize = 123; - info.peakPagedMemorySize = 123; - info.pagedSystemMemorySize = 123; - info.pagedMemorySize = 123; - info.nonpagedSystemMemorySize = 123; - info.mainWindowTitle = "dummydata"; + info.PriorityBoostEnabled = true; // Boolean + info.peakWorkingSet = 123; // Bytes + info.peakVirtualMemorySize = 123; // Bytes + info.peakPagedMemorySize = 123; // Bytes + info.pagedSystemMemorySize = 123; // Bytes + info.pagedMemorySize = 123; // Bytes + info.nonpagedSystemMemorySize = 123; // Bytes + info.mainWindowTitle = "dummydata"; // String info.machineName = "dummydata"; // Only set this if machine name is not "." - info.handleCount = 123; + info.handleCount = 123; // Number + */ mesh.SendCommand({ action: 'msg', type: 'psinfo', pid: data.pid, sessionid: data.sessionid, value: info }); } break; diff --git a/views/default.handlebars b/views/default.handlebars index a7647243..6ff8430d 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -2345,7 +2345,36 @@ } } else if (message.type == 'psinfo') { if (xxdialogTag == ('ps|' + message.nodeid + '|' + message.pid)) { - console.log('aa', message); + var x = '
'; + //x += addHtmlValue4("Process ID", message.pid); + if ((typeof message.value == 'object') && (Object.keys(message.value).length > 0)) { + if (message.value.processName) { x += '
' + "Process Name" + '
' + message.value.processName + '
'; } + if (message.value.machineName) { x += addHtmlValue5("Machine Name", message.value.machineName); } + if (message.value.cmd) { x += '
' + "Command Line" + '
' + message.value.cmd + '
'; } + if (message.value.mainWindowTitle) { x += '
' + "Window Title" + '
' + message.value.mainWindowTitle + '
'; } + if (message.value.processUser) { x += addHtmlValue5("User", message.value.processUser); } + if (message.value.processDomain) { x += addHtmlValue5("Domain", message.value.processDomain); } + if (message.value.startTime) { x += addHtmlValue5("Start Time", message.value.startTime); } + x += '
'; + if (message.value.PriorityBoostEnabled) { x += addHtmlValue5("Priority Boost", message.value.PriorityBoostEnabled?"Enabled":"Disabled"); } + if (message.value.sessionId) { x += addHtmlValue5("Session Id", message.value.sessionId); } + if (message.value.handleCount) { x += addHtmlValue5("Handle Count", message.value.handleCount); } + if (message.value.privilegedProcessorTime) { x += addHtmlValue5("Privileged Processor Time", format("{0} seconds", message.value.privilegedProcessorTime)); } + if (message.value.totalProcessorTime) { x += addHtmlValue5("Total Processor Time", format("{0} seconds", message.value.totalProcessorTime)); } + if (message.value.userProcessorTime) { x += addHtmlValue5("User Processor Time", format("{0} seconds", message.value.userProcessorTime)); } + if (message.value.nonpagedSystemMemorySize) { x += addHtmlValue5("Non Paged Memory", getNiceSize2(message.value.nonpagedSystemMemorySize)); } + if (message.value.pagedMemorySize) { x += addHtmlValue5("Paged Memory", getNiceSize2(message.value.pagedMemorySize)); } + if (message.value.privateMemorySize) { x += addHtmlValue5("Private Memory", getNiceSize2(message.value.privateMemorySize)); } + if (message.value.virtualMemorySize) { x += addHtmlValue5("Virtual Memory", getNiceSize2(message.value.virtualMemorySize)); } + if (message.value.workingSet) { x += addHtmlValue5("Working Set", getNiceSize2(message.value.workingSet)); } + if (message.value.peakWorkingSet) { x += addHtmlValue5("Peak Working Set", getNiceSize2(message.value.peakWorkingSet)); } + if (message.value.peakPagedMemorySize) { x += addHtmlValue5("Peak Paged Memory", getNiceSize2(message.value.peakPagedMemorySize)); } + if (message.value.peakVirtualMemorySize) { x += addHtmlValue5("Peak Virtual Memory", getNiceSize2(message.value.peakVirtualMemorySize)); } + } else { + x += "No information provided"; + } + x += '
'; + QH('id_dialogOptions', x); } } } @@ -15587,6 +15616,7 @@ function addHtmlValue2(t, v) { return '
' + v + '
' + t + '
'; } function addHtmlValue3(t, v) { return '
' + t + '
' + v + '
'; } function addHtmlValue4(t, v) { return '
' + t + '' + v + '
'; } + function addHtmlValue5(t, v) { return '
' + v + '
' + t + '
'; } function focusTextBox(x) { setTimeout(function(){ Q(x).selectionStart = Q(x).selectionEnd = 65535; Q(x).focus(); }, 0); } function validateEmail(v) { var emailReg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return emailReg.test(v); } // New version function isPrivateIP(a) { return (a.startsWith('10.') || a.startsWith('172.16.') || a.startsWith('192.168.')); }