mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 11:01:52 +00:00
Fixed custom meshcore upload feature.
This commit is contained in:
parent
40969d3612
commit
ce175203de
1 changed files with 1 additions and 2 deletions
|
@ -5731,8 +5731,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||||
} else if (coretype == 'custom') {
|
} else if (coretype == 'custom') {
|
||||||
agent.agentCoreCheck = 1000; // Tell the agent object we are using a custom core.
|
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
|
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.sendBinary(obj.common.ShortToStr(10) + obj.common.ShortToStr(0) + hash + coredata); // Send the code module to the agent
|
||||||
agent.send(obj.common.ShortToStr(10) + obj.common.ShortToStr(0) + hash + coredata); // Send the code module to the agent
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue