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

Added support for temporary agents

This commit is contained in:
Ylian Saint-Hilaire 2018-04-12 11:15:01 -07:00
parent fb55e44edf
commit bcb7100ced
15 changed files with 73 additions and 44 deletions

View file

@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
var MemoryStream = require('MemoryStream');
var lme_id = 0; // Our next channel identifier
var lme_port_offset = 0; // Debug: Set this to "-100" to bind to 16892 & 16893 and IN_ADDRANY. This is for LMS debugging.
@ -37,7 +38,6 @@ var APF_CHANNEL_DATA = 94;
var APF_CHANNEL_CLOSE = 97;
var APF_PROTOCOLVERSION = 192;
function lme_object() {
this.ourId = ++lme_id;
this.amtId = -1;
@ -379,16 +379,14 @@ function lme_heci(options) {
buffer.writeUInt32BE(0xFFFFFFFF, 13); // Reserved
this.write(buffer);
/*
var buffer = Buffer.alloc(17);
buffer.writeUInt8(APF_CHANNEL_OPEN_FAILURE, 0);
buffer.writeUInt32BE(channelSender, 1); // Intel AMT sender channel
buffer.writeUInt32BE(2, 5); // Reason code
buffer.writeUInt32BE(0, 9); // Reserved
buffer.writeUInt32BE(0, 13); // Reserved
this.write(buffer);
console.log('Sent APF_CHANNEL_OPEN_FAILURE', channelSender);
*/
//var buffer = Buffer.alloc(17);
//buffer.writeUInt8(APF_CHANNEL_OPEN_FAILURE, 0);
//buffer.writeUInt32BE(channelSender, 1); // Intel AMT sender channel
//buffer.writeUInt32BE(2, 5); // Reason code
//buffer.writeUInt32BE(0, 9); // Reserved
//buffer.writeUInt32BE(0, 13); // Reserved
//this.write(buffer);
//console.log('Sent APF_CHANNEL_OPEN_FAILURE', channelSender);
break;
}

View file

@ -103,7 +103,7 @@ function _PutObjToBodyXml(resuri, putObj) {
}
// This is a drop-in replacement to _turnToXml() that works without xml parser dependency.
Object.defineProperty(Array.prototype, "peek", { value: function () { return (this.length > 0 ? this[this.length - 1] : null); } });
try { Object.defineProperty(Array.prototype, "peek", { value: function () { return (this.length > 0 ? this[this.length - 1] : null); } }); } catch (ex) { }
function _treeBuilder() {
this.tree = [];
this.push = function (element) { this.tree.push(element); };