From 8edf312298ad74aa01168b80d1915beccfd43473 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Thu, 28 Nov 2019 12:34:45 -0800 Subject: [PATCH] Enabled all next-gen agent features in the server. --- agents/meshcore.js | 18 +++++++++--------- agents/meshcore.min.js | 18 +++++++++--------- views/default-min.handlebars | 18 ++++++++++++------ views/default.handlebars | 8 ++++---- views/translations/default-min_fr.handlebars | 18 ++++++++++++------ views/translations/default_fr.handlebars | 19 +++++++++++++------ 6 files changed, 59 insertions(+), 40 deletions(-) diff --git a/agents/meshcore.js b/agents/meshcore.js index 6193a6b7..67d1227a 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -366,7 +366,7 @@ function createMeshCore(agent) { // If SMBios tables say that Intel AMT is present, try to connect MEI if (SMBiosTables.amtInfo && (SMBiosTables.amtInfo.AMT == true)) { var amtmodule = require('amt-manage'); - amt = new amtmodule(mesh, db, true); + amt = new amtmodule(mesh, db, false); amt.onStateChange = function (state) { if (state == 2) { sendPeriodicServerUpdate(1); } } if (amtPolicy != null) { amt.setPolicy(amtPolicy); } amt.start(); @@ -1110,17 +1110,17 @@ function createMeshCore(agent) { try { if (((this.httprequest.protocol == 6) || (this.httprequest.protocol == 8)) && (require('win-terminal').PowerShellCapable() == true)) { - //if (require('win-virtual-terminal').supported) { - //this.httprequest._term = require('win-virtual-terminal').StartPowerShell(80, 25); // TODO: Start as logged in used when protocol is 8 - //} else { + if (require('win-virtual-terminal').supported) { + this.httprequest._term = require('win-virtual-terminal').StartPowerShell(80, 25); // TODO: Start as logged in used when protocol is 8 + } else { this.httprequest._term = require('win-terminal').StartPowerShell(80, 25); // TODO: Start as logged in used when protocol is 8 - //} + } } else { - //if (require('win-virtual-terminal').supported) { - //this.httprequest._term = require('win-virtual-terminal').Start(80, 25); // TODO: Start as logged in used when protocol is 8 - //} else { + if (require('win-virtual-terminal').supported) { + this.httprequest._term = require('win-virtual-terminal').Start(80, 25); // TODO: Start as logged in used when protocol is 8 + } else { this.httprequest._term = require('win-terminal').Start(80, 25); // TODO: Start as logged in used when protocol is 8 - //} + } } } catch (e) { MeshServerLog('Failed to start remote terminal session, ' + e.toString() + ' (' + this.httprequest.remoteaddr + ')', this.httprequest); diff --git a/agents/meshcore.min.js b/agents/meshcore.min.js index 6193a6b7..67d1227a 100644 --- a/agents/meshcore.min.js +++ b/agents/meshcore.min.js @@ -366,7 +366,7 @@ function createMeshCore(agent) { // If SMBios tables say that Intel AMT is present, try to connect MEI if (SMBiosTables.amtInfo && (SMBiosTables.amtInfo.AMT == true)) { var amtmodule = require('amt-manage'); - amt = new amtmodule(mesh, db, true); + amt = new amtmodule(mesh, db, false); amt.onStateChange = function (state) { if (state == 2) { sendPeriodicServerUpdate(1); } } if (amtPolicy != null) { amt.setPolicy(amtPolicy); } amt.start(); @@ -1110,17 +1110,17 @@ function createMeshCore(agent) { try { if (((this.httprequest.protocol == 6) || (this.httprequest.protocol == 8)) && (require('win-terminal').PowerShellCapable() == true)) { - //if (require('win-virtual-terminal').supported) { - //this.httprequest._term = require('win-virtual-terminal').StartPowerShell(80, 25); // TODO: Start as logged in used when protocol is 8 - //} else { + if (require('win-virtual-terminal').supported) { + this.httprequest._term = require('win-virtual-terminal').StartPowerShell(80, 25); // TODO: Start as logged in used when protocol is 8 + } else { this.httprequest._term = require('win-terminal').StartPowerShell(80, 25); // TODO: Start as logged in used when protocol is 8 - //} + } } else { - //if (require('win-virtual-terminal').supported) { - //this.httprequest._term = require('win-virtual-terminal').Start(80, 25); // TODO: Start as logged in used when protocol is 8 - //} else { + if (require('win-virtual-terminal').supported) { + this.httprequest._term = require('win-virtual-terminal').Start(80, 25); // TODO: Start as logged in used when protocol is 8 + } else { this.httprequest._term = require('win-terminal').Start(80, 25); // TODO: Start as logged in used when protocol is 8 - //} + } } } catch (e) { MeshServerLog('Failed to start remote terminal session, ' + e.toString() + ' (' + this.httprequest.remoteaddr + ')', this.httprequest); diff --git a/views/default-min.handlebars b/views/default-min.handlebars index 16766df4..f4bbf755 100644 --- a/views/default-min.handlebars +++ b/views/default-min.handlebars @@ -1,4 +1,4 @@ -{{{title}}}
{{{title}}}
{{{title2}}}

{{{logoutControl}}}

 

{{{title}}}
{{{title}}}
{{{title2}}}

{{{logoutControl}}}

 

{{{title}}}
{{{title}}}
{{{title2}}}

{{{logoutControl}}}

 

{{{title}}}
{{{title}}}
{{{title2}}}

{{{logoutControl}}}