mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-09 05:34:54 -05:00
All use SHA384/RSA3072 mesh agents
This commit is contained in:
@@ -520,6 +520,8 @@ function createMeshCore(agent) {
|
||||
var cmd = null;
|
||||
try { cmd = JSON.parse(data); } catch (e) { };
|
||||
if ((cmd == null) || (cmd.action == undefined)) { return; }
|
||||
if ((cmd.path != null) && (process.platform != 'win32') && (cmd.path[0] != '/')) { cmd.path = '/' + cmd.path; } // Add '/' to paths on non-windows
|
||||
sendConsoleText(JSON.stringify(cmd));
|
||||
//console.log(objToString(cmd, 0, '.'));
|
||||
switch (cmd.action) {
|
||||
case 'ls': {
|
||||
@@ -532,7 +534,9 @@ function createMeshCore(agent) {
|
||||
}
|
||||
|
||||
// Send the folder content to the browser
|
||||
sendConsoleText(JSON.stringify(cmd.path));
|
||||
var response = getDirectoryInfo(cmd.path);
|
||||
sendConsoleText(JSON.stringify(response));
|
||||
if (cmd.reqid != undefined) { response.reqid = cmd.reqid; }
|
||||
this.write(JSON.stringify(response));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user