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

Added workaround if MeshCentral can't sign the agents, #4069

This commit is contained in:
Ylian Saint-Hilaire 2022-06-01 16:29:18 -07:00
parent 7dd125286d
commit 43bbabc00c
2 changed files with 14 additions and 6 deletions

View file

@ -505,7 +505,9 @@ function createAuthenticodeHandler(path) {
//console.log('Signature', Buffer.from(p7signature, 'binary').toString('base64'));
// Open the output file
var output = fs.openSync(args.out, 'w');
var output = null;
try { output = fs.openSync(args.out, 'w'); } catch (ex) { }
if (output == null) return false;
var tmp, written = 0;
var executableSize = obj.header.sigpos ? obj.header.sigpos : this.filesize;
@ -544,6 +546,7 @@ function createAuthenticodeHandler(path) {
// Close the file
fs.closeSync(output);
return true;
}
// Save an executable without the signature