From fd8a3c79a0c71f27d46089779cbc9c35b8299717 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 13 Aug 2019 13:55:25 -0700 Subject: [PATCH] Server connection fix. --- MeshCentralServer.njsproj | 2 + meshagent.js | 4 +- package.json | 2 +- public/player.htm | 41 +- views/default-old.handlebars | 8433 ---------------------------------- 5 files changed, 43 insertions(+), 8439 deletions(-) delete mode 100644 views/default-old.handlebars diff --git a/MeshCentralServer.njsproj b/MeshCentralServer.njsproj index a13f4527..b1c1caec 100644 --- a/MeshCentralServer.njsproj +++ b/MeshCentralServer.njsproj @@ -267,6 +267,8 @@ + + diff --git a/meshagent.js b/meshagent.js index 9a452e95..ab1fa1bb 100644 --- a/meshagent.js +++ b/meshagent.js @@ -389,13 +389,13 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) { // Perform the hash signature using older swarm server certificate parent.parent.certificateOperations.acceleratorPerformSignature(1, msg.substring(2) + obj.nonce, null, function (tag, signature) { // Send back our certificate + signature - obj2.sendBinary(common.ShortToStr(2) + common.ShortToStr(parent.swarmCertificateAsn1.length) + parent.swarmCertificateAsn1 + signature); // Command 2, certificate + signature + obj.sendBinary(common.ShortToStr(2) + common.ShortToStr(parent.swarmCertificateAsn1.length) + parent.swarmCertificateAsn1 + signature); // Command 2, certificate + signature }); } else { // Perform the hash signature using the server agent certificate parent.parent.certificateOperations.acceleratorPerformSignature(0, msg.substring(2) + obj.nonce, null, function (tag, signature) { // Send back our certificate + signature - obj2.sendBinary(common.ShortToStr(2) + common.ShortToStr(parent.agentCertificateAsn1.length) + parent.agentCertificateAsn1 + signature); // Command 2, certificate + signature + obj.sendBinary(common.ShortToStr(2) + common.ShortToStr(parent.agentCertificateAsn1.length) + parent.agentCertificateAsn1 + signature); // Command 2, certificate + signature }); } } diff --git a/package.json b/package.json index c201e3c0..699a58e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.3.9-r", + "version": "0.3.9-s", "keywords": [ "Remote Management", "Intel AMT", diff --git a/public/player.htm b/public/player.htm index 751a115c..9a250666 100644 --- a/public/player.htm +++ b/public/player.htm @@ -10,6 +10,7 @@ + @@ -30,13 +31,16 @@
-
+
+
+

+                
@@ -176,7 +180,21 @@ else if (p == 101) { p = 'Intel® AMT Redirection'; } x += addInfoNoEsc('Protocol', p); } - if (recFileMetadata.protocol == 2) { + console.log('desk'); + QV('DeskParent', true); + QV('TermParent', false); + if (recFileMetadata.protocol == 1) { + // MeshCentral remote terminal + recFileProtocol = 1; + x += '

Press [space] to play/pause.'; + QE('PlayButton', true); + QE('PauseButton', false); + QE('RestartButton', false); + recFileStartTime = recFileLastTime = time; + agentTerminal = CreateAmtRemoteTerminal('Term', {}); + agentTerminal.State = 3; + } + else if (recFileMetadata.protocol == 2) { // MeshCentral remote desktop recFileProtocol = 2; x += '

Press [space] to play/pause.'; @@ -237,7 +255,10 @@ if ((type == 2) && flagBinary && !flagUser) { // Device --> User data - if (recFileProtocol == 2) { + if (recFileProtocol == 1) { + // MeshCentral Terminal + agentTerminal.ProcessData(data); + } else if (recFileProtocol == 2) { // MeshCentral Remote Desktop agentDesktop.ProcessData(data); } else if (recFileProtocol == 101) { @@ -276,6 +297,10 @@ QH('timespan', '00:00:00'); QV('metadatadiv', true); QH('metadatadiv', 'MeshCentral Session Player

Drag & drop a .mcrec file or click "Open File..."'); + QH('Term', ''); + console.log('desk'); + QV('DeskParent', true); + QV('TermParent', false); } function ondrop(e) { @@ -359,6 +384,11 @@ QE('PlayButton', false); QE('PauseButton', true); QE('RestartButton', false); + if (recFileProtocol == 1) { + console.log('term'); + QV('DeskParent', false); + QV('TermParent', true); + } readNextBlock(processBlock); } @@ -389,6 +419,10 @@ QE('RestartButton', false); QS('progressbar').width = '0px'; QH('timespan', '00:00:00'); + QH('Term', ''); + console.log('desk'); + QV('DeskParent', true); + QV('TermParent', false); if (agentDesktop) { agentDesktop.Canvas.clearRect(0, 0, agentDesktop.CanvasId.width, agentDesktop.CanvasId.height); } else if (amtDesktop) { @@ -409,6 +443,7 @@ } function deskAdjust() { + return; var parentH = Q('DeskParent').clientHeight, parentW = Q('DeskParent').clientWidth; var deskH = Q('Desk').height, deskW = Q('Desk').width; diff --git a/views/default-old.handlebars b/views/default-old.handlebars deleted file mode 100644 index be8ef6b9..00000000 --- a/views/default-old.handlebars +++ /dev/null @@ -1,8433 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{{title}}} - - - - - - -
- -
-
{{{title}}}
-
{{{title2}}}
-
- -
-

{{{logoutControl}}}

-
-
-
-
-
-
-
-
-
-
-
-
- - - -
-
-
-
-
♦ - -
- - - - - - - - - - - - - - - -
- - -
 
-
-
-
-
-
- - - - - - - - - - - - - - - - - - -
-
- - - -
-
- -
- - -