diff --git a/MeshCentralServer.njsproj b/MeshCentralServer.njsproj index bc0ed0d2..3c3a5eb6 100644 --- a/MeshCentralServer.njsproj +++ b/MeshCentralServer.njsproj @@ -30,7 +30,11 @@ + + + + diff --git a/agents/MeshCmd-signed.exe b/agents/MeshCmd-signed.exe index 0d5f2650..7b686331 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 b6468787..0743fac3 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 103d78cc..f7d4cc02 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 29d70c75..2df24540 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 c24a7021..88fcb2e8 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 ea2043e7..413af407 100644 Binary files a/agents/MeshService64.exe and b/agents/MeshService64.exe differ diff --git a/agents/meshagent_arm b/agents/meshagent_arm index 87533ac6..6863b8c0 100644 Binary files a/agents/meshagent_arm and b/agents/meshagent_arm differ diff --git a/agents/meshagent_pi b/agents/meshagent_pi index 36db25a5..8a927a29 100644 Binary files a/agents/meshagent_pi and b/agents/meshagent_pi differ diff --git a/agents/meshagent_pogo b/agents/meshagent_pogo index fd8c29a6..cb7f8dad 100644 Binary files a/agents/meshagent_pogo and b/agents/meshagent_pogo differ diff --git a/agents/meshagent_poky b/agents/meshagent_poky index 75093f0b..693354ad 100644 Binary files a/agents/meshagent_poky and b/agents/meshagent_poky differ diff --git a/agents/meshagent_poky64 b/agents/meshagent_poky64 index d2c2e485..6cab1c74 100644 Binary files a/agents/meshagent_poky64 and b/agents/meshagent_poky64 differ diff --git a/agents/meshagent_x86 b/agents/meshagent_x86 index a5c8355f..03296033 100644 Binary files a/agents/meshagent_x86 and b/agents/meshagent_x86 differ diff --git a/agents/meshagent_x86-64 b/agents/meshagent_x86-64 index 7a96c6e7..7035ff23 100644 Binary files a/agents/meshagent_x86-64 and b/agents/meshagent_x86-64 differ diff --git a/agents/meshagent_x86-64_nokvm b/agents/meshagent_x86-64_nokvm index 79a29340..7407ee8e 100644 Binary files a/agents/meshagent_x86-64_nokvm and b/agents/meshagent_x86-64_nokvm differ diff --git a/agents/meshagent_x86_nokvm b/agents/meshagent_x86_nokvm index 903251cb..bf338adf 100644 Binary files a/agents/meshagent_x86_nokvm and b/agents/meshagent_x86_nokvm differ diff --git a/agents/meshcore.js b/agents/meshcore.js index 8dfd04a5..fd8cdeee 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -372,7 +372,7 @@ function createMeshCore(agent) { break; } case 'pskill': { - sendConsoleText(JSON.stringify(data)); + //sendConsoleText(JSON.stringify(data)); try { process.kill(data.value); } catch (e) { sendConsoleText(JSON.stringify(e)); } break; } @@ -856,8 +856,14 @@ function createMeshCore(agent) { break; } case 'toast': { - require('toaster').Toast('MeshCentral', args['_'][0]); - response = 'ok'; + if (process.platform == 'win32') { + if (args['_'].length < 1) { response = 'Proper usage: toast "message"'; } else { + require('toaster').Toast('MeshCentral', args['_'][0]); + response = 'ok'; + } + } else { + response = 'Only supported on Windows.'; + } break; } case 'setdebug': { diff --git a/agents/modules_meshcmd/amt-lme.js b/agents/modules_meshcmd/amt-lme.js index a7bb12ec..2e8a74de 100644 --- a/agents/modules_meshcmd/amt-lme.js +++ b/agents/modules_meshcmd/amt-lme.js @@ -266,7 +266,7 @@ function lme_heci(options) { this.sockets[rChannelId].bufferedStream.emit('readable'); } } else { - console.log('Unknown Recipient ID/' + rChannelId + ' for APF_CHANNEL_WINDOW_ADJUST'); + //console.log('Unknown Recipient ID/' + rChannelId + ' for APF_CHANNEL_WINDOW_ADJUST'); } break; case APF_CHANNEL_DATA: diff --git a/agents/modules_meshcmd/process-manager.js b/agents/modules_meshcmd/process-manager.js index d387b2be..47a7d58a 100644 --- a/agents/modules_meshcmd/process-manager.js +++ b/agents/modules_meshcmd/process-manager.js @@ -38,13 +38,13 @@ function processManager() { default: throw ('Enumerating processes on ' + process.platform + ' not supported'); case 'win32': - var retVal = []; + var retVal = {}; var h = this._kernel32.CreateToolhelp32Snapshot(2, 0); var info = GM.CreateVariable(304); info.toBuffer().writeUInt32LE(304, 0); var nextProcess = this._kernel32.Process32First(h, info); while (nextProcess.Val) { - retVal.push({ pid: info.Deref(8, 4).toBuffer().readUInt32LE(0), cmd: info.Deref(GM.PointerSize == 4 ? 36 : 44, 260).String }); + retVal[info.Deref(8, 4).toBuffer().readUInt32LE(0)] = { cmd: info.Deref(GM.PointerSize == 4 ? 36 : 44, 260).String }; nextProcess = this._kernel32.Process32Next(h, info); } if (callback) { callback.apply(this, [retVal]); } @@ -60,7 +60,7 @@ function processManager() { for (var i = 1; i < arguments.length; ++i) { p.args.push(arguments[i]); } p.on('exit', function onGetProcesses() { delete this.Parent._psp[this.pid]; - var retVal = [], lines = this.ps.split('\x0D\x0A'), key = {}, keyi = 0; + var retVal = {}, lines = this.ps.split('\x0D\x0A'), key = {}, keyi = 0; for (var i in lines) { var tokens = lines[i].split(' '); var tokenList = []; @@ -69,7 +69,7 @@ function processManager() { if (i > 0 && tokens[x]) { tokenList.push(tokens[x]); } } if ((i > 0) && (tokenList[key.PID])) { - retVal.push({ pid: tokenList[key.PID], user: tokenList[key.USER], cmd: tokenList[key.COMMAND] }); + retVal[tokenList[key.PID]] = { user: tokenList[key.USER], cmd: tokenList[key.COMMAND] }; } } if (this.callback) { diff --git a/agents/modules_meshcore/process-manager.js b/agents/modules_meshcore/process-manager.js index d387b2be..47a7d58a 100644 --- a/agents/modules_meshcore/process-manager.js +++ b/agents/modules_meshcore/process-manager.js @@ -38,13 +38,13 @@ function processManager() { default: throw ('Enumerating processes on ' + process.platform + ' not supported'); case 'win32': - var retVal = []; + var retVal = {}; var h = this._kernel32.CreateToolhelp32Snapshot(2, 0); var info = GM.CreateVariable(304); info.toBuffer().writeUInt32LE(304, 0); var nextProcess = this._kernel32.Process32First(h, info); while (nextProcess.Val) { - retVal.push({ pid: info.Deref(8, 4).toBuffer().readUInt32LE(0), cmd: info.Deref(GM.PointerSize == 4 ? 36 : 44, 260).String }); + retVal[info.Deref(8, 4).toBuffer().readUInt32LE(0)] = { cmd: info.Deref(GM.PointerSize == 4 ? 36 : 44, 260).String }; nextProcess = this._kernel32.Process32Next(h, info); } if (callback) { callback.apply(this, [retVal]); } @@ -60,7 +60,7 @@ function processManager() { for (var i = 1; i < arguments.length; ++i) { p.args.push(arguments[i]); } p.on('exit', function onGetProcesses() { delete this.Parent._psp[this.pid]; - var retVal = [], lines = this.ps.split('\x0D\x0A'), key = {}, keyi = 0; + var retVal = {}, lines = this.ps.split('\x0D\x0A'), key = {}, keyi = 0; for (var i in lines) { var tokens = lines[i].split(' '); var tokenList = []; @@ -69,7 +69,7 @@ function processManager() { if (i > 0 && tokens[x]) { tokenList.push(tokens[x]); } } if ((i > 0) && (tokenList[key.PID])) { - retVal.push({ pid: tokenList[key.PID], user: tokenList[key.USER], cmd: tokenList[key.COMMAND] }); + retVal[tokenList[key.PID]] = { user: tokenList[key.USER], cmd: tokenList[key.COMMAND] }; } } if (this.callback) { diff --git a/package.json b/package.json index df53fd60..e33bee64 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.1.6-v", + "version": "0.1.6-w", "keywords": [ "Remote Management", "Intel AMT", diff --git a/views/default.handlebars b/views/default.handlebars index fa127951..157cc408 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -3524,6 +3524,7 @@ if (Q('DeskTools').nodeid != message.nodeid) return; var p = [], processes = null; try { processes = JSON.parse(message.value); } catch (e) { } + console.log(processes); if (processes != null) { for (var pid in processes) { p.push( { p:parseInt(pid), c:processes[pid].cmd, d:processes[pid].cmd.toLowerCase(), u: processes[pid].user } ); } if (deskTools.sort == 0) { p.sort(sortProcessPid); } else if (deskTools.sort == 1) { p.sort(sortProcessName); }