1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Added Windows ARM 64bit support.

This commit is contained in:
Ylian Saint-Hilaire 2023-04-14 13:36:34 -07:00
parent d9481c4537
commit 775568c7a7
7 changed files with 28 additions and 14 deletions

View file

@ -5417,20 +5417,27 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
var agentid = parseInt(req.query.meshcmd);
// If the agentid is 3 or 4, check if we have a signed MeshCmd.exe
if ((agentid == 3) && (obj.parent.meshAgentBinaries[11000] != null)) { // Signed Windows MeshCmd.exe x86
if ((agentid == 3) && (obj.parent.meshAgentBinaries[11000] != null)) { // Signed Windows MeshCmd.exe x86-32
var stats = null, meshCmdPath = obj.parent.meshAgentBinaries[11000].path;
try { stats = obj.fs.statSync(meshCmdPath); } catch (e) { }
if ((stats != null)) {
setContentDispositionHeader(res, 'application/octet-stream', 'meshcmd.exe', null, 'meshcmd');
res.sendFile(meshCmdPath); return;
}
} else if ((agentid == 4) && (obj.parent.meshAgentBinaries[11001] != null)) { // Signed Windows MeshCmd64.exe x64
} else if ((agentid == 4) && (obj.parent.meshAgentBinaries[11001] != null)) { // Signed Windows MeshCmd64.exe x86-64
var stats = null, meshCmd64Path = obj.parent.meshAgentBinaries[11001].path;
try { stats = obj.fs.statSync(meshCmd64Path); } catch (e) { }
if ((stats != null)) {
setContentDispositionHeader(res, 'application/octet-stream', 'meshcmd.exe', null, 'meshcmd');
res.sendFile(meshCmd64Path); return;
}
} else if ((agentid == 43) && (obj.parent.meshAgentBinaries[11002] != null)) { // Signed Windows MeshCmd64.exe ARM-64
var stats = null, meshCmdAMR64Path = obj.parent.meshAgentBinaries[11002].path;
try { stats = obj.fs.statSync(meshCmdAMR64Path); } catch (e) { }
if ((stats != null)) {
setContentDispositionHeader(res, 'application/octet-stream', 'meshcmd-arm64.exe', null, 'meshcmd');
res.sendFile(meshCmdAMR64Path); return;
}
}
// No signed agents, we are going to merge a new MeshCmd.