diff --git a/amt-desktop-0.0.2.js b/amt-desktop-0.0.2.js
index 7af45dc..63afa7a 100644
--- a/amt-desktop-0.0.2.js
+++ b/amt-desktop-0.0.2.js
@@ -47,6 +47,7 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) {
obj.kvmExt = {};
obj.kvmExtChanged = null;
obj.useZLib = false;
+ obj.decimation = false;
obj.graymode = false;
// ###END###{DesktopInband}
@@ -170,9 +171,15 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) {
obj.send(String.fromCharCode(2, 0) + ShortToStr((supportedEncodings.length / 4) + 1) + supportedEncodings + IntToStr(-223)); // Supported Encodings + Desktop Size
- // Set the pixel encoding to something much smaller
- // obj.send(String.fromCharCode(0, 0, 0, 0, 16, 16, 0, 1) + ShortToStr(31) + ShortToStr(63) + ShortToStr(31) + String.fromCharCode(11, 5, 0, 0, 0, 0)); // Setup 16 bit color RGB565 (This is the default, so we don't need to set it)
- if (obj.bpp == 1) obj.send(String.fromCharCode(0, 0, 0, 0, 8, 8, 0, 1) + ShortToStr(7) + ShortToStr(7) + ShortToStr(3) + String.fromCharCode(5, 2, 0, 0, 0, 0)); // Setup 8 bit color RGB332
+ if (obj.graymode == false) {
+ // Set the pixel encoding to something much smaller
+ // obj.send(String.fromCharCode(0, 0, 0, 0, 16, 16, 0, 1) + ShortToStr(31) + ShortToStr(63) + ShortToStr(31) + String.fromCharCode(11, 5, 0, 0, 0, 0)); // Setup 16 bit color RGB565 (This is the default, so we don't need to set it)
+ if (obj.bpp == 1) obj.send(String.fromCharCode(0, 0, 0, 0, 8, 8, 0, 1) + ShortToStr(7) + ShortToStr(7) + ShortToStr(3) + String.fromCharCode(5, 2, 0, 0, 0, 0)); // Setup 8 bit color RGB332
+ } else {
+ // Gray scale modes
+ if (obj.bpp == 2) obj.send(String.fromCharCode(0, 0, 0, 0, 8, 8, 0, 1) + ShortToStr(255) + ShortToStr(0) + ShortToStr(0) + String.fromCharCode(0, 0, 0, 0, 0, 0)); // Setup 8 bit black and white RGB800
+ if (obj.bpp == 1) obj.send(String.fromCharCode(0, 0, 0, 0, 8, 8, 0, 1) + ShortToStr(15) + ShortToStr(0) + ShortToStr(0) + String.fromCharCode(0, 0, 0, 0, 0, 0)); // Setup 4 bit black and white RGB400
+ }
obj.state = 4;
if (obj.parent) { obj.parent.disconnectCode = 0; obj.parent.xxStateChange(3); }
@@ -183,8 +190,8 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) {
// ###END###{DesktopFocus}
// ###BEGIN###{DesktopInband}
if (obj.kvmExtChanged != null) {
- obj.sendKvmExtCmd(2, obj.graymode ? 1 : 0); // Set Decimation State
- obj.sendKvmExtCmd(4, obj.useZLib ? 1 : 0); // Set ZLib state
+ obj.sendKvmExtCmd(2, (obj.decimation === true) ? 1 : 0); // Set Decimation State
+ obj.sendKvmExtCmd(4, (obj.useZLib === true) ? 1 : 0); // Set ZLib state
}
// ###END###{DesktopInband}
_SendRefresh();
diff --git a/index.html b/index.html
index 64b2344..e6d08c7 100644
--- a/index.html
+++ b/index.html
@@ -1387,6 +1387,7 @@
Boot Settings
@@ -1764,7 +1766,7 @@
// ###END###{NetworkSettings}
// ###BEGIN###{Desktop}
var desktop;
- var desktopsettings = { encflags: 1, showfocus: false, showmouse: true, showcad: true, limitFrameRate: false, noMouseRotate: false };
+ var desktopsettings = { encflags: 1, showfocus: false, showmouse: true, showcad: true, limitFrameRate: false, noMouseRotate: false, decimation: false };
// ###END###{Desktop}
// ###BEGIN###{Mode-MeshCentral2}
var currentMeshNode = null;
@@ -2133,6 +2135,11 @@
// ###BEGIN###{DesktopRecorder}
if (urlvars && urlvars['norecord']) { QV('id_DeskRecorderTools', false); }
// ###END###{DesktopRecorder}
+
+ // ###BEGIN###{Mode-NodeWebkit}
+ // Check input arguments
+ if (urlvars['webcn'] == 1) { delete urlvars['webcn']; setTimeout(function() { alert('Invalid webcn argument, use -webcn:domain.com.'); }, 100); }
+ // ###END###{Mode-NodeWebkit}
}
// ###BEGIN###{PowerControl-Advanced}
@@ -8265,12 +8272,13 @@
if ((skipConsent !== true) && (amtversion > 5) && (amtsysstate != null) && (amtsysstate['IPS_OptInService'] != null) && (amtsysstate['IPS_OptInService'].response != undefined) && (amtsysstate['IPS_OptInService'].response['OptInRequired'] == 0xFFFFFFFF)) {
connectDesktopConsent = true; amtstack.Get('IPS_OptInService', powerActionResponse0, 0, 1); return; // User consent always required, ask for it before KVM.
}
- // Encoding Flags: 1 = RLE, 2 = 16bit, 4 = Gray, 8 = ZLib
+ // Encoding Flags: 1 = RLE, 2 = 16bit, 4 = Gray, 8 = ZLib, 16 = Decimation
desktop.m.useRLE = ((desktopsettings.encflags & 1) != 0);
desktop.m.bpp = (desktopsettings.encflags & 2) ? 2 : 1;
// ###BEGIN###{DesktopInband}
desktop.m.graymode = ((desktopsettings.encflags & 4) != 0);
desktop.m.useZLib = ((desktopsettings.encflags & 8) != 0);
+ desktop.m.decimation = desktopsettings.decimation;
// ###END###{DesktopInband}
desktop.m.showmouse = desktopsettings.showmouse;
desktop.m.onScreenSizeChange = center;
@@ -8520,6 +8528,7 @@
desktopsettings.encflags = parseInt(idx_d7desktopmode.value);
// ###BEGIN###{DesktopFocus}
desktopsettings.showfocus = d7showfocus.checked;
+ if ((amtversion > 15) || (urlvars['kvmext'] != null)) { desktopsettings.decimation = d7decimation.checked; }
// ###END###{DesktopFocus}
desktopsettings.showmouse = d7showcursor.checked;
desktopsettings.showcad = d7showcad.checked;
@@ -8548,6 +8557,8 @@
idx_d7desktopmode.value = desktopsettings.encflags;
// ###BEGIN###{DesktopFocus}
d7showfocus.checked = desktopsettings.showfocus;
+ d7decimation.checked = desktopsettings.decimation;
+ QV('d7decimationspan', (amtversion > 15) || (urlvars['kvmext'] != null))
// ###END###{DesktopFocus}
d7showcursor.checked = desktopsettings.showmouse;
d7showcad.checked = desktopsettings.showcad;
@@ -10225,6 +10236,10 @@
if (powerState & 2) { addOption('d5actionSelect', "Power up to Secure Erase", 104); }
if (powerState & 1) { addOption('d5actionSelect', "Reset to Secure Erase", 105); }
}
+ if (amtPowerBootCapabilities['PlatformErase'] != null) {
+ if (powerState & 2) { addOption('d5actionSelect', "Power up to Platform Erase", 106); }
+ if (powerState & 1) { addOption('d5actionSelect', "Reset to Platform Erase", 107); }
+ }
// ###BEGIN###{IDER}
if (powerState & 1) { addOption('d5actionSelect', "Reset to IDE-R Floppy", 200); }
if (powerState & 2) { addOption('d5actionSelect', "Power on to IDE-R Floppy", 201); }
@@ -10297,6 +10312,10 @@
// ###END###{Mode-NodeWebkit}
rsepass = 1;
setDialogMode(11, "Power Actions", 3, powerActionDlg, x);
+ } else if ((action == 106) || (action == 107)) {
+ var x = ("Confirm execution of Intel® Remote Platform Erase?" + '
');
+ x += ('
' + "WARNING: This will wipe data on the remote system." + '
');
+ setDialogMode(11, "Power Actions", 3, powerActionDlg, x);
// ###BEGIN###{PowerControl-OneClick}
} else if ((action == 999) && (amtversion >= 15)) {
statusbox("Power Actions", "Checking boot sources...");
@@ -10404,6 +10423,7 @@
QV('d24dLockResetButton', amtPowerBootCapabilities['ResetButtonLock'] == true);
QV('d24dSerialOverLan', amtPowerBootCapabilities['SOL'] == true);
QV('d24dSecureErase', amtPowerBootCapabilities['SecureErase'] == true);
+ QV('d24dPlatformErase', amtPowerBootCapabilities['PlatformErase'] != null);
QV('d24dLockSleepButton', amtPowerBootCapabilities['SleepButtonLock'] == true);
QV('d24dUserPasswordBypass', amtPowerBootCapabilities['UserPasswordBypass'] == true);
QV('idx_d24Verbocity1', amtPowerBootCapabilities['VerbosityQuiet'] == true);
@@ -10497,6 +10517,7 @@
AvdPowerDlg.UseSafeMode = Q('d24SafeMode').checked;
AvdPowerDlg.UserPasswordBypass = Q('d24UserPasswordBypass').checked;
AvdPowerDlg.SecureErase = Q('d24SecureErase').checked;
+ AvdPowerDlg.PlatformErase = Q('d24PlatformErase').checked;
if ((AvdPowerDlg.SecureErase === true) && (Q('d24rsepass').value.length > 0)) { AvdPowerDlg.RSEPassword = Q('d24rsepass').value; }
// Attempt user consent
@@ -10620,6 +10641,9 @@
r['SecureErase'] = ((AvdPowerDlg.SecureErase) && (amtPowerBootCapabilities['SecureErase'] == true));
if ((r['SecureErase'] == true) && (AvdPowerDlg.RSEPassword)) { r['RSEPassword'] = AvdPowerDlg.RSEPassword; }
}
+ if (r['PlatformErase'] != null) {
+ r['PlatformErase'] = ((AvdPowerDlg.PlatformErase) && (amtPowerBootCapabilities['PlatformErase'] != null));
+ }
} else {
// ###END###{PowerControl-Advanced}
r['BIOSPause'] = false;
@@ -10643,6 +10667,9 @@
r['SecureErase'] = (((action == 104) || (action == 105)) && (amtPowerBootCapabilities['SecureErase'] == true));
if ((r['SecureErase'] === true) && (rsepass.length > 0)) { r['RSEPassword'] = rsepass; }
}
+ if (r['PlatformErase'] != null) {
+ r['PlatformErase'] = (((action == 106) || (action == 107)) && (amtPowerBootCapabilities['PlatformErase'] != null));
+ }
rsepass = null;
// ###BEGIN###{PowerControl-Advanced}
}
@@ -10747,6 +10774,8 @@
if (action == 101 || action == 200 || action == 202 || action == 301 || action == 400 || action == 600) action = 10; // Reset
if (action == 104) action = 2; // Power on with Remote Secure Erase
if (action == 105) action = 10; // Reset with Remote Secure Erase
+ if (action == 106) action = 2; // Power on with Remote Platfrom Erase
+ if (action == 107) action = 10; // Reset with Remote Platfrom Erase
// ###BEGIN###{PowerControl-Advanced}
if (action == 999) action = AvdPowerDlg.Action;
targetPowerAction = action;