mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Minor security fixes.
This commit is contained in:
parent
66b9e3ddb8
commit
c880007cf2
26 changed files with 1290 additions and 1177 deletions
|
@ -1226,6 +1226,9 @@ function kvmCtrlData(channel, cmd) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// Unknown action, ignore it.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1293,6 +1296,9 @@ function processLmsControlData(data) {
|
|||
{ amtMei.closeUserInitiatedConnection(function (status, socket) { var data = Buffer.alloc(6); data.writeUInt16LE(7, 0); data.writeUInt32LE(status, 2); socket.write(data); }, this); break; }
|
||||
case 8: // Get Intel AMT CIRA State (CMD = 8)
|
||||
{ amtMei.getRemoteAccessConnectionStatus(function (state, socket) { var data = Buffer.alloc(6); data.writeUInt16LE(8, 0); data.writeUInt32LE(state.status, 2); socket.write(Buffer.concat([data, state.raw])); }, this); break; }
|
||||
default:
|
||||
// Unknown action, ignore it.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
agents/meshcmd.min.js
vendored
2
agents/meshcmd.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -462,6 +462,9 @@ function createMeshCore(agent) {
|
|||
if (data.url) { mesh.SendCommand({ "action": "msg", "type":"openUrl", "url": data.url, "sessionid": data.sessionid, "success": (openUserDesktopUrl(data.url) != null) }); }
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// Unknown action, ignore it.
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -499,6 +502,9 @@ function createMeshCore(agent) {
|
|||
if (data.url) { mesh.SendCommand({ "action": "openUrl", "url": data.url, "sessionid": data.sessionid, "success": (openUserDesktopUrl(data.url) != null) }); }
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// Unknown action, ignore it.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -888,6 +894,9 @@ function createMeshCore(agent) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// Unknown action, ignore it.
|
||||
break;
|
||||
}
|
||||
}
|
||||
//sendConsoleText("Got tunnel #" + this.httprequest.index + " data: " + data, this.httprequest.sessionid);
|
||||
|
@ -927,6 +936,9 @@ function createMeshCore(agent) {
|
|||
} catch (e) { }
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// Unknown action, ignore it.
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -1045,6 +1057,9 @@ function createMeshCore(agent) {
|
|||
case 'darwin':
|
||||
child = require('child_process').execFile('/usr/bin/open', ['open', url], { uid: require('user-sessions').consoleUid() });
|
||||
break;
|
||||
default:
|
||||
// Unknown platform, ignore this command.
|
||||
break;
|
||||
}
|
||||
} catch (ex) { }
|
||||
return child;
|
||||
|
@ -1605,6 +1620,7 @@ function createMeshCore(agent) {
|
|||
switch (amtMessage) {
|
||||
case 'iAMT0050': { if (amtMessageArg == '48') { notify = 'Intel® AMT Serial-over-LAN connected'; } else if (amtMessageArg == '49') { notify = 'Intel® AMT Serial-over-LAN disconnected'; } break; } // SOL
|
||||
case 'iAMT0052': { if (amtMessageArg == '1') { notify = 'Intel® AMT KVM connected'; } else if (amtMessageArg == '2') { notify = 'Intel® AMT KVM disconnected'; } break; } // KVM
|
||||
default: { break; }
|
||||
}
|
||||
|
||||
// Send to the entire mesh, no sessionid or userid specified.
|
||||
|
@ -1898,6 +1914,11 @@ function createMeshCore(agent) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
console.log('Invalid KVM command', cmd);
|
||||
sendConsoleText('Invalid KVM command: ' + cmd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
agents/meshcore.min.js
vendored
2
agents/meshcore.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -301,6 +301,9 @@ function serviceHost(serviceName)
|
|||
}
|
||||
process.exit();
|
||||
break;
|
||||
default:
|
||||
// Unknown arguments, skip it.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,9 @@ function parseServiceStatus(token)
|
|||
case 0x00000001:
|
||||
j.state = 'STOPPED';
|
||||
break;
|
||||
default:
|
||||
// Unknown service state
|
||||
break;
|
||||
}
|
||||
var controlsAccepted = token.Deref((2 * 4), 4).toBuffer().readUInt32LE();
|
||||
j.controlsAccepted = [];
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -46,6 +46,9 @@ function parseServiceStatus(token)
|
|||
case 0x00000001:
|
||||
j.state = 'STOPPED';
|
||||
break;
|
||||
default:
|
||||
// Unknown service status.
|
||||
break;
|
||||
}
|
||||
var controlsAccepted = token.Deref((2 * 4), 4).toBuffer().readUInt32LE();
|
||||
j.controlsAccepted = [];
|
||||
|
@ -316,7 +319,7 @@ function serviceManager()
|
|||
this._update.stdin.write('exit\n');
|
||||
|
||||
break;
|
||||
default: // unknown platform service type
|
||||
default: // Unknown platform service type
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -449,7 +452,7 @@ function serviceManager()
|
|||
this._update.stdin.write('systemctl disable ' + name + '.service\n');
|
||||
this._update.stdin.write('exit\n');
|
||||
break;
|
||||
default: // unknown platform service type
|
||||
default: // Unknown platform service type
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue