From e49fed413438b21468552c72d10294d56eefbcf5 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Fri, 31 Jan 2020 10:07:55 -0800 Subject: [PATCH] Fixed bug, where Admin Terminal on Windows was looking for wrong protocol number for Powershell. --- agents/meshcore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agents/meshcore.js b/agents/meshcore.js index ae9ce056..a0f03d8f 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -1161,7 +1161,7 @@ function createMeshCore(agent) { // this.httprequest._term = require('win-virtual-terminal')[this.httprequest.protocol == 6 ? 'StartPowerShell' : 'Start'](80, 25); // The above line is commented out, because there is a bug with ClosePseudoConsole() API, so this is the workaround - this.httprequest._dispatcher = require('win-dispatcher').dispatch({ modules: [{ name: 'win-virtual-terminal', script: getJSModule('win-virtual-terminal') }], launch: { module: 'win-virtual-terminal', method: (this.httprequest.protocol == 9 ? 'StartPowerShell' : 'Start'), args: [cols, rows] } }); + this.httprequest._dispatcher = require('win-dispatcher').dispatch({ modules: [{ name: 'win-virtual-terminal', script: getJSModule('win-virtual-terminal') }], launch: { module: 'win-virtual-terminal', method: (this.httprequest.protocol == 6 ? 'StartPowerShell' : 'Start'), args: [cols, rows] } }); this.httprequest._dispatcher.ws = this; this.httprequest._dispatcher.on('connection', function (c) {