Start adding support for mid-stream AMTKVM recording.
This commit is contained in:
parent
1bad53d516
commit
16b25b04b0
|
@ -169,8 +169,8 @@
|
||||||
"maxSingleUserSessions": 10
|
"maxSingleUserSessions": 10
|
||||||
},
|
},
|
||||||
"_amtScanOptions": [
|
"_amtScanOptions": [
|
||||||
"192.168.15.0/23",
|
"LabNetwork 192.168.15.0/23",
|
||||||
"192.168.8.0/24"
|
"SalesNetwork 192.168.8.0/24"
|
||||||
],
|
],
|
||||||
"_amtAcmActivation": {
|
"_amtAcmActivation": {
|
||||||
"log": "amtactivation.log",
|
"log": "amtactivation.log",
|
||||||
|
|
|
@ -217,8 +217,11 @@
|
||||||
else if (p == 2) { p = "MeshCentral Desktop"; }
|
else if (p == 2) { p = "MeshCentral Desktop"; }
|
||||||
else if (p == 100) { p = "Intel® AMT WSMAN"; }
|
else if (p == 100) { p = "Intel® AMT WSMAN"; }
|
||||||
else if (p == 101) { p = "Intel® AMT Redirection"; }
|
else if (p == 101) { p = "Intel® AMT Redirection"; }
|
||||||
|
else if (p == 200) { p = "Intel® AMT KVM"; }
|
||||||
x += addInfoNoEsc("Protocol", p);
|
x += addInfoNoEsc("Protocol", p);
|
||||||
}
|
}
|
||||||
|
if (recFileMetadata.bpp == 1) { x += addInfoNoEsc("Color Quality", "256 colors"); }
|
||||||
|
if (recFileMetadata.bpp == 2) { x += addInfoNoEsc("Color Quality", "65536 colors"); }
|
||||||
if (recFileMetadata.indexInterval) {
|
if (recFileMetadata.indexInterval) {
|
||||||
recFileIndexBasePtr = recFilePtr;
|
recFileIndexBasePtr = recFilePtr;
|
||||||
x += addInfoNoEsc("Seeking", format("Indexed every {0} seconds", recFileMetadata.indexInterval));
|
x += addInfoNoEsc("Seeking", format("Indexed every {0} seconds", recFileMetadata.indexInterval));
|
||||||
|
@ -264,10 +267,27 @@
|
||||||
recFileStartTime = recFileLastTime = time;
|
recFileStartTime = recFileLastTime = time;
|
||||||
amtDesktop = CreateAmtRemoteDesktop('Desk');
|
amtDesktop = CreateAmtRemoteDesktop('Desk');
|
||||||
amtDesktop.onScreenSizeChange = deskAdjust;
|
amtDesktop.onScreenSizeChange = deskAdjust;
|
||||||
|
if (recFileMetadata.bpp) { amtDesktop.bpp = recFileMetadata.bpp; }
|
||||||
amtDesktop.State = 3;
|
amtDesktop.State = 3;
|
||||||
amtDesktop.Start();
|
amtDesktop.Start();
|
||||||
deskAdjust();
|
deskAdjust();
|
||||||
}
|
}
|
||||||
|
else if (recFileMetadata.protocol == 200) {
|
||||||
|
// Intel AMT Midstream KVM
|
||||||
|
recFileProtocol = 200;
|
||||||
|
x += '<br /><br /><span style=color:gray>Press [space] to play/pause.</span>';
|
||||||
|
QE('PlayButton', true);
|
||||||
|
QE('PauseButton', false);
|
||||||
|
QE('RestartButton', false);
|
||||||
|
recFileStartTime = recFileLastTime = time;
|
||||||
|
amtDesktop = CreateAmtRemoteDesktop('Desk');
|
||||||
|
amtDesktop.onScreenSizeChange = deskAdjust;
|
||||||
|
amtDesktop.State = 3;
|
||||||
|
amtDesktop.Start();
|
||||||
|
if (recFileMetadata.bpp) { amtDesktop.bpp = recFileMetadata.bpp; }
|
||||||
|
amtDesktop.state = 3;
|
||||||
|
deskAdjust();
|
||||||
|
}
|
||||||
QV('metadatadiv', true);
|
QV('metadatadiv', true);
|
||||||
QH('metadatadiv', x);
|
QH('metadatadiv', x);
|
||||||
QH('deskstatus', recFile.name);
|
QH('deskstatus', recFile.name);
|
||||||
|
@ -323,13 +343,21 @@
|
||||||
}
|
}
|
||||||
} else if (recFileProtocol == 101) {
|
} else if (recFileProtocol == 101) {
|
||||||
// Intel AMT KVM
|
// Intel AMT KVM
|
||||||
|
var view = new Uint8Array(data.length);
|
||||||
|
for (var i = 0; i < data.length; i++) { view[i] = data.charCodeAt(i); }
|
||||||
|
|
||||||
if ((readState == 0) && (rstr2hex(data) == '4100000000000000')) {
|
if ((readState == 0) && (rstr2hex(data) == '4100000000000000')) {
|
||||||
// We are not authenticated, KVM data starts here.
|
// We are not authenticated, KVM data starts here.
|
||||||
readState = 1;
|
readState = 1;
|
||||||
if (data.length > 8) { amtDesktop.ProcessData(data.substring(8)); }
|
if (data.length > 8) { amtDesktop.ProcessBinaryData(view.slice(8).buffer); }
|
||||||
} else if (readState == 1) {
|
} else if (readState == 1) {
|
||||||
amtDesktop.ProcessData(data);
|
amtDesktop.ProcessBinaryData(view.buffer);
|
||||||
}
|
}
|
||||||
|
} else if (recFileProtocol == 200) {
|
||||||
|
// Intel AMT midstream KVM
|
||||||
|
var view = new Uint8Array(data.length);
|
||||||
|
for (var i = 0; i < data.length; i++) { view[i] = data.charCodeAt(i); }
|
||||||
|
amtDesktop.ProcessBinaryData(view.buffer);
|
||||||
}
|
}
|
||||||
} else if ((type == 2) && flagBinary && flagUser) {
|
} else if ((type == 2) && flagBinary && flagUser) {
|
||||||
// User --> Device data
|
// User --> Device data
|
||||||
|
@ -516,6 +544,7 @@
|
||||||
amtDesktop.onScreenSizeChange = deskAdjust;
|
amtDesktop.onScreenSizeChange = deskAdjust;
|
||||||
amtDesktop.State = 3;
|
amtDesktop.State = 3;
|
||||||
amtDesktop.Start();
|
amtDesktop.Start();
|
||||||
|
if (recFileMetadata.protocol == 200) { if (recFileMetadata.bpp) { amtDesktop.bpp = recFileMetadata.bpp; } amtDesktop.state = 3; }
|
||||||
} else if (agentTerminal) {
|
} else if (agentTerminal) {
|
||||||
agentTerminal = null;
|
agentTerminal = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue