mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-09-11 08:55:32 +03:00
Fixed custom meshcore upload feature.
This commit is contained in:
parent
40969d3612
commit
ce175203de
@ -5731,8 +5731,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||
} else if (coretype == 'custom') {
|
||||
agent.agentCoreCheck = 1000; // Tell the agent object we are using a custom core.
|
||||
const hash = obj.crypto.createHash('sha384').update(Buffer.from(coredata, 'binary')).digest().toString('binary'); // Perform a SHA384 hash on the core module
|
||||
//console.log('Sending custome core to agent, ' + coredata.length + ' bytes.');
|
||||
agent.send(obj.common.ShortToStr(10) + obj.common.ShortToStr(0) + hash + coredata); // Send the code module to the agent
|
||||
agent.sendBinary(obj.common.ShortToStr(10) + obj.common.ShortToStr(0) + hash + coredata); // Send the code module to the agent
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user