1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-14 15:23:39 +00:00

1. Updated authenticode parser to check for empty string

2. Updated _agentStatus to support custom IPC
This commit is contained in:
Bryan Roe
2022-02-08 13:28:24 -08:00
parent d821d53f19
commit a040047e01
3 changed files with 9 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@@ -30,13 +30,13 @@ function dataHandler(chunk)
}
if ((len + 4) < chunk.length) { this.unshift(chunk.slice(4 + len)); }
}
function queryAgent(obj, prev)
function queryAgent(obj, prev, path)
{
var ret = new promise(function (res, rej) { this._res = res; this._rej = rej; });
ret._obj = { cmd: 'query', value: obj };
if (prev == null)
{
ret.client = require('net').createConnection({ path: ipcPath });
ret.client = require('net').createConnection({ path: path == null ? ipcPath : path });
ret.client.on('connect', function ()
{
this.on('data', dataHandler);
@@ -95,4 +95,4 @@ function start()
}).then(function (v) { console.log(v); }).then(function () { process._exit(); }).catch(function () { process._exit(); });
}
module.exports = { start: start };
module.exports = { start: start, query: queryAgent };

View File

@@ -105,10 +105,13 @@ function locked(uri)
{
var tokens = q.pop().split('=');
if (tokens[0].trim().toLowerCase() == 'serverid')
{
if (f.host != null && f.host != '' && tokens[1] != null && tokens[1] != '')
{
return ({ dns: f.host, id: tokens[1] });
}
}
}
return (null);
}
function checkMSH()