Help
RSS
API
Feed
Maltego
Contact
Domain > screen.thetechresource.com
×
More information on this domain is in
AlienVault OTX
Is this malicious?
Yes
No
DNS Resolutions
Date
IP Address
2019-11-21
74.95.161.100
(
ClassC
)
2026-03-01
38.140.16.76
(
ClassC
)
Port 443
HTTP/1.1 200 OKCache-Control: privateContent-Length: 112543Content-Type: text/html; charsetutf-8Server: Microsoft-HTTPAPI/2.0X-Robots-Tag: noindexX-Content-Type-Options: nosniffP3P: CPNON CUR OUR STP STA PREDate: Sun, 01 Mar 2026 00:26:49 GMT !DOCTYPE html>html>head>meta http-equivX-UA-Compatible contentIEedge />meta nameviewport contentwidthdevice-width, initial-scale1, maximum-scale1, user-scalableno /> script> function setTaggedSessionInfo(tag, taggedSessionInfo) { var oldTaggedSessionInfo window._taggedSessionInfostag; window._taggedSessionInfostag taggedSessionInfo; if (!oldTaggedSessionInfo || taggedSessionInfo.SessionID ! oldTaggedSessionInfo.SessionID || taggedSessionInfo.Code ! oldTaggedSessionInfo.Code) SC.livedata.notifyDirty(); } // backwards compatibility with extensions function setTaggedSessionID(tag, sessionID) { window.setTaggedSessionInfo(tag, { SessionID: sessionID }); } function getTaggedSessionInfo(tag) { return window._taggedSessionInfostag; } function getSessionInfo() { var liveData SC.livedata.get(); return liveData && liveData.ResponseInfoMap && liveData.ResponseInfoMapGuestSessionInfo } /script>script srcScript.ashx?__Cache648346cf-84a0-4482-9712-8e17ea266c3d iddefaultScript>/script>script srcScripts/SC.polyfill.ts?ScriptImportTypeNoModule&__Cache561a2158-5af2-45e3-909e-bb769506ecaf nomodulenomodule>/script>script srcScripts/SC.main.ts?ScriptImportTypeNoModule&__Cachee8a4a158-01e8-46db-bb1e-b6ebb384598f nomodulenomodule>/script>script srcScripts/SC.main.ts?ScriptImportTypeClassic&__Cachee8a4a158-01e8-46db-bb1e-b6ebb384598f>/script>link hrefApp_Themes/DarkWithGreen/Default.css?__Cache8fb021ec-0353-40e0-a6cd-de536e5ee54b typetext/css relstylesheet />link hrefFavIcon.axd?__Cache7639281f-39d3-469f-a2a5-2921201e3bd1 relshortcut icon />script>SC.util.mergeIntoContext({focusedControlID:null,userName:,userDisplayName:,isUserAuthenticated:false,antiForgeryToken:6A4moGiOEFtRVGKco0m2VCs0hFGjNoc4JJCv3k51PvgBAADD7pP9asItQg,isUserAdministrator:false,canDisplayPAMDashboard:false,canManageSharedToolbox:false,pageBaseFileName:Guest,notifyActivityFrequencyMilliseconds:600000,loginAfterInactivityMilliseconds:0,canChangePassword:false,controlPanelUrl:null,pageType:GuestPage,processType:2,userAgentOverride:null,sessionTypeInfos:,imports:{SC.editor:Scripts/SC.editor.ts?ScriptImportTypeEsModule\u0026__Cachee2314af7-db71-4517-b260-2369a20c00ec}});/script>script>SC.extension.addInitializeProc(fc234f0e-2e8e-4a1f-b977-ba41b14031f7, function (extensionContext) {// Add: Options | Helpvar xextensionContext.baseUrl.split(/).splice(-2)0;SC.event.addGlobalHandler(SC.event.QueryCommandButtonState,function(e){if(e.commandNameEditExtensionSettings){if(e.commandContext.extensionInfo.ExtensionIDx&&e.commandElement._commandNameEditExtensionSettings)SC.ui.addElement(e.target.parentElement,A,{href:#,_commandName:ShowHelpLink_+x,innerHTML:Help});}});SC.event.addGlobalHandler(SC.event.ExecuteCommand,function(e){if(e.commandNameShowHelpLink_+x){window.open(https://docs.connectwise.com/ConnectWise_Automate/ConnectWise_Automate_Documentation/080/020/020?psa1, _blank);}});});/script>script>SC.extension.addInitializeProc(fc234f0e-2e8e-4a1f-b977-ba41b14031f7, function (extensionContext) {/* The following is currently ripped from the Hosted Integration Template per ScreenConnect Potential to one day not need this and use some core functionality File will hide the UI and display the fourth column only*/var sendCommandToParent function (commandName, commandData) { if (commandName) { window.parent.postMessage({ _internalCommand: commandName, _internalCommandData: commandData ? commandData : {} }, *); }};SC.event.addGlobalHandler(SC.event.PreRender, function () { window.addEventListener(message, async function (eventArgs) { SC.util.includeStyleSheet(extensionContext.baseUrl + LiveData/livedata.css); switch (eventArgs.data._externalCommand) { case RenderSessionDetailsFullWidthCommand: var applicablePaths /, /Guest, /Host, /Login; if (!applicablePaths.includes(window.location.pathname)) { break; } var elementsToHide $(.HeaderPanel), $(.GlobalBar), $(.NavigationPanel), $(.MasterPanel), $(.MainDetailHeaderPanel), $(.MainDetailPanel), $(.ToggleDetailPanelButton), ; for (var i 0; i elementsToHide.length; i++) { if (elementsToHidei) { SC.css.ensureClass(elementsToHidei, HiddenElement, true); } } var outerPanel $(.OuterPanel); var mainPanel $(.MainPanel); var subDetailHeader $(.SubDetailHeaderPanel); if (outerPanel) { SC.css.ensureClass(outerPanel, OuterPanelOverride, true); } if (mainPanel) { SC.css.ensureClass(mainPanel, GridOverride, true); } if (subDetailHeader) { SC.css.ensureClass(subDetailHeader, FullSizeHeaderElement, true); } var notifyPaths /, /Guest; if (notifyPaths.includes(window.location.pathname)) { sendCommandToParent(OnPreRenderComplete); } break; case LoadSessionCommand: var sessionID eventArgs.data._externalCommandData; if (sessionID) { // Call our LiveDataService await SC.service.GetSessionDetailsUrl( sessionID, function (url) { if (url) { window.location.href url; } } ); } sendCommandToParent(OnLoadSessionComplete); break; } }); sendCommandToParent(OnPreRender);});});/script>script>SC.extension.addInitializeProc(008c8fcf-2b14-4551-aa25-2177aa9a61e5, function (extensionContext) {var connectWiseUserSourceName ConnectWise;var userSourceConfiguration { IdentityProviderUri: extensionContext.settingValues.ConnectWiseSsoBaseUrl, ExtraScopes: roles, ClientID: null, ClientSecret: null, UserInfoRoleNamesPath: roles, ExtraRoleNames: , DisplayName: ConnectWise SSO, ExternalUserManagementUrl: extensionContext.settingValues.ConnectWiseSsoUserManagementUrl,}userSourceConfiguration.ExternalUserManagementUrl extensionContext.settingValues.ConnectWiseSsoUserManagementUrl;SC.event.addGlobalHandler(SC.event.PreRender, function () { if (SC.context.pageType AdministrationPage) SC.util.includeStyleSheet(extensionContext.baseUrl + ConnectWiseSSO.css);});SC.event.addGlobalHandler(SC.event.QueryCommandButtons, function (eventArgs) { switch (eventArgs.area) { case AddUserSourcePopoutPanel: eventArgs.buttonDefinitions.push({ commandName: AddConnectWiseSSOUserSource, text: SC.resConnectWiseSSO.AddUserSourcePopoutPanel.Button }); break; }});SC.event.addGlobalHandler(SC.event.QueryCommandButtonState, function (eventArgs) { switch (eventArgs.commandName) { case AddConnectWiseSSOUserSource: eventArgs.isEnabled eventArgs.isVisible SC.pagedata.get().UserSources.every(it > it.Name ! connectWiseUserSourceName); break; }});SC.event.addGlobalHandler(SC.event.ExecuteCommand, function (eventArgs) { switch (eventArgs.commandName) { case AddConnectWiseSSOUserSource: SC.dialog.showModalButtonDialog( ConnectWiseSsoSetup, SC.resConnectWiseSSO.SetupModal.Title, SC.resConnectWiseSSO.SetupModal.Button, null, function (container) { SC.ui.addContent(container, $h2({ innerHTML: SC.resConnectWiseSSO.SetupModal.Instructions, className: SettingHeader }), $div($textarea({ className: RegistrationTokenInput })) ); }, function () { SC.service.MakeDynamicClientRegistrationRequest( $(.RegistrationTokenInput).value, SC.context.instanceID || SC.context.instanceUrlScheme, SC.context.scriptBaseUrl, connectWiseUserSourceName, function (registrationResponse) { userSourceConfiguration.ClientID registrationResponse.client_id; userSourceConfiguration.ClientSecret registrationResponse.client_secret; var configKeys Object.keys(userSourceConfiguration); var configValues configKeys.map(function (key) { return userSourceConfigurationkey; }); SC.service.AddUserSource( ScreenConnect.OpenIDConnectMembershipProvider, connectWiseUserSourceName, true, false, configKeys, configValues, function() { SC.dialog.showModalActivityAndReload(Save, true); SC.dialog.notifyDirty(); }, ); }); SC.dialog.hideModalDialog(); } ); break; }});function compareVersions(version1, version2) { var versionNumbers1 version1.toString().split(.); var versionNumbers2 version2.toString().split(.); for (let i 0; i Math.max(versionNumbers1.length, versionNumbers2.length); i++) { var versionNumber1 parseInt(versionNumbers1i || 0, 10); var versionNumber2 parseInt(versionNumbers2i || 0, 10); if (versionNumber1 > versionNumber2) return 1; if (versionNumber2 > versionNumber1) return -1; } return 0;}function isVersionInRange(version, minVersionInclusive, maxVersionExclusive) { return (minVersionInclusive undefined || compareVersions(version, minVersionInclusive) > 0 && (maxVersionExclusive undefined || compareVersions(version, maxVersionExclusive) 0));}function isProductVersionInRange(minVersionInclusive, maxVersionExclusive) { return isVersionInRange(SC.context.productVersion, minVersionInclusive, maxVersionExclusive);}});/script>script>SC.extension.addInitializeProc(44d2c8bf-282f-4ffe-bce3-eb63e4b84c02, function (extensionContext) {// If Custom Theme Manager extension is enabled, add help link to extension options dropdownvar customThemeManagerExtensionId extensionContext.baseUrl.split(/).slice(-2)0;var customThemeManagerHelpLink https://help.screenconnect.com/Extension:Custom_Theme_Manager;// Object.keys will retrieve the keys in order of when they were addedvar colorElementPrefixToCssPropertyMap SC.util.combineObjects.apply(null, PrimaryColor, SecondaryColor, OddSessionRowColor, EvenSessionRowColor, HeaderBackgroundColor, NavigationPanelBackgroundColor, MasterPanelBackgroundColor, UnacknowledgedMessageDotColor.map(function (_) { return { _: _.charAt(0).toLowerCase() + _.slice(1), };}));SC.event.addGlobalHandler(SC.event.QueryCommandButtonState, function (eventArgs) { if (eventArgs.commandName EditExtensionSettings) if (eventArgs.commandContext.extensionInfo.ExtensionID customThemeManagerExtensionId && eventArgs.commandElement._commandName EditExtensionSettings) SC.ui.addElement( eventArgs.target.parentElement, A, { href: #, _commandName: ShowHelpLink_ + customThemeManagerExtensionId, innerHTML: Help } );});SC.event.addGlobalHandler(SC.event.ExecuteCommand, function (eventArgs) { if (eventArgs.commandName ShowHelpLink_ + customThemeManagerExtensionId) window.open(customThemeManagerHelpLink, _blank);});var setColorFromFile function (input, button, regexDef, styleFile) { var validHex /#a-fA-F0-9{6}/; var colorDefLine styleFile.match(new RegExp(regexDef)); if (colorDefLine ! null) { var color colorDefLine0.match(validHex)0; input.value color; input._originalValue color; button.style.backgroundColor color; }};var invert function (hex) { var hexToRGB function (color) { function cutHex(h) { return (h.charAt(0) #) ? h.substring(1, 7) : h } function hexToR(h) { return parseInt((cutHex(h)).substring(0, 2), 16) } function hexToG(h) { return parseInt((cutHex(h)).substring(2, 4), 16) } function hexToB(h) { return parseInt((cutHex(h)).substring(4, 6), 16) } return rgb( + hexToR(color) + , + hexToG(color) + , + hexToB(color) + ); }; var rgb hexToRGB(hex); var startIndex rgb.indexOf(() + 1; var lastIndex rgb.indexOf()); var values rgb.substr(startIndex, lastIndex - startIndex).split(,); var r 0; var g 0; var b 0; for (var i 0; i values.length; i++) { if (i 0) { r 255 - valuesi; } if (i 1) { g 255 - valuesi; } if (i 2) { b 255 - valuesi; } } return rgb( + r + , + g + , + b + );};var editThemeProc function () { SC.dialog.showModalDialogRaw(CustomThemeEditor, SC.dialog.createTitlePanel(SC.resCustomThemeEditor.Title), $div( $div({ className: CommandPanel }, SC.command.queryAndCreateCommandButtons(CustomThemeEditorPanel), ) ), $div( $div({ className: MasterPanel }, $div({ id: themeSelectionPanel, className: MasterSelectionPanel }) ), $div({ id: themeEditPanel, className: DetailPanel }) ) , null, null, SC.pagedata.notifyDirty ); SC.service.GetCustomThemeDirectories(function (customThemeNames) { if (customThemeNames.length > 0) { for (var i 0; i customThemeNames.length; i++) { addThemeFileProc(customThemeNamesi, null); } tryEditThemeFileProc(customThemeNames0); } }); updateThemeViewProc();};var addThemeFileProc function (themeName, themeLoadFileName) { $(themeSelectionPanel).appendChild(createThemeSelectionLinkFunc(themeName)); $(themeEditPanel).appendChild(createThemeEditPanelFunc(themeName, themeLoadFileName)); updateThemeViewProc();};var checkForInputChange function (input, isColor, themeName, panel, button) { return function () { var _input input; var _themeName themeName; var _panel panel; var _button button; var currentValue, isDirtyInput, i; if (isColor) { currentValue _input.value.toUpperCase(); var validHex true; Object.keys(colorElementPrefixToCssPropertyMap).forEach(function (colorElementPrefix) { validHex validHex && (/(^#a-fA-F0-9{3}$)|(^#a-fA-F0-9{6}$)/.test($(colorElementPrefix + _themeName).value)); }); _panel._validHex validHex; if (/^#a-fA-F0-9{3}$/.test(currentValue)) { var transformedValue #; for (i 1; i currentValue.length; i++) { transformedValue + currentValuei + currentValuei; } currentValue transformedValue; _button.style.backgroundColor currentValue; } else if (/(^#a-fA-F0-9{6}$)/.test(currentValue)) { _button.style.backgroundColor currentValue; } else { _panel._invalidHex true; _button.style.backgroundColor #FFFFFF; } isDirtyInput currentValue ! _input._originalValue; } else { isDirtyInput _input.value ! _input._originalValue; } _input._isDirty isDirtyInput; if (isDirtyInput) { _panel._isDirty isDirtyInput; updateThemeViewProc(); } else { var isDirty false; Object.keys(colorElementPrefixToCssPropertyMap).forEach(function (colorElementPrefix) { isDirty isDirty | $(colorElementPrefix + _themeName)._isDirty; }); _panel._isDirty isDirty; updateThemeViewProc(); } };};var createThemeEditPanelFunc function (themeName, themeLoadFileName) { var colorInputAndButtonMap SC.util.combineObjects.apply(null, Object.keys(colorElementPrefixToCssPropertyMap).map(function (_) { return { _: { colorInput: $input({ id: _ + themeName, type: text, _originalValue: , _isDirty: false }), colorButton: $div(), }, }; })); var themeEditPanel $div({ className: themeEditPanel, _isDirty: (themeLoadFileName null ? false : true), _validHex: true, _themeDefinition: }, $table({ className: themeElementTable }, $tr( $td( Object.keys(colorInputAndButtonMap).map(function (_) { return $div( colorInputAndButtonMap_.colorButton, colorInputAndButtonMap_.colorInput, $label({ title: SC.resThemeEditor.Title. + _ }, SC.resThemeEditor.Color. + _), ); }), ), ) ), $div({ id: colorSelectionPanel + themeName }) ); var loadTheme themeLoadFileName ! null ? themeLoadFileName : themeName; var initColorHandlers function (input, button) { SC.event.addHandler(button, click, function (eventArgs) { var colorPickerDiv; var check checkForInputChange(input, true, themeName, themeEditPanel, button); SC.popout.togglePanel( button, function (container) { SC.ui.addContent(container, colorPickerDiv $div({ className: cp-default })); var cp ColorPicker( colorPickerDiv, function (hex, hsv, rgb) { input.value hex.toUpperCase(); button.style.backgroundColor hex; check(); } ); cp.setHex(input.value); }, function (container) { } ); }); SC.event.addHandler(input, input, checkForInputChange(input, true, themeName, themeEditPanel, button)); }; SC.service.GetThemeFileContents(loadTheme, function (themeDefinition) { themeEditPanel._themeDefinition themeDefinition; Object.keys(colorInputAndButtonMap).forEach(function (_) { setColorFromFile(colorInputAndButtonMap_.colorInput, colorInputAndButtonMap_.colorButton, \\$ + colorElementPrefixToCssPropertyMap_ + : #a-fA-F0-9{6}, themeDefinition); initColorHandlers(colorInputAndButtonMap_.colorInput, colorInputAndButtonMap_.colorButton); }); }); return themeEditPanel;};var createThemeSelectionLinkFunc function (filePath) { return $a({ className: SelectionLink, _commandName: EditThemeFile, _commandArgument: filePath });};var tryRemoveThemeFileProc function (themeName) { var index getIndexOfThemeFilePathFunc(themeName); if (index ! -1) { SC.ui.removeChildAt($(themeSelectionPanel), index); SC.ui.removeChildAt($(themeEditPanel), index); SC.service.DeleteSelectedTheme(themeName, function () { if ($(themeSelectionPanel).childNodes.length ! 0) { if (index $(themeSelectionPanel).childNodes.length) { tryEditThemeFileProc($(themeSelectionPanel).childNodesindex - 1._commandArgument); } else { tryEditThemeFileProc($(themeSelectionPanel).childNodesindex._commandArgument); } } updateThemeViewProc(); }); }};var startSaveFileProc function (themeName) { var index getIndexOfThemeFilePathFunc(themeName); var themeDefinition $(themeEditPanel).childNodesindex._themeDefinition; var checkHexValid function (elements) { // allow 3 or 6 digit hex color codes var validHex /(^#a-fA-F0-9{6}$)|(^#a-fA-F0-9{3}$)/; for (var key in elements) { if (!validHex.test($(elementskey + themeName).value)) { return false; } } return true; }; // all saved color codes are of the 6 digit variety var convertToSixDigitCode function (code) { var newCode #; for (var i 1; i code.length; i++) { newCode + codei + codei; } return newCode; }; String.prototype.allReplace function (obj) { var retStr this; for (var x in obj) { retStr retStr.replace(new RegExp(x), objx); } return retStr; }; var colorElements SC.util.combineObjects.apply(null, Object.keys(colorElementPrefixToCssPropertyMap).map(function (_) { return { \\\$ + colorElementPrefixToCssPropertyMap_ + : #a-fA-F0-9{6}: _ }; // we do this specifically so we can use allReplace later })); if (checkHexValid(colorElements)) { var colors {}; var images {}; for (var key in colorElements) { // if 3 digit color code, convert to 6 digit before saving var colorElementPrefix colorElementskey; var colorElement $(colorElementPrefix + themeName); if (colorElement.value.length 4) { colorElement.value convertToSixDigitCode($(colorElementPrefix + themeName).value); } colorElement._originalValue colorElement.value; colorElement._isDirty false; colorskey $ + colorElementPrefixToCssPropertyMapcolorElementPrefix + : + colorElement.value.toUpperCase(); } var newThemeContents themeDefinition.allReplace(colors); newThemeContents newThemeContents.allReplace(images); SC.service.SaveThemeFileContents(themeName, newThemeContents); $(themeEditPanel).childNodesindex._isDirty false; $(themeEditPanel).childNodesindex._themeDefinition newThemeContents; updateThemeViewProc(); }};var tryEditThemeFileProc function (filePath) { var index getIndexOfThemeFilePathFunc(filePath); Array.prototype.forEach.call($(themeSelectionPanel).childNodes, function (l, i) { SC.ui.setSelected(l, i index); }); Array.prototype.forEach.call($(themeEditPanel).childNodes, function (p, i) { SC.ui.setVisible(p, i index); }); updateThemeViewProc();};var getIndexOfThemeFilePathFunc function (filePath) { return Array.prototype.findIndex.call($(themeSelectionPanel).childNodes, function (sl) { return sl._commandArgument filePath; });};var getSelectedThemeFileIndexFunc function () { return Array.prototype.findIndex.call($(themeSelectionPanel).childNodes, function (sl) { return SC.ui.isSelected(sl); });};var updateThemeViewProc function () { var commandPanel document.querySelector(.ModalDialog.CustomThemeEditor .CommandPanel); var index getSelectedThemeFileIndexFunc(); // update Clone command button if ($(themeSelectionPanel).childNodesindex) { if ($(themeEditPanel).childNodesindex._validHex) { commandPanel.childNodes1.className ; } else { commandPanel.childNodes1.className Disabled; } } else { commandPanel.childNodes1.className Disabled; } //update Delete command button if ($(themeSelectionPanel).childNodesindex) { SC.service.GetThemeInfo(function (themeInfo) { if (themeInfo.CurrentThemeName $(themeSelectionPanel).childNodesindex._commandArgument) { commandPanel.childNodes2.className Disabled; } else { commandPanel.childNodes2.className ; } }); } else { commandPanel.childNodes2.className Disabled; } //update Save command button if ($(themeEditPanel).childNodesindex) { if (($(themeEditPanel).childNodesindex._isDirty) && ($(themeEditPanel).childNodesindex._validHex)) { commandPanel.childNodes3.className ; } else { commandPanel.childNodes3.className Disabled; } } else { commandPanel.childNodes3.className Disabled; } //update Save All command button if ($(themeEditPanel).childNodes.length > 0) { var enableSaveAll false; for (var i 0; i $(themeEditPanel).childNodes.length; i++) { if ($(themeEditPanel).childNodesi._isDirty) { if ($(themeEditPanel).childNodesi._validHex) { enableSaveAll true; } else { enableSaveAll false; break; } } else { enableSaveAll enableSaveAll | false; } } if (enableSaveAll) { commandPanel.childNodes4.className ; } else { commandPanel.childNodes4.className Disabled; } } else { commandPanel.childNodes4.className Disabled; } Array.prototype.forEach.call($(themeSelectionPanel).childNodes, function (sl, i) { var linkContent sl._commandArgument; if ($(themeEditPanel).childNodesi._isDirty) linkContent + *; SC.ui.setInnerText(sl, linkContent); SC.css.ensureClass(sl, LoadError, sl._status SC.types.ExtensionRuntimeStatus.LoadError); sl.title (SC.util.isNullOrEmpty(sl._loadMessage) ? : sl._loadMessage); });};SC.event.addGlobalHandler(SC.event.QueryCommandButtons, function (eventArgs) { switch (eventArgs.area) { case ExtrasPopoutPanel: if (SC.context.pageType AdministrationPage) { eventArgs.buttonDefinitions.push( { commandName: CreateEditTheme, text: SC.resManageThemes.ButtonText } ); } break; case CustomThemeEditorPanel: Array.prototype.push.apply(eventArgs.buttonDefinitions, { commandName: NewThemeFile }, { commandName: CloneThemeFile }, { commandName: DeleteThemeFile }, { commandName: SaveThemeFile }, { commandName: SaveAllThemeFiles } ); break; }});SC.event.addGlobalHandler(SC.event.ExecuteCommand, function (eventArgs) { var dialog SC.dialog.getModalDialog(); switch (eventArgs.commandName) { case CreateEditTheme: SC.util.includeStyleSheet(extensionContext.baseUrl + Style.css); SC.util.includeStyleSheet(extensionContext.baseUrl + cp\\themes.css); SC.util.includeScript(extensionContext.baseUrl + cp\\colorpicker.js, null, editThemeProc()); break; case NewThemeFile: if (eventArgs.clickedElement.tagName INPUT) { var themeFile { FilePath: eventArgs.clickedElement.value, FileContent: }; SC.service.CreateCustomThemeDirectoryStructure(themeFile.FilePath, function (name) { addThemeFileProc(name, null); tryEditThemeFileProc(name); }); } else { SC.popout.togglePanel( SC.ui.findDescendent(dialog, function (e) { return e._commandName eventArgs.commandName; }), function (container) { SC.ui.setContents(container, $p(SC.ui.createTextBox({ _commandName: eventArgs.commandName }, false, false, SC.resCustomThemeEditor.NewThemeName.Placeholder)), ); }, function (container) { SC.ui.findDescendentByTag(container, INPUT).focus(); } ); } break; case EditThemeFile: tryEditThemeFileProc(eventArgs.commandArgument); break; case DeleteThemeFile: if (eventArgs.commandArgument) { var currentSelectionLink Array.prototype.find.call($(themeSelectionPanel).childNodes, function (l) { return SC.ui.isSelected(l); }); tryRemoveThemeFileProc(currentSelectionLink._commandArgument); } else { SC.popout.togglePanel( SC.ui.findDescendent(dialog, function (e) { return e._commandName eventArgs.commandName; }), function (container) { var currentSelectionLink Array.prototype.find.call($(themeSelectionPanel).childNodes, function (l) { return SC.ui.isSelected(l); }); SC.ui.setContents(container, $p(SC.resCustomThemeEditor.DeleteTheme.ConfirmationText), $p($input({ type: button, value: SC.resCustomThemeEditor.DeleteTheme.ButtonText, _commandName: eventArgs.commandName, _commandArgument: true })) ); }, function (container) { if (SC.ui.findDescendentByTag(container, INPUT) ! null) { SC.ui.findDescendentByTag(container, INPUT).focus(); } } ); } break; case SaveAllThemeFiles: var selectionLinks $(themeSelectionPanel).childNodes; var themeEditPanels $(themeEditPanel).childNodes; for (var i 0; i selectionLinks.length; i++) if (themeEditPanelsi._isDirty) startSaveFileProc(selectionLinksi._commandArgument); break; case SaveThemeFile: var currentSelectionLink Array.prototype.find.call($(themeSelectionPanel).childNodes, function (l) { return SC.ui.isSelected(l); }); startSaveFileProc(currentSelectionLink._commandArgument); break; case CloneThemeFile: if (eventArgs.clickedElement.tagName INPUT) { var currentSelectionLink Array.prototype.find.call($(themeSelectionPanel).childNodes, function (l) { return SC.ui.isSelected(l); }); var themeFile { FilePath: eventArgs.clickedElement.value, FileContent: }; SC.service.CloneCustomThemeDirectoryStructure(currentSelectionLink._commandArgument, themeFile.FilePath, function (name) { addThemeFileProc(name, null); tryEditThemeFileProc(name); }); } else { SC.popout.togglePanel( SC.ui.findDescendent(dialog, function (e) { return e._commandName eventArgs.commandName; }), function (container) { SC.ui.setContents(container, $p(SC.ui.createTextBox({ _commandName: eventArgs.commandName }, false, false, SC.resCustomThemeEditor.NewThemeName.Placeholder)), ); }, function (container) { SC.ui.findDescendentByTag(container, INPUT).focus(); } ); } break; }});});/script>script>SC.extension.addInitializeProc(443da44f-06c7-4a60-bae8-bb4f01f49131, function (extensionContext) {/** Edit Web.Config AppSettings 2.0.3 **//** Global Extension Variables and Constants **/const extensionId extensionContext.baseUrl.split(/).slice(-2)0;var serverEnvironment local;var settingsChanged false;var userIPAddress null;var currentURIs {};var dataUri;var showAdvancedSettings extensionContext.settingValues.ShowAdvancedSettings.toLowerCase() true;const numberRegex new RegExp(/(^0-9$)|(^1-90-9+$)/);const webServerListenUriRegex new RegExp(/^(http|https):\/\/((\+)|((0-9a-z\.-+)\.(a-z{2,63}))|((((250-5)|(20-40-9)|(10-90-9)|(1-9?0-9))\.){3}((250-5)|(20-40-9)|(10-90-9)|(1-9?0-9))))(:0-9{1,5})(\/0-9a-zA-Z-+)?\/$/i);const relayListenUriRegex new RegExp(/^relay:\/\/((\+)|((((250-5)|(20-40-9)|(10-90-9)|(1-9?0-9))\.){3}((250-5)|(20-40-9)|(10-90-9)|(1-9?0-9))))(:0-9{1,5})\/$/i);const webServerAddressableUriRegex new RegExp(/^(http|https):\/\/(((0-9a-z\.-+)\.(a-z{2,63}))|((((250-5)|(20-40-9)|(10-90-9)|(1-9?0-9))\.){3}((250-5)|(20-40-9)|(10-90-9)|(1-9?0-9))))(:0-9{1,5})?(\/0-9a-zA-Z-+)?\/$/i);const relayAddressableUriRegex new RegExp(/^relay:\/\/(((0-9a-z\.-+)\.(a-z{2,63}))|((((250-5)|(20-40-9)|(10-90-9)|(1-9?0-9))\.){3}((250-5)|(20-40-9)|(10-90-9)|(1-9?0-9))))(:0-9{1,5})\/$/i);const regExIPv4 /^((0-9|1-90-9|10-9{2}|20-40-9|250-5)\.){3}(0-9|1-90-9|10-9{2}|20-40-9|250-5)(\/(0-9|1-20-9|30-2))?$/;const regExIPv6 /^s*(((0-9A-Fa-f{1,4}:){7}(0-9A-Fa-f{1,4}|:))|((0-9A-Fa-f{1,4}:){6}(:0-9A-Fa-f{1,4}|((250-5|20-4d|1dd|1-9?d)(.(250-5|20-4d|1dd|1-9?d)){3})|:))|((0-9A-Fa-f{1,4}:){5}(((:0-9A-Fa-f{1,4}){1,2})|:((250-5|20-4d|1dd|1-9?d)(.(250-5|20-4d|1dd|1-9?d)){3})|:))|((0-9A-Fa-f{1,4}:){4}(((:0-9A-Fa-f{1,4}){1,3})|((:0-9A-Fa-f{1,4})?:((250-5|20-4d|1dd|1-9?d)(.(250-5|20-4d|1dd|1-9?d)){3}))|:))|((0-9A-Fa-f{1,4}:){3}(((:0-9A-Fa-f{1,4}){1,4})|((:0-9A-Fa-f{1,4}){0,2}:((250-5|20-4d|1dd|1-9?d)(.(250-5|20-4d|1dd|1-9?d)){3}))|:))|((0-9A-Fa-f{1,4}:){2}(((:0-9A-Fa-f{1,4}){1,5})|((:0-9A-Fa-f{1,4}){0,3}:((250-5|20-4d|1dd|1-9?d)(.(250-5|20-4d|1dd|1-9?d)){3}))|:))|((0-9A-Fa-f{1,4}:){1}(((:0-9A-Fa-f{1,4}){1,6})|((:0-9A-Fa-f{1,4}){0,4}:((250-5|20-4d|1dd|1-9?d)(.(250-5|20-4d|1dd|1-9?d)){3}))|:))|(:(((:0-9A-Fa-f{1,4}){1,7})|((:0-9A-Fa-f{1,4}){0,5}:((250-5|20-4d|1dd|1-9?d)(.(250-5|20-4d|1dd|1-9?d)){3}))|:)))(%.+)?s*(\/(d|dd|10-1d|120-8))?$/;const cloudRegEx new RegExp(/:\/\/.*\.(screenconnect)\.com/i);const hostedrmmRegEx new RegExp(/:\/\/.*\.(hostedrmm)\.com/i);/** JavaScript Libraries **/if (typeof ipaddr undefined) SC.util.includeScript(extensionContext.baseUrl + ipaddr.min.js); // See javascript file for Copyright information and permission notice./**************************//** Custom top modal dialog to show alert type messages in modal dialog on top of existing modal dialogs **/function setupTopModalDialog(disable){ if (!disable) { eval(SC.dialog.showModalDialogRawOnTop + SC.dialog.showModalDialogRaw.toString().replace(SC.dialog.hideModalDialog();,).replace(/hideModalDialog/g,hideTopModalDialog)); eval(SC.dialog.hideTopModalDialog + SC.dialog.hideModalDialog.toString().replace(/getModalDialog/g,getTopModalDialog)); SC.dialog.getTopModalDialog function() { return Array.prototype.map.call(window.document.querySelectorAll(#dialog),function(_){return _;}).pop(); }; } else { delete SC.dialog.showModalDialogRawOnTop; delete SC.dialog.hideTopModalDialog; delete SC.dialog.getTopModalDialog; }}function alertModal(message){ if (!SC.dialog.showModalDialogRawOnTop) setupTopModalDialog(); SC.dialog.showModalDialogRawOnTop( message.subClass || MessageBox, message.titlePanel || SC.dialog.createTitlePanel(message.title || SC.resErrorPanel.Title), message.contentPanel || SC.dialog.createContentPanel($div(message.content || message)), message.buttonPanel || SC.dialog.createButtonPanel(message.button || OK,message.extraButtons || null) , message.onExecProc || function(eventArgs){ SC.dialog.hideTopModalDialog(); }, message.onQueryProc || null, message.onHideProc || function(){ if (SC.dialog.getTopModalDialog() SC.dialog.getModalDialog()) setupTopModalDialog(true); } );}/**********************************************//** Cookie Settings Management Functions **/function loadExtCookieSettings(){ var cookieSettings JSON.parse(SC.util.getCookieValue(extensionId)); for (var cs in cookieSettings) { extensionContext.settingValuescs cookieSettingscs; }}function saveExtCookieSetting(settingName){ var cookieSettings JSON.parse(SC.util.getCookieValue(extensionId)); if (!cookieSettings) cookieSettings {}; cookieSettingssettingName extensionContext.settingValuessettingName; SC.util.setCookieValue(extensionId,JSON.stringify(cookieSettings),3650);}function deleteExtCookieSetting(settingName){ var cookieSettings JSON.parse(SC.util.getCookieValue(extensionId)); if (!cookieSettings) cookieSettings {}; delete cookieSettingssettingName; SC.util.setCookieValue(extensionId,JSON.stringify(cookieSettings),3650);}function clearExtCookieSettings(){ SC.util.setCookieValue(extensionId,,-1);}/******************************************//** Table Sorting Functions **/var sortBy {};function sortTable(table, col) { if (sortBy.table){ var oldSortCol document.querySelector(# + sortBy.table).tHead.rows0.cellssortBy.col || 0; SC.css.ensureClass(oldSortCol,Ascending,false); SC.css.ensureClass(oldSortCol,Descending,false); } if (sortBy.table table.id && sortBy.col col){ sortBy.dir -((+sortBy.dir) || -1); } else { sortBy.table table.id; sortBy.col col; sortBy.dir 1; } if (sortBy.dir ! 0) SC.css.ensureClass(table.tHead.rows0.cellscol,sortBy.dir > 0 ? Ascending : Descending, true); var tb table.tBodies0; var tr Array.prototype.slice.call(tb.rows, 0); tr tr.sort(function (a, b) { var aVal a.cellscol.order ? a.cellscol.order : a.cellscol.textContent; var bVal b.cellscol.order ? b.cellscol.order : b.cellscol.textContent; return sortBy.dir * (typeof aVal number ? aVal - bVal : aVal.localeCompare(bVal)); }); for(var i0; itr.length; ++i){ tb.appendChild(tri); }}function makeSortable(table) { var th table.tHead, i; th && (th th.rows0) && (th th.cells); if (th) i th.length; else return; // if no `thead>` then do nothing while (--i > 0) (function (i) { SC.css.ensureClass(thi,Sortable,true); thi.addEventListener(click, function () {sortTable(table, i)}); }(i));}function makeAllSortable(parent) { parent parent || document.body; var t parent.getElementsByTagName(table), i t.length; while (--i > 0) makeSortable(ti);}/*****************************//** General Extension Functions **/function checkVersion(minVer, curVer) { if (typeof curVer + typeof minVer ! stringstring) return false; var acurVer.split(.), bminVer.split(.), i0, lenMath.max(a.length, b.length); for (; ilen; i++) { if ((ai && !bi && parseInt(ai) > 0) || (parseInt(ai) > parseInt(bi))) return true; else if ((bi && !ai && parseInt(bi) > 0) || (parseInt(ai) parseInt(bi))) return false; } return true;}function browserSupportsNumberInput(){ var i document.createElement(input),r; i.typenumber; i.setAttribute(value, t); return i.value ! i.getAttribute(value);}function addCacheBuster(url) { var cachebuster ?__CacheBuster + new Date().getTime(); if (url.indexOf(?) ! -1) return url.replace(?,cachebuster + &); if (url.indexOf(#) ! -1) return url.replace(#,cachebuster + #); return url + cachebuster;}function httpRequestJSONObjectAsync(theUrl, callback) { var r new XMLHttpRequest(); r.onreadystatechange function() { if (r.readyState 4 && r.status 200) { callback(JSON.parse(r.responseText)); } else if (r.readyState 4) { console.warn(Metaquery failed. (Extension: + extensionId + )); } }; r.open(GET, addCacheBuster(theUrl), true); r.send();}function getValueSetForMaxVersion(settings, maxVersion) { var rv ; var maxDVver 0.0; for (var v in settings){ if (checkVersion(v,maxVersion) && checkVersion(maxDVver,v)) { maxDVver v; rv settingsv; } } return rv;}function checkIPList(str) { var tokens str.split(,); for (var i0; itokens.length; ++i){ if (!regExIPv4.test(tokensi) && !regExIPv6.test(tokensi)) return false; } return true;}function cleanKeyName(keyName){ return keyName.replace(/\./g,_).replace(/\//g,_);}function displayNotice(title,noticeTextOrContentProc,buttonText,buttonCommand,buttonPanelErrorOrContentProc){ var titlePanel SC.dialog.createTitlePanel(title); var mainContentPanel SC.dialog.createContentPanel(typeof noticeTextOrContentProc string ? $div(noticeTextOrContentProc) : null); if (typeof noticeTextOrContentProc function) noticeTextOrContentProc(mainContentPanel); var buttonPanel SC.dialog.createButtonPanel(); var button SC.ui.addElement(buttonPanel, INPUT, { type: button, value: buttonText, _commandName: buttonCommand || Close }); switch (typeof buttonPanelErrorOrContentProc){ case string: SC.dialog.setButtonPanelError(buttonPanel,buttonPanelErrorOrContentProc); break; case function: buttonPanelErrorOrContentProc(buttonPanel); break; } SC.dialog.showModalDialogRaw(MessageBox,titlePanel, mainContentPanel, buttonPanel); button.focus();}function userIPIsInIPList(ipList, userIP) { if (typeof ipaddr ! object) { return null; } var addr ipaddr.parse(userIP); var ips ipList.split(,); for (var i in ips){ var ip ipsi; if (ip.indexOf(/) 0) { var checkIP ipaddr.parse(ip); if (addr.kind() checkIP.kind() && addr.match(checkIP,addr.kind() ipv6 ? 128 : 32)) return true; } else { var subnet ipaddr.parseCIDR(ip); if (addr.kind() subnet0.kind() && addr.match(subnet)) return true; } } return false;}function getValidationClass(element){ var e element; var v e.value, n e.id, s e.getAttribute(savedValue), d e.getAttribute(defaultValue), t e.getAttribute(keyType); if (v s && v d) return IsDefault; if (v s) return Unchanged; if (v d) return ToDefault; switch (t){ case WebServerAddressableUri: if (!webServerAddressableUriRegex.test(v)) return Invalid; break; case RelayAddressableUri: if (!relayAddressableUriRegex.test(v)) return Invalid; break; case WebServerListenUri: case WebServerAlternateListenUri: if (!webServerListenUriRegex.test(v)) return Invalid; break; case RelayListenUri: if (!relayListenUriRegex.test(v)) return Invalid; break; case IPList: if (!checkIPList(v)) return Invalid; else if (userIPIsInIPList(v,userIPAddress) (n.indexOf(Block) > -1)) return PartialValidation; else return Validated; break; case Number: if (!numberRegex.test(v)) return Invalid; break; case DuoIntegrationKey: case DuoSecretKey: case DuoApiHostname: break; } return Changed;}function validateEntry(event){ if (!event.srcElement.getAttribute(keyType)) return; var validationClasses NoValidation, IsDefault, ToDefault, Unchanged, Changed, Validated, PartialValidation, Invalid ; var validation ; validation0 getValidationClass(event.srcElement); for (var cn in validationClasses){ SC.css.ensureClass(event.srcElement,validationClassescn,validation.indexOf(validationClassescn) > -1); }}function addRowsToTable (table,keys,keyInfo,location){ var sectionName location ? location.replace(/^0-9a-zA-Z+/g,-) + _ : ; var rowNum 0; for (var key in keys) { if (keyInfokey.show.indexOf(serverEnvironment) -1) continue; if (keyInfokey.isAdvanced true && !showAdvancedSettings) continue; if (!checkVersion(keyInfokey.minVer,SC.context.productVersion)) continue; var keyValue keyskey #KeyNotPresent ? : keyskey; var keyValueType keyInfokey.valueType; var keyValueEditor ; var keyDV keyInfokey.defaultValue; var keyDVText keyDV && keyInfokey.defaultValueInfo ? keyInfokey.defaultValueInfo : keyDV; var valueTip SC.util.formatString(SC.resExtension.EditWebConfigAppSettings.CurrentValueString,keyValue) + \n + SC.util.formatString(SC.resExtension.EditWebConfigAppSettings.DefaultValueString,keyDVText); var keyTip keyInfokey.toolTip.replace(/\\n/g,\n) + \n + valueTip; rowNum++; switch (keyValueType) { case IPList: valueTip SC.util.formatString(SC.resExtension.EditWebConfigAppSettings.IPListTipMessageFormat,key.indexOf(Block) > -1 ? NOT : ,userIPAddress) + \n + valueTip + \n + SC.resExtension.EditWebConfigAppSettings.IPListTipValidationFormat.replace(/\|/g,\n); keyValueEditor SC.ui.createElement(TEXTAREA,{rows:1}); break; case Number: keyValueEditor SC.ui.createElement(INPUT,{id:sectionName + key,type:number,keyType:keyValueType,min:0}); break; case Select: keyValueEditor SC.ui.createElement(SELECT,{title:valueTip}); if (keyskey #KeyNotPresent) SC.ui.addElement(keyValueEditor,OPTION,{ value:, _innerText:Not Present, selected:true, title:Not Present }); var kvOptions getValueSetForMaxVersion(keyInfokey.validValues,SC.context.productVersion); for(var kvo in kvOptions) { SC.ui.addElement(keyValueEditor,OPTION,{ value:kvo, _innerText:kvo, selected:(keyValuekvo), title:kvOptionskvo }); } break; case CommaSeparatedValues: keyValueEditor SC.ui.createElement(ul,{className:csvEditor}); var validValues getValueSetForMaxVersion(keyInfokey.validValues,SC.context.productVersion); for(var v in validValues) { var varCheck SC.ui.createElement(INPUT,{ type:checkbox, initChecked:false, setting:v, id:sectionName + key+v, keyType:keyValueType }); if (keyValue.split(,).indexOf(v) > 0){ varCheck.checkedtrue; varCheck.initChecked true; } var cbLabel SC.ui.createElement(LABEL,{_innerText: v, title:validValuesv}); if (keyDV.split(,).indexOf(v) > 0) { cbLabel.style.fontWeight bold; } SC.ui.addElement(keyValueEditor, li,varCheck,cbLabel); } break; case WebServerListenUri: case WebServerAlternateListenUri: case RelayListenUri: valueTip valueTip + \n + SC.resExtension.EditWebConfigAppSettings.UriTipValidationFormat.replace(/\|/g,\n); keyValueEditor SC.ui.createElement(INPUT,{type:url}); break; case WebServerAddressableUri: case RelayAddressableUri: valueTip valueTip + \n + SC.resExtension.EditWebConfigAppSettings.UriTipValidationFormat.replace(/\|/g,\n); keyValueEditor SC.ui.createElement(INPUT,{type:url}); break; case CryptoKey: if (!SC.context.enableCryptoKeySetting) continue; keyValueEditor SC.ui.createElement(TEXTAREA,{type:CryptoKey}); keyValueEditor.style.height 100px; break; case DuoIntegrationKey: case DuoSecretKey: case DuoApiHostname: keyValueEditor SC.ui.createElement(INPUT, { type:text }); break; default: keyValueEditor SC.ui.createElement(INPUT,{type:text,disabled:true,title:key + is not expected.}); } keyValueEditor.setAttribute(id,sectionName + key); keyValueEditor.setAttribute(title,valueTip); keyValueEditor.setAttribute(value,keyValue); keyValueEditor.setAttribute(keyType,keyValueType); keyValueEditor.setAttribute(defaultValue,keyDV); keyValueEditor.setAttribute(savedValue,keyValue); if (Select,CommaSeparatedValues.indexOf(keyValueType) 0) SC.ui.setInnerText(keyValueEditor,keyValue); var row SC.ui.addElement(table,tr, {id:sectionName + key + Row}); var keyNameCol SC.ui.addElement(row,td,SC.ui.createElement(LABEL,{_innerText:key,title:keyTip})); var keyValueCol SC.ui.addElement(row,td,keyValueEditor); if (extensionContext.settingValues.ShowDefaultValueColumn true){ var keyDefaultCol SC.ui.addElement(row,td,{_innerText:typeof(keyDV) ! undefined ? keyDV : ,title:valueTip}); } var keyExampleCol SC.ui.addElement(row,td,{ _innerText: (keyskey #KeyNotPresent ? SC.resExtension.EditWebConfigAppSettings.KeyNotPresentText : ) + add key + key + value + (keyValue.length > 100 ? keyValue.replace(keyValue.slice(16,-16),...) : keyValue) + />, title:keyTip }); keyValueCol.order rowNum; }}function getChangedItems (keys, keyInfo, location) { var sectionName ; if (location) sectionName location.replace(/^0-9a-zA-Z+/g,-) + _; var jsObj {}; for (var key in keys){ var keyElement $(sectionName + key); if (keyElement null) { continue; } var newValue keyElement.value; var oldValue keyskey; var keyType keyElement.getAttribute(keyType); var keyName (location ? location + > : ) + key; if (keyType ! CommaSeparatedValues){ if (newValue && oldValue #KeyNotPresent) { continue; } if (newValue oldValue) { continue; } } if (keyInfokey.show.indexOf(serverEnvironment) -1) continue; if (keyInfokey.isAdvancedtrue && !showAdvancedSettings) continue; var isCritical keyInfokey.isCritical true; switch (keyType){ case CommaSeparatedValues: newValue Array.prototype.filter.call(keyElement.querySelectorAll(input),function(i){return i.checked;}).map(function(e){return e.setting;}).join(,); if (newValue oldValue || (newValue && oldValue #KeyNotPresent)) continue; if (newValue ) { isCritical false; newValue #RemoveKey; } break; case Select: var kvOptions getValueSetForMaxVersion(keyInfokey.validValues,SC.context.productVersion); if (!kvOptionsnewValue) { alertModal(SC.util.formatString(SC.resExtension.EditWebConfigAppSettings.InvalidSelectionAlertMessage,keyName,Object.keys(kvOptions).join(, ))); return false; } break; case IPList: if (newValue ) { isCritical false; newValue #BlankValue; break; } if (!checkIPList(newValue)) { alertModal(SC.util.formatString(SC.resExtension.EditWebConfigAppSettings.InvalidIPListAlertMessage,keyName)); return false; } if ((key.indexOf(Block) > -1) userIPIsInIPList(newValue,userIPAddress)) { alertModal(SC.util.formatString(SC.resExtension.EditWebConfigAppSettings.IPListDoesNotContainCurrentIPAlertMessage,keyName,userIPAddress)); return false; } break; case Number: if (!numberRegex.test(newValue)){ alertModal(SC.util.formatString(SC.resExtension.EditWebConfigAppSettings.NumberAlertMessage,keyName)); return false; } break; case WebServerAddressableUri: if (newValue ){ newValue #RemoveKey; isCritical false; break; } if (!webServerAddressableUriRegex.test(newValue)) { alertModal(SC.util.formatString(SC.resExtension.EditWebConfigAppSettings.AddressableUriAlertMessage,keyName,\n + currentURIs.WebServer)); return false; } break; case RelayAddressableUri: if (newValue ){ newValue #RemoveKey; isCritical false; break; } if (!relayAddressableUriRegex.test(newValue)) { alertModal(SC.util.formatString(SC.resExtension.EditWebConfigAppSettings.AddressableUriAlertMessage,keyName,\n + currentURIs.Relay)); return false; } break; case WebServerAlternateListenUri: if (newValue ){ newValue #RemoveKey; isCritical false; break; } case WebServerListenUri: if (newValue || !webServerListenUriRegex.test(newValue)) { alertModal(SC.util.formatString( SC.resExtension.EditWebConfigAppSettings.ListenUriAlertMessage,keyName,\n + currentURIs.WebServerUri.protocol + //+: + (currentURIs.WebServerUri.port ? ( currentURIs.WebServerUri.protocol http: ? 80 : 443 ) : currentURIs.WebServerUri.port ) + /)); return false; } isCritical true; break; case RelayListenUri: if (newValue || !relayListenUriRegex.test(newValue)) { alertModal(SC.util.formatString(SC.resExtension.EditWebConfigAppSettings.ListenUriAlertMessage,keyName,\nrelay://+: + SC.context.clp.p + /)); return false; } isCritical true; break; case CryptoKey: if (!SC.context.enableCryptoKeySetting) return false; isCritical true; if (newValue || newValue #RemoveKey) { alertModal(SC.resExtension.EditWebConfigAppSettings.EmptyAsymmetricKey); return false; } else { if(!confim(SC.resExtension.EditWebConfigAppSettings.ChangeAsymmetricKeyWarning)) { return false; } } break; case DuoIntegrationKey: case DuoSecretKey: case DuoApiHostname: if (newValue ) { newValue #RemoveKey; break; } break; default: alertModal(SC.util.formatString(SC.resExtension.EditWebConfigAppSettings.UnknownTypeAlertMessage,keyName)); return false; } if (isCritical){ if(!confirm(SC.util.formatString(SC.resExtension.EditWebConfigAppSettings.CriticalSettingUpdateConfirmationMessage,keyName,oldValue,newValue).replace(/\\n/g,\n))){ return false; } } jsObjkey newValue; settingsChanged true; } return jsObj;}/***** Event Handlers *****/SC.event.addGlobalHandler(SC.event.QueryCommandButtons,function (eventArgs) { switch (eventArgs.area) { case ExtrasPopoutPanel: if (SC.context.pageType AdministrationPage) { eventArgs.buttonDefinitions.push( { commandName: command_ + extensionId, text: SC.resExtension.EditWebConfigAppSettings.CommandText} ); } break; }});SC.event.addGlobalHandler(SC.event.ExecuteCommand, function (eventArgs) { switch(eventArgs.commandName) { case SelectTab_ + extensionId: var tabcontent document.getElementsByClassName(TabContent); for (i 0; i tabcontent.length; i++) { SC.ui.setVisible(tabcontenti,false); } var tablinks document.getElementsByClassName(TabLink); for (i 0; i tablinks.length; i++) { SC.ui.setSelected(tablinksi,false); } SC.ui.setSelected(eventArgs.commandElement,true); var activeContent document.querySelector(# + eventArgs.commandArgument + .TabContent); SC.ui.setVisible(activeContent,true); break; case command_ + extensionId: loadExtCookieSettings(); if (extensionContext.settingValues.HideServiceRestartNotice ! true) { displayNotice( SC.resExtension.EditWebConfigAppSettings.ServiceRestartNoticeTitle, SC.resExtension.EditWebConfigAppSettings.ServiceRestartNoticeMessage, SC.resExtension.EditWebConfigAppSettings.ServiceRestartNoticeButton, noticeAccepted_ + extensionId, function(buttonPanel){ var checkbox SC.ui.createElement(input,{type:checkbox}); SC.event.addHandler(checkbox,change,function(eventArgs){ buttonPanel.querySelector(inputtypebutton)._commandArgumenteventArgs.target.checked ? true : null; }); SC.ui.addContent(buttonPanel,$span(checkbox,SC.resExtension.EditWebConfigAppSettings.ServiceRestartNoticeDoNotShowText)); } ); break; } case noticeAccepted_ + extensionId: if (eventArgs.commandArgument) { extensionContext.settingValues.HideServiceRestartNotice true; saveExtCookieSetting(HideServiceRestartNotice); } case displaySettings_ + extensionId: SC.util.includeStyleSheet(extensionContext.baseUrl + Style.css); SC.service.EditWebConfigAppSettings_GetUserIPAddress(function(returnedIP){ userIPAddress returnedIP; SC.service.EditWebConfigAppSettings_GetUris(function(uriJSON){ var uris JSON.parse(uriJSON); currentURIs.WebServer uris.WebServerUri; currentURIs.WebServerUri SC.ui.createElement(A,{id:WebServerUri,href:uris.WebServerUri}); currentURIs.Relay uris.RelayUri; currentURIs.RelayUri SC.ui.createElement(A,{id:RelayUri,href:uris.RelayUri}); if (cloudRegEx.test(currentURIs.WebServer) || cloudRegEx.test(currentURIs.Relay)) serverEnvironment hosted; else if (hostedrmmRegEx.test(currentURIs.WebServer) || hostedrmmRegEx.test(currentURIs.Relay)) serverEnvironment hostedrmm; else serverEnvironment local; SC.service.EditWebConfigAppSettings_GetWebConfigFileContents(function(WebConfigContents){ dataUri SC.ui.createDataUri(SC.util.isCapable(SC.util.Caps.Safari) ? attachment/config : text/config, WebConfigContents); httpRequestJSONObjectAsync(extensionContext.baseUrl + Defaults.json,function(keyInfo){ var validKeys Object.keys(keyInfo) .filter(function(x){ return x ! LocationSettings && checkVersion(keyInfox.minVer,SC.context.productVersion) && keyInfox.show.indexOf(serverEnvironment) > 0 && (keyInfox.isAdvanced true ? showAdvancedSettings : true ) && (x ! AsymmetricKey || SC.context.enableCryptoKeySetting); }); SC.service.EditWebConfigAppSettings_GetEditableWebConfigAppSettingKeysAndValues(validKeys,keyInfo.LocationSettings.EditableSettings, function(json){ var allKeys JSON.parse(json); var keys allKeys.AppSettings; var lkeys allKeys.Locations; var showAdvancedSettingsButton SC.ui.createElement(a,{_innerText:SC.resExtension.EditWebConfigAppSettings.ShowAdvancedSettingsText}); showAdvancedSettingsButton.addEventListener(click,function(){ showAdvancedSettings true; SC.event.dispatchEvent(null,SC.event.ExecuteCommand,{commandName:displaySettings_ + extensionId}); }); var instructions $p(SC.resExtension.EditWebConfigAppSettings.DialogInstructions, (browserSupportsNumberInput() ? : + SC.resExtension.EditWebConfigAppSettings.NoNumberSupportMessage), (!showAdvancedSettings ? $span( , showAdvancedSettingsButton, .) : + SC.util.formatString(SC.resExtension.EditWebConfigAppSettings.YourIPAddressMessage,userIPAddress)) ); SC.dialog.showModalButtonDialog( EditWebConfigAppSettings, SC.resExtension.EditWebConfigAppSettings.DialogTitle, SC.resExtension.EditWebConfigAppSettings.DialogButtonText, Default, function (container) { container.addEventListener(keyup,function(event){validateEntry(event);}); container.addEventListener(mouseup,function(event){validateEntry(event);}); SC.ui.addContent(container, instructions); var WebConfigLinksContainer SC.ui.addElement(container, ul,{}); var WebConfigHelpLink SC.ui.createElement(A,{href:SC.resExtension.EditWebConfigAppSettings.WebConfigSettingsLinkHref,target:_blank, _innerText:SC.resExtension.EditWebConfigAppSettings.WebConfigSettingsLinkText}); var WebConfigDownloadLink SC.ui.createElement(A,{download:web.config,href:dataUri,_innerText:SC.resExtension.EditWebConfigAppSettings.WebConfigLinkText}); SC.ui.addElement(WebConfigLinksContainer,li,WebConfigDownloadLink); SC.ui.addElement(WebConfigLinksContainer,li,WebConfigHelpLink); if (showAdvancedSettings) { // Need to add tabs for Main AppSettings and individual Location AppSetting sections var tabs SC.ui.addElement(container,ul,{className:SectionTabs}); SC.ui.addElement(tabs,li,{innerText:AppSettings,id:TabLink_AppSettings,className:TabLink Selected,_commandName:SelectTab_ + extensionId,_commandArgument:AppSettings}); SC.ui.addElement(tabs,li,{innerText:Per-Page Settings,id:TabLink_PerPageSettings,className:TabLink,_commandName:SelectTab_ + extensionId,_commandArgument:PerPageSettings}); var pageSettingContainer SC.ui.addElement(container,dl,{id:PerPageSettings,className:TabContent}); for (var i0; i Object.keys(lkeys).length; i++){ // Avoid find and findIndex being provided as keys in IE when using Object.keys(obj) var lkeyName Object.keys(lkeys)i; var dt SC.ui.addElement(pageSettingContainer,dt,$span({innerText:lkeyName,id:SectionHeader_ + cleanKeyName(lkeyName),className:SectionHeader})); var dd SC.ui.addElement(pageSettingContainer,dd,{}); var dddiv SC.ui.addElement(dd,div,{}); var table SC.ui.addElement(dddiv,TABLE,{id:cleanKeyName(lkeyName)}); var thead SC.ui.addElement(table,thead,{}); var headerRow SC.ui.addElement(thead,tr,{}); SC.ui.addElement(headerRow,th,{_innerText:SC.resExtension.EditWebConfigAppSettings.KeyColumnTitle}); SC.ui.addElement(headerRow,th,{_innerText:SC.resExtension.EditWebConfigAppSettings.ValueColumnTitle}); SC.ui.addElement(headerRow,th,{_innerText:SC.resExtension.EditWebConfigAppSettings.SettingColumnTitle}); var tbody SC.ui.addElement(table,tbody,{}); addRowsToTable( tbody, lkeyslkeyName, keyInfo.LocationSettings.LocationslkeyName.AppSettings, lkeyName ); } SC.ui.setVisible(pageSettingContainer,false); } var tablecontainer SC.ui.addElement(container,DIV,{id:AppSettings,className:TabContent}) var table SC.ui.addElement(tablecontainer,TABLE,{}); var thead SC.ui.addElement(table,thead,{}); var headerRow SC.ui.addElement(thead,tr, {}); SC.ui.addElement(headerRow,th,{_innerText:SC.resExtension.EditWebConfigAppSettings.KeyColumnTitle}); SC.ui.addElement(headerRow,th,{_innerText:SC.resExtension.EditWebConfigAppSettings.ValueColumnTitle}); if (extensionContext.settingValues.ShowDefaultValueColumn true){ SC.ui.addElement(headerRow,th,{_innerText:SC.resExtension.EditWebConfigAppSettings.DefaultColumnTitle}); } SC.ui.addElement(headerRow,th,{_innerText:SC.resExtension.EditWebConfigAppSettings.SettingColumnTitle}); var tbody SC.ui.addElement(table,tbody,{}); addRowsToTable(tbody,keys,keyInfo); SC.ui.setVisible(tablecontainer,true); }, function (eventArgs) { if (eventArgs.commandName SelectTab_ + extensionId) return; var appSettingsJsObj getChangedItems(keys,keyInfo); if (appSettingsJsObj false) return; var locationJsObj {}; for (var i0; i Object.keys(lkeys).length; i++){ var lkeyName Object.keys(lkeys)i; var thisLocObj getChangedItems(lkeyslkeyName,keyInfo.LocationSettings.LocationslkeyName.AppSettings,lkeyName); if (thisLocObj false) return; if (Object.keys(thisLocObj).length > 0) locationJsObjlkeyName thisLocObj; }; if (settingsChanged) { SC.service.EditWebConfigAppSettings_SetWebConfigAppSettingValues( JSON.stringify(appSettingsJsObj), JSON.stringify(locationJsObj), function () { SC.dialog.showModalActivityAndReload(Save, true, window.location.href); } ); } else { SC.dialog.hideModalDialog(); } } ); makeAllSortable($(dialog)); SC.dialog.setButtonPanelError(SC.ui.findDescendent(SC.dialog.getModalDialog(),function(_){return _.className && _.className.indexOf(ButtonPanel) > -1;}),{message:SC.resExtension.EditWebConfigAppSettings.ServiceRestartNoticeTitle}); }); }); }); }); }); break; }});/** Extend Extension Options **/var extendedExtensionOptions {};/* Option Settings Below */extendedExtensionOptions.helpUrl https://help.screenconnect.com/Extension:Edit_Web.Config_AppSettings;extendedExtensionOptions.extensionResourceID EditWebConfigAppSettings;/* Option Settings Above */extendedExtensionOptions.extensionIdextensionContext.baseUrl.split(/).slice(-2)0;SC.resHelpPanel.Link+extendedExtensionOptions.extensionId+.UrlextendedExtensionOptions.helpUrl;SC.event.addGlobalHandler(SC.event.QueryCommandButtonState,function(eventArgs){ if(eventArgs.commandNameEditExtensionSettings&&eventArgs.commandContext.extensionInfo.ExtensionIDextendedExtensionOptions.extensionId&&eventArgs.commandElement._commandNameEditExtensionSettings){ if(extendedExtensionOptions.extensionResourceID&&extendedExtensionOptions.extensionResourceID.length) SC.ui.addElement(eventArgs.target.parentElement,A,{_commandName:command_+extensionId,_innerText:SC.resExtension.+extendedExtensionOptions.extensionResourceID+.CommandText}); SC.ui.addElement(eventArgs.target.parentElement,A,{_commandName:NavigateHelpLink,_commandArgument:extendedExtensionOptions.extensionId,_innerText:SC.resCommand.Help.Text.replace( ▽,)}); }});/******************************/});/script>script>SC.extension.addInitializeProc(e21779ee-da3f-428f-ad1e-5d5b5fac54ea, function (extensionContext) {SC.event.addGlobalHandler(SC.event.QueryCommandButtons, function (eventArgs) { switch (eventArgs.area) { case ExtrasPopoutPanel: if (SC.context.pageType GuestPage) eventArgs.buttonDefinitions.push( { commandName: ShowBuildInstallerDialog } ); break; }});SC.event.addGlobalHandler(SC.event.ExecuteCommand, function (eventArgs) { switch (eventArgs.commandName) { case ShowBuildInstallerDialog: SC.installer.showBuildDialog(); break; }});});/script>script>SC.extension.addInitializeProc(a7b5a8f2-9fd0-489c-89d0-3c1888fde971, function (extensionContext) {SC.event.addGlobalHandler(SC.event.PreRender, function (eventArgs) { if (SC.context.pageType HostPage) { SC.util.includeStyleSheet(extensionContext.baseUrl + DiagnosticsNewStyle.css); }});function getValidEventLogCount() { var tempValue extensionContext.settingValues.EventLogRequestCount; if ((tempValue > 0) && (tempValue 100)) return tempValue; else return 10;}SC.event.addGlobalHandler(SC.event.QueryCommandButtons, function (eventArgs) { switch (eventArgs.area) { case HostDetailTabList: eventArgs.buttonDefinitions.push( { commandName: Select, commandArgument: Processes, text: SC.resDiagnostics.ProcessTab.Label, imageUrl: extensionContext.baseUrl + Images/Processes.png }, { commandName: Select, commandArgument: Software, text: SC.resDiagnostics.SoftwareTab.Label, imageUrl: extensionContext.baseUrl + Images/Software.png }, { commandName: Select, commandArgument: EventLog, text: SC.resDiagnostics.EventLogTab.Label, imageUrl: extensionContext.baseUrl + Images/EventLog.png }, { commandName: Select, commandArgument: Services, text: SC.resDiagnostics.ServicesTab.Label, imageUrl: extensionContext.baseUrl + Images/Services.png } ); break; case ProcessesButtons: eventArgs.buttonDefinitions.push({ commandName: GetInfo, commandArgument: Processes, text: SC.resDiagnostics.ProcessTab.Button }); break; case SoftwareButtons: eventArgs.buttonDefinitions.push({ commandName: GetInfo, commandArgument: Software, text: SC.resDiagnostics.SoftwareTab.Button }); break; case EventLogButtons: eventArgs.buttonDefinitions.push({ commandName: GetInfo, commandArgument: EventLog, text: SC.resDiagnostics.EventLogTab.Button }); break; case ServicesButtons: eventArgs.buttonDefinitions.push({ commandName: GetInfo, commandArgument: Services, text: SC.resDiagnostics.ServicesTab.Button }); break; }});SC.event.addGlobalHandler(SC.event.InitializeTab, function (eventArgs) { if (isMyTab(eventArgs.tabName)) { SC.command.queryAndAddCommandButtons(eventArgs.container, eventArgs.tabName + Buttons); SC.ui.addElement(eventArgs.container, DIV, {id: lastUpdateContainer}); SC.ui.addElement(eventArgs.container, DIV, {id: dataContainer}); var filterContainer $div({className: filterContainer}); var filterInput $input({className: EventLogFilterInput, type: TEXT}); var filterLabel $span({innerHTML: SC.resDiagnostics.Filter.Label}); filterInput.onkeyup function (value) { ProcessFilterInput(filterInput.value); } SC.ui.addContent(filterContainer, filterLabel); SC.ui.addContent(filterContainer, filterInput); SC.ui.addContent(eventArgs.container, filterContainer); SC.ui.addElement(eventArgs.container, TABLE, {id: dataTable}); }});SC.event.addGlobalHandler(SC.event.RefreshTab, function (eventArgs) { if (isMyTab(eventArgs.tabName)) { SC.ui.clear($(dataContainer)); SC.ui.clear($(lastUpdateContainer)); SC.ui.clear($(dataTable)); SC.ui.findDescendent( eventArgs.container, function (e) { return e._commandName GetInfo; } )._commandArgument { type: eventArgs.tabName, operatingSystemName: eventArgs.session.GuestOperatingSystemName }; displayDiagnosticInformation( getLatestDiagnosticEvent( eventArgs.sessionDetails, eventArgs.tabName ), eventArgs.sessionDetails.BaseTime ); }});SC.event.addGlobalHandler(SC.event.ExecuteCommand, function (eventArgs) { switch (eventArgs.commandName) { case GetInfo: window.addEventToSessions( window.getSessionGroupUrlPart()0, SC.types.SessionType.Access, window.getSessionUrlPart(), SC.types.SessionEventType.QueuedCommand, null, getInputCommand( eventArgs.commandArgument.type, eventArgs.commandArgument.operatingSystemName ), false, false, true ); break; }});function ProcessFilterInput(value) { var dataTable document.getElementById(dataTable); for (var i dataTable.getElementsByTagName(th).length; i dataTable.children.length; i++) { var element dataTable.childreni; //IE/opera dont support .includes() //if(!element.innerHTML.toUpperCase().includes(value.toUpperCase())) if (element.innerHTML.toUpperCase().search(value.toUpperCase()) -1) element.style.display none; else element.style.display ; }}function getInputCommand(diagnosticType, operatingSystem) { var headers getHeaders(operatingSystem); headers.DiagnosticType diagnosticType; var commandText getDiagnosticCommandText(headers); var emptyLinePrefix ; if (headers.Processor sh) emptyLinePrefix echo ; else { emptyLinePrefix echo ; commandText $Host.UI.RawUI.BufferSize New-Object Management.Automation.Host.Size (500, 25) + \n + commandText; } return #! + headers.shaBang + \n + #maxlength50000000 + \n + #timeout90000 + \n + headers.modifier + DIAGNOSTIC-RESPONSE/1 + headers.delimiter + \n + headers.modifier + DiagnosticType: + headers.DiagnosticType + headers.delimiter + \n + headers.modifier + ContentType: + headers.ContentType + headers.delimiter + \n + emptyLinePrefix + \n + commandText;}function getHeaders(operatingSystem) { if (operatingSystem.indexOf(Windows) > 0 || operatingSystem.indexOf(Server) > 0) return { Processor: ps, Interface: powershell, ContentType: xml, shaBang: ps, modifier: echo \, delimiter: \ }; else if (operatingSystem.indexOf(Linux) > 0) return { Processor: sh, Interface: linux, ContentType: text, shaBang: sh, modifier: echo , delimiter: }; else if (operatingSystem.indexOf(Mac) > 0) return { Processor: sh, Interface: osx, ContentType: text, shaBang: sh, modifier: echo , delimiter: };}function isMyTab(tabName) { switch (tabName) { case Processes: case Software: case EventLog: case Services: return true; default: return false; }}function isDiagnosticContent(eventData) { return (eventData.startsWith(DIAGNOSTIC-RESPONSE/1) || eventData.startsWith(\ufeffDIAGNOSTIC-RESPONSE/1) ? true : false);}function getLatestDiagnosticEvent(sessionDetails, diagnosticEventType) { var versionParts SC.context.productVersion.split(.); if (versionParts && versionParts.length > 1 && SC.util.isVersion({major: 22, minor: 9}, null, {major: versionParts0, minor: versionParts1})) { return sessionDetails.Events .filter(function (e) { return e.EventType SC.types.SessionEventType.RanCommand && isDiagnosticContent(e.Data) && parseDataHeaders(e.Data).DiagnosticType.trim() diagnosticEventType; }) .sort(function (x, y) { return x.Time - y.Time; }) 0; } else { return sessionDetails.Connections .map(function (c) { return c.Events; }) .reduce(function (outputArray, events) { Array.prototype.push.apply(outputArray, events); return outputArray; }, ) .filter(function (e) { return e.EventType SC.types.SessionEventType.RanCommand && isDiagnosticContent(e.Data) && parseDataHeaders(e.Data).DiagnosticType.trim() diagnosticEventType; }) .sort(function (x, y) { return x.Time - y.Time; }) 0; }}function parseDataHeaders(eventData) { var currentIndex 0; var headers {}; var isStatusLine true; while (true) { var nextNewLineIndex eventData.indexOf(\n, currentIndex); if (isStatusLine) { isStatusLine false; } else if (nextNewLineIndex currentIndex + 2 || nextNewLineIndex 0) { break; } else { var lineParts eventData.substring(currentIndex, nextNewLineIndex).split(: ); headerslineParts0 lineParts1; } currentIndex nextNewLineIndex + 1; } return headers;}function displayDiagnosticInformation(latestDiagnosticEvent, baseTime) { if (latestDiagnosticEvent ! null) { var headers parseDataHeaders(latestDiagnosticEvent.Data); if (headers.ContentType.trim() xml) displayDataXml(getEventDataXml(latestDiagnosticEvent.Data)); else displayDataText(getEventDataText(latestDiagnosticEvent.Data)); $(lastUpdateContainer).innerHTML SC.resDiagnostics.LastUpdateField.Label + new Date(latestDiagnosticEvent.Time + baseTime); }}function getEventDataXml(eventData) { return parseXml(eventData.substring(eventData.indexOf(?xml), eventData.length));}function displayDataXml(xml) { var x xml.getElementsByTagName(Object); var iterationLength 0; try { iterationLength x0.children.length; } catch (error) { iterationLength x0.childNodes.length; } //because IE/Edge are dumb if (isUsingInternetExplorerOrEdge()) { for (j 0; j iterationLength; j++) { var child x0.childNodesj; if (child.nodeType ! 1) continue; SC.ui.addElement($(dataTable), th, { id: dataTableHeader, innerHTML: x0.childNodesj.attributes.Name.nodeValue }); } for (i 0; i x.length; i++) { SC.ui.addElement($(dataTable), tr, {id: dataRow + i}); for (j 0; j xi.childNodes.length; j++) { var childX xi.childNodesj; if (childX.nodeType ! 1) continue; SC.ui.addElement($(dataRow + i), td, { id: dataTableData, innerHTML: xi.childNodesj.textContent }); } } } else { for (j 0; j x0.children.length; j++) { SC.ui.addElement($(dataTable), th, { id: dataTableHeader, innerHTML: x0.childrenj.attributes.Name.nodeValue }); } for (i 0; i x.length; i++) { SC.ui.addElement($(dataTable), tr, {id: dataRow + i}); for (j 0; j xi.children.length; j++) { SC.ui.addElement($(dataRow + i), td, {id: dataTableData, innerHTML: xi.childrenj.innerHTML}); } } }}function getEventDataText(eventData) { return parseText( eventData .split(\n) .splice(3, eventData.length) .join(\n) );}function displayDataText(eventData) { for (var category in eventData0) { SC.ui.addElement($(dataTable), th, {id: dataTableHeader, innerHTML: category}); } for (var i 0; i eventData.length; i++) { SC.ui.addElement($(dataTable), tr, {id: dataRow + i}); for (var item in eventDatai) { SC.ui.addElement($(dataRow + i), td, {id: dataTableData, innerHTML: eventDataiitem}); } }}function parseXml(xml) { var dom null; if (window.DOMParser) { try { dom (new DOMParser()).parseFromString(xml, text/xml); } catch (e) { dom null; } } else if (window.ActiveXObject) { try { dom new ActiveXObject(Microsoft.XMLDOM); dom.async false; if (!dom.loadXML(xml)) // parse error .. window.alert(dom.parseError.reason + dom.parseError.srcText); } catch (e) { dom null; } } else alert(cannot parse xml string!); return dom;}function parseText(data) { var lines data.split(\n); var result ; var headers lines1.split(,); for (var i 3; i lines.length; i++) { var obj {}; var currentline linesi.split(,); for (var j 0; j headers.length; j++) { objheadersj currentlinej; } result.push(obj); } return result;}function isUsingInternetExplorerOrEdge() { var ua window.navigator.userAgent; var msie ua.indexOf(Trident); if (ua.indexOf(Trident) > 0 || ua.indexOf(Edge) > 0) return true; else return false;}//ripped directly from http://stackoverflow.com/questions/6108819/javascript-timestamp-to-relative-time-eg-2-seconds-ago-one-week-ago-etc-bestfunction timeDifference(current, previous) { var msPerMinute 60 * 1000; var msPerHour msPerMinute * 60; var msPerDay msPerHour * 24; var msPerMonth msPerDay * 30; var msPerYear msPerDay * 365; var elapsed current - previous; if (elapsed msPerMinute) return Math.abs(Math.round(elapsed / 1000)) + seconds ago; else if (elapsed msPerHour) return Math.round(elapsed / msPerMinute) + minutes ago; else if (elapsed msPerDay) return Math.round(elapsed / msPerHour) + hours ago; else if (elapsed msPerMonth) return approximately + Math.round(elapsed / msPerDay) + days ago; else if (elapsed msPerYear) return approximately + Math.round(elapsed / msPerMonth) + months ago; else return approximately + Math.round(elapsed / msPerYear) + years ago;}function getDiagnosticCommandText(headers) { switch (headers.Processor + / + headers.Interface + / + headers.ContentType + / + headers.DiagnosticType) { case ps/powershell/xml/Processes: return Get-Process | select ProcessName, Id, NPM, PM, WS, VM | Sort ProcessName | ConvertTo-Xml -As Stream; case ps/powershell/xml/EventLog: return Get-EventLog Application -newest + getValidEventLogCount() + | Select TimeWritten, EntryType, Source, Message | Sort TimeWritten -Descending | ConvertTo-Xml -As Stream; case ps/powershell/xml/Services: return Get-Service | select displayName, Name, Status | Sort DisplayName | ConvertTo-Xml -As Stream; case ps/powershell/xml/Software: return $registryPath if (Environment::Is64BitOperatingSystem) { HKLM:\\Software\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\*, HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\* } else { HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\* } Get-ItemProperty -Path $registryPath | Select @{NIdentifyingNumber;E{$_.PSChildName}}, @{NName;E{$_.DisplayName}}, @{NVendor;E{$_.Publisher}}, @{NVersion;E{$_.DisplayVersion}} | Where-Object{!string::IsNullOrEmpty($_.Name)} | Sort Name | ConvertTo-Xml -As Stream; case sh/linux/text/Processes: return ps -eo \%U,%p,%x,%C,%c\; case sh/linux/text/EventLog: return echo + headers.DiagnosticType + ; dmesg -T | tail - + getValidEventLogCount(); case sh/linux/text/Services: return echo + headers.DiagnosticType + ; ls /etc/init.d; case sh/linux/text/Software: return echo + headers.DiagnosticType + ; dpkg --get-selections; case sh/osx/text/Processes: return ps -eo \pid,%cpu,command\; case sh/osx/text/EventLog: return echo + headers.DiagnosticType + ; syslog -C; case sh/osx/text/Services: return echo + headers.DiagnosticType + ; launchctl list; case sh/osx/text/Software: return echo + headers.DiagnosticType + ; ls /Applications; default: throw unknown os; }}});/script>script>SC.extension.addInitializeProc(850c08be-d904-48d4-977a-5c2fcb277fd4, function (extensionContext) {SC.event.addGlobalHandler(SC.event.QueryCommandButtons, function (eventArgs) { switch (eventArgs.area) { case ExtrasPopoutPanel: if (SC.context.pageType HostPage) eventArgs.buttonDefinitions.push( { commandName: DownloadScreenConnector } ); break; }});SC.event.addGlobalHandler(SC.event.ExecuteCommand, function (eventArgs) { switch (eventArgs.commandName) { case DownloadScreenConnector: SC.util.launchUrl(extensionContext.baseUrl + Download.ashx); break; }});});/script>script>SC.extension.addInitializeProc(0586dae2-3bf3-4fd0-a23d-4c0bec73b053, function (extensionContext) {/** Extension Constants and Globals **/const extensionIdextensionContext.baseUrl.split(/).slice(-2)0;var activeEditor null;/** Extension Options **/SC.resHelpPanel.Link+extensionId+.Urlhttps://help.screenconnect.com/Extension:Edit_Web.Config_AppSettings;SC.event.addGlobalHandler(SC.event.QueryCommandButtonState,function(e){ if(e.commandElement._commandNameEditExtensionSettings&&e.commandContext.extensionInfo.ExtensionIDextensionId){ SC.ui.addElement(e.target.parentElement,A,{_commandName:command_+extensionId,_commandArgument:WebConfig,_innerText:SC.resExtension.ConfigEditor.WebConfig.CommandText}); SC.ui.addElement(e.target.parentElement,A,{_commandName:command_+extensionId,_commandArgument:AppConfig,_innerText:SC.resExtension.ConfigEditor.AppConfig.CommandText}); SC.ui.addElement(e.target.parentElement,A,{_commandName:NavigateHelpLink,_commandArgument:extensionId,_innerText:SC.resCommand.Help.Text.replace( ▽,)}); }});/** Helper Methods **/function addCacheBuster(url) { var cachebuster __CacheBuster + new Date().getTime(); return ( url.indexOf(?) ! -1 ? url.split(?)0 + ? + cachebuster + & + url.split(?)1 : (url.indexOf(#) ! -1 ? url.split(#)0 + ? + cachebuster + # + url.split(#)1 : url + ? + cachebuster ) );}function httpRequestJSONObjectAsync(theUrl, callback){ var xmlHttp new XMLHttpRequest(); xmlHttp.onreadystatechange function() { if (xmlHttp.readyState 4 && xmlHttp.status 200) { callback(JSON.parse(xmlHttp.responseText)); } else if (xmlHttp.readyState 4) { console.warn(Metaquery failed); } }; xmlHttp.open(GET, addCacheBuster(theUrl), true); xmlHttp.send();}/** Event Handlers **//* // Removed while transitioning to an official extension to avoid confusion with current supported extensions.SC.event.addGlobalHandler(SC.event.QueryCommandButtons,function (e) { if (e.areaExtrasPopoutPanel && SC.context.pageType AdministrationPage) e.buttonDefinitions.push({ commandName: command_ + extensionId, commandArgument: WebConfig, text: SC.resExtension.ConfigEditor.WebConfig.CommandText },{ commandName: command_ + extensionId, commandArgument: AppConfig, text: SC.resExtension.ConfigEditor.AppConfig.CommandText });});*/SC.event.addGlobalHandler(SC.event.ExecuteCommand, function (e) { if (e.commandName command_ + extensionId) { activeEditor e.commandArgument; SC.event.addHandler(window, message, messageHandler); SC.dialog.showModalPage( SC.resExtension.ConfigEditor.+e.commandArgument+.CommandText, addCacheBuster(extensionContext.baseUrl + ConfigEditor.aspx?DMparent&Type+e.commandArgument), function(e){ activeEditor null; SC.event.removeHandler(window, message, messageHandler); } ); }});var messageHandler function(e) { if (document.querySelector(iframe).src.startsWith(e.origin)) { switch (e.data.commandName) { case GetLiveConfigs: SC.service.ConfigEditorGetConfigFiles(function(response){ e.source.postMessage({ commandName: processLoadedData, commandArgument: response },window.location.origin); }); break; case SaveUpdatedConfigs: SC.service.ConfigEditorSaveConfigFiles( e.data.commandArgumentapp.config, e.data.commandArgumentweb.config, function(_){ var response _ ? { updatedAppConfigXml:e.data.commandArgumentapp.config, updatedWebConfigXml:e.data.commandArgumentweb.config } : _; e.source.postMessage({ commandName: processSaveComplete, commandArgument: response },window.location.origin); } ); break; } }};});/script>title> ScreenConnect Remote Support Software/title>/head>body> div classHiddenPanel>/div> script> SC.ui.setVisible(document.body, false); /script> div classOuterPanel> div classHeaderPanel>/div> div classNavigationPanel ArrowNavigation tabindex10>/div> div classMainPanel> div classContentPanel> div> div classActionPanel>/div> /div> div classInfoPanel>/div> /div> /div> /div> script> SC.context.scriptBaseUrl SC.util.getBaseUrl($(defaultScript).src); /script> script> SC.event.addGlobalHandler(SC.event.ExecuteCommand, function (eventArgs) { var session null; var hostAccessToken null; switch (eventArgs.commandName) { case JoinBySessionID: session window.getSessionInfo().Sessions.filter(function (s) { return s.SessionID eventArgs.commandArgument; })0; break; case JoinByTag: var taggedSessionInfo window.getTaggedSessionInfo(eventArgs.commandArgument); hostAccessToken taggedSessionInfo.HostAccessToken; session window.getSessionInfo().Sessions.filter(function (s) { return s.SessionID taggedSessionInfo.SessionID || (taggedSessionInfo.Code && s.Code.toLowerCase() taggedSessionInfo.Code.toLowerCase()); })0; break; } // older IE only allows launching urls on actual clicks and this could be sent by a keystroke if (session && (SC.command.doesClickDispatch(eventArgs.commandElement) || !SC.util.isCapable(SC.util.Caps.InternetExplorer, null, { major: 11 }))) { SC.launch.startJoinSession( { session: session, hostAccessToken: hostAccessToken, processType: hostAccessToken ? SC.types.ProcessType.Host : SC.types.ProcessType.Guest }, function (joinInfo, _, onSuccess, onFailure) { onSuccess( SC.util.getClientLaunchParameters( joinInfo.session.SessionID, joinInfo.session.SessionType, joinInfo.session.Name, joinInfo.fieldMap.participantName.value, null, joinInfo.hostAccessToken, joinInfo.processType ) ); } ); } }); SC.event.addGlobalHandler(SC.event.QueryJoinInfo, function (eventArgs) { if (eventArgs.session) { eventArgs.shouldShowPrompt SC.util.getSessionTypeBooleanResource(JoinPanel.{0}PromptVisible, eventArgs.session.SessionType); eventArgs.promptText SC.util.getSessionTypeResource(JoinPanel.{0}PromptMessage, eventArgs.session.SessionType); eventArgs.buttonText SC.util.getSessionTypeResource(JoinPanel.{0}PromptButtonText, eventArgs.session.SessionType); eventArgs.fieldMap.participantName { labelText: SC.util.getSessionTypeResource(JoinPanel.{0}ParticipantNameLabelText, eventArgs.session.SessionType), value: , visible: SC.util.getSessionTypeBooleanResource(JoinPanel.{0}PromptParticipantNameVisible, eventArgs.session.SessionType), }; } }); SC.event.addGlobalHandler(SC.event.QueryParticipantJoinedCount, function (eventArgs) { var sessionInfo window.getSessionInfo(); var session sessionInfo.Sessions.find(function (s) { return s.SessionID eventArgs.clientLaunchParameters.s; }); if (session ! undefined) eventArgs.participantJoinedCount session.ActiveConnections.filter(function (ac) { if (eventArgs.clientLaunchParameters.n) return ac.ProcessType SC.types.ProcessType.Host; return ac.ProcessType SC.types.ProcessType.Guest && ac.ParticipantName eventArgs.clientLaunchParameters.r; }).length; }); SC.event.addGlobalHandler(SC.event.QueryPanels, function (eventArgs) { switch (eventArgs.area) { case GuestActionPanel: eventArgs.panelDefinitions.push({ initProc: function (container) { SC.ui.setContents(container, $div({ className: Loading })); }, isVisibleProc: function (pass, previousPassVisibleCount, sessionInfo) { return pass 1 && sessionInfo null; } }); eventArgs.panelDefinitions.push({ initProc: function (container) { SC.ui.setContents(container, $a({ _commandName: JoinByTag, _commandArgument: DefaultSession, className: GoLink Large, _attributeMap: { aria-label: SC.resGuestActionPanel.ButtonDescription } }), $h2({ _htmlResource: GuestActionPanel.InvitationSession.Heading }), $p({ _htmlResource: GuestActionPanel.InvitationSession.Message }), ); }, isVisibleProc: function (pass, previousPassVisibleCount, sessionInfo) { return pass 3 && previousPassVisibleCount 0 && sessionInfo ! null && sessionInfo.Sessions.find(function (s) { return s.SessionID window.getTaggedSessionInfo(DefaultSession).SessionID; }); } }); eventArgs.panelDefinitions.push({ initProc: function (container) { SC.ui.setContents(container, $h2({ _htmlResource: GuestActionPanel.CodeSession.Heading }), $p({ _htmlResource: GuestActionPanel.CodeSession.Message }), $p({ className: GuestActionBar }, SC.ui.createSearchTextBox({ _commandName: JoinByTag, _commandArgument: DefaultCode, value: window.getTaggedSessionInfo(DefaultCode).Code || }, function (eventArgs) { var sessionCode SC.util.getTrimmedOrNull(SC.event.getElement(eventArgs).value); window.setTaggedSessionInfo(DefaultCode, { Code: sessionCode }); }), $a({ _commandName: JoinByTag, _commandArgument: DefaultCode, className: GoLink Medium, _attributeMap: { aria-label: SC.resGuestActionPanel.ButtonDescription } }), ), ); }, isVisibleProc: function (pass, previousPassVisibleCount, sessionInfo) { return pass 5 && previousPassVisibleCount 0 && sessionInfo ! null && sessionInfo.DoNonPublicCodeSessionsExist; }, refreshProc: function (container, sessionInfo, wasMadeVisible) { var taggedSessionInfo window.getTaggedSessionInfo(DefaultCode); SC.ui.setDisabled( SC.ui.findDescendentByTag(container, A), !sessionInfo.Sessions.find(function (s) { return taggedSessionInfo.Code && s.Code.toLowerCase() taggedSessionInfo.Code.toLowerCase(); }) ); if (wasMadeVisible) SC.ui.findDescendentByTag(container, INPUT).focus(); } }); eventArgs.panelDefinitions.push({ initProc: function (container) { SC.ui.setContents(container, $h2({ _htmlResource: GuestActionPanel.PublicSession.Heading }), $p({ _htmlResource: GuestActionPanel.PublicSession.Message }), $p({ className: GuestActionBar }, $select(), $a({ _commandName: JoinBySessionID, className: GoLink Medium, _attributeMap: { aria-label: SC.resGuestActionPanel.ButtonDescription } }), ), ); SC.event.addHandler(SC.ui.findDescendentByTag(container, SELECT), change, function (eventArgs) { var selectBox SC.event.getElement(eventArgs); SC.ui.findDescendentByTag(container, A)._commandArgument selectBox.optionsselectBox.selectedIndex.value; }); }, isVisibleProc: function (pass, previousPassVisibleCount, sessionInfo) { return pass 5 && previousPassVisibleCount 0 && sessionInfo ! null && sessionInfo.Sessions.filter(function (s) { return s.IsPublic; }).length > 0; }, refreshProc: function (container, sessionInfo, wasMadeVisible) { var selectBox SC.ui.findDescendentByTag(container, SELECT); var link SC.ui.findDescendentByTag(container, A); SC.ui.setContents(selectBox, sessionInfo.Sessions.filter(function (s) { return s.IsPublic; }).map(function (s) { return $option({ value: s.SessionID }, s.Name); }) ); var optionIndex Array.prototype.findIndex.call(selectBox.options, function (o) { return o.value link._commandArgument; }); if (optionIndex ! -1) selectBox.selectedIndex optionIndex; else link._commandArgument selectBox.optionsselectBox.selectedIndex.value; } }); eventArgs.panelDefinitions.push({ initProc: function (container) { SC.ui.setContents(container, $h2({ _htmlResource: GuestActionPanel.NoAvailableSessions.Heading }), $p({ _htmlResource: GuestActionPanel.NoAvailableSessions.Message }), ); }, isVisibleProc: function (pass, previousPassVisibleCount, sessionInfo) { return pass 8 && previousPassVisibleCount 0; } }); break; } }); SC.event.addGlobalHandler(SC.event.QueryLiveData, function (eventArgs) { var getTaggedValuesFunc function (propertyName) { return Object.keys(window._taggedSessionInfos) .map(function (key) { return window._taggedSessionInfoskey; }) .filter(function (_) { return _propertyName; }) .map(function (_) { return _propertyName; }); } eventArgs.requestInfoMapGuestSessionInfo { sessionCodes: getTaggedValuesFunc(Code), sessionIDs: getTaggedValuesFunc(SessionID), }; }); SC.event.addGlobalHandler(SC.event.PreRender, function () { window._taggedSessionInfos {}; SC.css.ensureClass(document.documentElement, ShowMenu, false); var queryStringMap SC.util.parseQueryString(window.location.search); window.setTaggedSessionInfo(DefaultCode, { Code: queryStringMap.Code }); window.setTaggedSessionInfo(DefaultSession, { SessionID: queryStringMap.Session, HostAccessToken: queryStringMap.HostAccessToken }); var actionPanel $(.ActionPanel); SC.panellist.queryAndInitializePanels(actionPanel); SC.panellist.refreshPanels(actionPanel, null); }); SC.event.addGlobalHandler(SC.event.LiveDataRefreshed, function () { SC.panellist.refreshPanels($(.ActionPanel), window.getSessionInfo()); if (!window._hasJoinedDefault && !SC.util.isCapable(SC.util.Caps.InternetExplorer, null, { major: 11 })) { SC.command.dispatchExecuteCommand(window.document.body, window.document.body, window.document.body, JoinByTag, DefaultSession); window._hasJoinedDefault true; } }); /script> script> SC.event.addGlobalHandler(SC.event.QueryCommandButtons, function (eventArgs) { switch (eventArgs.area) { case TrayIconPanel: eventArgs.buttonDefinitions.push({ commandName: ActionCenter, imageUrl: Images/ActionCenter.svg }); if (SC.context.isUserAdministrator) eventArgs.buttonDefinitions.push({ commandName: Navigate, commandArgument: Administration, imageUrl: Images/NavigationAdministration.svg }); eventArgs.buttonDefinitions.push( { commandName: Extras, imageUrl: Images/Extras.svg }, { commandName: Applications, imageUrl: Images/Applications.svg } ); break; case ExtrasNavigationPopoutPanel: eventArgs.buttonDefinitions.push( { commandName: NavigateExtensionBrowser } ); break; case ToolsPanel: eventArgs.buttonDefinitions.push( { commandName: Extras, imageUrl: Images/Extras.svg }, { commandName: Login } ); break; case UserPopoutPanel: eventArgs.buttonDefinitions.push( { commandName: NavigateControlPanel }, { commandName: ChangePassword }, { commandName: Logout } ); break; case UserHelpPopoutPanel: if (SC.context.pageType ! GuestPage && SC.context.pageType ! LoginPage) { eventArgs.buttonDefinitions.push({ commandName: GiveFeedback }); for (var i 1; ; i++) { var resourceValue SC.resHelpPanel.Link + i + .Text; if (resourceValue undefined || resourceValue ) break; var url SC.util.sanitizeUrl(SC.resHelpPanel.Link + i + .Url); eventArgs.buttonDefinitions.push({ commandName: NavigateHelpLink, commandArgument: url, text: resourceValue, title: url }); } } break; } }); SC.event.addGlobalHandler(SC.event.QueryCommandButtonState, function (eventArgs) { switch (eventArgs.commandName) { case User: case ActionCenter: eventArgs.isVisible SC.context.isUserAuthenticated; break; case Login: eventArgs.isVisible SC.context.pageType ! SetupWizardPage && !SC.context.isUserAuthenticated && !SC.util.isCapable(SC.util.Caps.InternetExplorer, null, { major: 12 }); // Login page doesnt support IE break; case NavigateControlPanel: eventArgs.isVisible !!SC.context.controlPanelUrl; break; case ChangePassword: eventArgs.isVisible SC.context.canChangePassword; break; case Extras: eventArgs.isVisible SC.popout.computePopoutCommandsVisible(eventArgs, , Navigation); break; case Applications: case Help: eventArgs.isVisible SC.popout.computePopoutCommandsVisible(eventArgs); break; case NavigateExtensionBrowser: eventArgs.isVisible SC.context.isUserAdministrator; break; } }); SC.event.addGlobalHandler(SC.event.ExecuteCommand, function (eventArgs) { switch (eventArgs.commandName) { case Extras: SC.popout.showPanelFromCommand(eventArgs, null, { subAreas: , Navigation }); break; case Applications: SC.popout.showPanelFromCommand(eventArgs); break; case ActionCenter: SC.popout.showPanelFromCommand(eventArgs, null, { buildProc: function (popoutPanel) { var actionCenterInfo SC.livedata.getResponseInfo(SC.livedata.ActionCenterInfo); SC.ui.setContents(popoutPanel, $div({ className: ActionCenterPanel }, $h2({ _textResource: ActionCenterPanel.Text }), $ul({ className: List, _visible: SC.util.any(actionCenterInfo.ActionItems) }, (actionCenterInfo.ActionItems || ) .map(function (it) { var parsedEventData SC.util.parseEventData(it.Data); return $li({ _eventHandlerMap: { click: function () { window.location.href SC.nav.getHostUrl({ sessionType: it.SessionType, sessionID: it.SessionID, tabName: SC.nav.getHostTabName(it.EventType), tabContext: it.EventID }); }, } }, $img({ src: Images/Notification + SC.util.getEnumValueName(SC.types.SessionEventType, it.EventType) + .svg }), $h3({ className: Type }, SC.resSessionEvent. + SC.util.getEnumValueName(SC.types.SessionEventType, it.EventType) + .Title), $p({ className: Name, title: it.Name }, it.Name), $p({ className: DataContent, title: parsedEventData.content }, parsedEventData.content), $p({ className: Time }, SC.util.formatDateTime(it.Time, { includeRelativeDate: true })), ) }) ), $div({ className: EmptyPanel, _visible: !SC.util.any(actionCenterInfo.ActionItems) }, $p($img({ src: images/EmptyActionCenter.svg })), $h4({ _textResource: ActionCenterPanel.EmptyHeader }), $p({ _textResource: ActionCenterPanel.EmptyText }), ), )); }, }); break; case Login: SC.util.sendToLogin(SC.types.LoginReason.None, false); break; case Logout: SC.util.sendToLogin(SC.types.LoginReason.Logout, false); break; case User: SC.popout.showPanelFromCommand(eventArgs, null, { subAreas: Help, }); break; case NavigateControlPanel: window.open(SC.util.sanitizeUrl(SC.context.controlPanelUrl)); break; case ChangePassword: var params {}; paramsSC.context.loginUserNameParameterName eventArgs.commandArgument; window.location.href SC.context.changePasswordPageUrl + SC.util.getQueryString(params); break; case NavigateHelpLink: window.open(eventArgs.commandArgument); break; case ToggleMenu: SC.css.toggleClass(document.documentElement, ShowMenu); break; case GiveFeedback: SC.dialog.showModalButtonDialog( GiveFeedback, SC.resCommand.GiveFeedback.Text, SC.resCommand.GiveFeedback.ButtonText, Default, function (container) { SC.ui.setContents(container, $div({ _textResource: GiveFeedbackPanel.ReviewLabelText }), $div({ className: RatingSelectionPanel }, Good, Neutral, Bad.map(function (rating) { return $span( $label({ className: rating }, $input({ type: radio, name: rating, value: rating.toLowerCase() }), $div({ className: RadioImage }), $span({ _textResource: GiveFeedbackPanel. + rating + RatingLabelText }), ) ); }) ), $div( $label({ _textResource: GiveFeedbackPanel.EmailLabelText }, $input({ type: email, id: email }), ), ), $div( $label({ _textResource: GiveFeedbackPanel.CommentsLabelText }, SC.ui.createTextBox({ id: commentsBox }, true), ), ), ); }, function (eventArgs) { SC.service.SendFeedback( Array.prototype.map.call(document.querySelectorAll(inputnamerating:checked), function (e) { return e.value; })0, $(commentsBox).value, $(email).value, function () { SC.dialog.showModalMessageBox( SC.resGiveFeedbackPanel.SuccessHeading, SC.resGiveFeedbackPanel.SuccessMessage ); } ); } ); break; case ManageToolbox: SC.toolbox.showToolboxDialog(eventArgs.commandName, eventArgs.commandArgument); break; case Navigate: window.location.href eventArgs.commandArgument; break; case NavigateExtensionBrowser: window.location.href SC.context.administrationPageUrl + ?TabExtensions#ShowExtensionBrowser; break; } }); SC.event.addGlobalHandler(SC.event.QueryNavigationLinks, function (eventArgs) { Array.prototype.push.apply(eventArgs.navigationLinks, SC.context.sessionTypeInfos.map(function (_) { return { href: SC.context.scriptBaseUrl + SC.context.hostPageUrl + # + SC.util.getEnumValueName(SC.types.SessionType, _.sessionType), text: SC.util.getSessionTypeResource(NavigationPanel.{0}LinkText, _.sessionType), imageUrl: SC.util.formatString(Images/Navigation{0}.svg, SC.util.getEnumValueName(SC.types.SessionType, _.sessionType)), sessionType: _.sessionType, } })); if (SC.context.isUserAdministrator && SC.context.canDisplayPAMDashboard) eventArgs.navigationLinks.push({ href: SC.context.scriptBaseUrl + PAM, text: PAM, imageUrl: Images/PAMIcon.png, }); }); SC.event.addGlobalHandler(SC.event.QueryLiveData, function (eventArgs) { if (SC.context.isUserAuthenticated) SC.livedata.setRequestInfo(eventArgs, SC.livedata.ActionCenterInfo); }); SC.event.addGlobalHandler(SC.event.LiveDataRefreshed, function () { SC.css.ensureClass($(.NavigationPanel .TrayIconPanel .ActionCenter), NonEmpty, SC.util.any(SC.livedata.getResponseInfo(SC.livedata.ActionCenterInfo).ActionItems)); }); SC.event.addGlobalHandler(keydown, function (eventArgs) { if (SC.event.doesKeyEventIndicateTextEntryOrArrowKeyNavigation(eventArgs) && (!document.activeElement || SC.ui.isDefinitelyNotTextEntryElement(document.activeElement))) { var arrowKeyInfo SC.event.getArrowKeyInfo(eventArgs); if (arrowKeyInfo && document.activeElement && SC.css.containsClass(document.activeElement, ArrowNavigation)) { eventArgs.preventDefault(); SC.ui.setHiddenFocusAndClearOthers(); var targetPreviousOrNext arrowKeyInfo.isLeft || arrowKeyInfo.isUp; SC.event.dispatchEvent(document.activeElement, SC.event.KeyNavigation, { currentActiveElement: document.activeElement, currentSelectedElement: SC.ui.findDescendantBreadthFirst(document.activeElement, function (_) { return SC.ui.isSelected(_); }, !targetPreviousOrNext), targetPreviousOrNext: targetPreviousOrNext, arrowKeyInfo: arrowKeyInfo, hasShift: eventArgs.shiftKey, }); } else { var queryTextEntryElementArgs SC.event.dispatchGlobalEvent(SC.event.QueryTextEntryElement, { textEntryElement: null, }); if (queryTextEntryElementArgs.textEntryElement) { if (!SC.event.doesKeyEventIndicateTextEntryNavigation(eventArgs)) queryTextEntryElementArgs.textEntryElement.value ; queryTextEntryElementArgs.textEntryElement.focus(); } } } }); SC.event.addGlobalHandler(SC.event.KeyNavigation, function (eventArgs) { // default handling for key navigation var elementToNavigateTo; if (eventArgs.currentSelectedElement) { elementToNavigateTo SC.ui.getPreviousOrNextElementSibling(eventArgs.currentSelectedElement, eventArgs.targetPreviousOrNext) || eventArgs.currentSelectedElement; while (SC.util.isNullOrEmpty(elementToNavigateTo._commandName) && SC.ui.getPreviousOrNextElementSibling(elementToNavigateTo, eventArgs.targetPreviousOrNext)) { elementToNavigateTo SC.ui.getPreviousOrNextElementSibling(elementToNavigateTo, eventArgs.targetPreviousOrNext); } } else { elementToNavigateTo SC.ui.findDescendantBreadthFirst(eventArgs.currentActiveElement, function (_) { return !SC.util.isNullOrEmpty(_._commandName); }); // this can still be empty } SC.util.tryNavigateToElementUsingCommand(elementToNavigateTo, eventArgs.targetPreviousOrNext, eventArgs.hasShift); }); SC.event.addGlobalHandler(SC.event.PreRender, function () { var resetInactivityProc function () { window._lastNotifyActivityTime new Date().getTime(); if (SC.context.isUserAuthenticated && SC.context.loginAfterInactivityMilliseconds ! 0) { if (window._loginAfterInactivityTimer) window.clearTimeout(window._loginAfterInactivityTimer); window._loginAfterInactivityTimer window.setTimeout(function () { SC.util.sendToLogin(SC.types.LoginReason.IdleTooLong, true); }, Math.min(SC.context.loginAfterInactivityMilliseconds, 2147483647)); //interval stored as 32-bit signed int } }; SC.context.prehandleServiceFailureProc function (error) { if (error.statusCode ! 403) return false; SC.util.sendToLogin(SC.types.LoginReason.PermissionsInsufficient, true); } SC.context.unhandledServiceFailureProc function (error) { SC.dialog.showModalErrorBox(error.detail || error.message); } resetInactivityProc(); SC.ui.initializeWindowActivityTracking(function () { if (new Date().getTime() - window._lastNotifyActivityTime > SC.context.notifyActivityFrequencyMilliseconds) { resetInactivityProc(); SC.service.NotifyActivity(); } }); var parameterlessUrl SC.util.getParameterlessUrl(window.location.href); var createNavigationLinkFunc function (_) { return $div({ _commandName: Navigate, _commandArgument: _.href, _selected: _.href parameterlessUrl }, $img({ src: _.imageUrl }), $span(_.text), ); }; SC.ui.setContents($(.HeaderPanel), $a({ href: SC.context.guestPageUrl, className: LogoIconLink }), $a({ _commandName: ToggleMenu, className: ShowMenuButton }, ), $h1({ className: LogoPanel }), $div({ className: CommandPanel }), ); SC.command.queryAndAddCommandButtons($(.HeaderPanel .CommandPanel), ToolsPanel); SC.command.updateCommandButtonsState($(.HeaderPanel .CommandPanel)); var queryNavigationLinksEventArgs SC.event.dispatchGlobalEvent(SC.event.QueryNavigationLinks, { navigationLinks: }) SC.ui.setContents($(.NavigationPanel), queryNavigationLinksEventArgs.navigationLinks.map(createNavigationLinkFunc), $div({ className: FlexSpacer }), $div({ className: TrayPanelContainer }, $div({ className: TrayIconPanel }), $div({ className: UserMenuButton, _commandName: User }, $span(SC.context.userDisplayName null ? : SC.context.userDisplayName.toUpperCase()0), $span(SC.context.userDisplayName) ), ), ); SC.command.queryAndAddCommandButtons($(.NavigationPanel .TrayIconPanel), TrayIconPanel, null, { descriptionRenderStyle: SC.command.DescriptionRenderStyle.Tooltip }); SC.command.updateCommandButtonsState($(.NavigationPanel .TrayIconPanel)); var setSelectedFunc function () { $$(.NavigationPanel > div) .filter(function (_) { return !SC.util.isNullOrEmpty(_._commandArgument); }) .forEach(function (_) { SC.ui.setSelected(_, window.location.href.startsWith(_._commandArgument)); }); }; SC.event.addHandler(window, hashchange, setSelectedFunc); setSelectedFunc(); SC.livedata.startLoop(); }); var isTouchEnabled (typeof document.documentElement.ontouchstart ! undefined); SC.css.ensureClass(document.documentElement, TouchEnabled, isTouchEnabled); SC.css.ensureClass(document.documentElement, TouchDisabled, !isTouchEnabled); SC.css.ensureClass(document.documentElement, UserAuthenticated, SC.context.isUserAuthenticated); SC.css.ensureClass(document.documentElement, NativeClient, SC.util.isCapable(SC.util.Caps.NativeClient)); SC.css.ensureClass(document.documentElement, HasMasterPanel, $(.MasterPanel)); SC.css.ensureClass(document.documentElement, LogoImageVisible, SC.util.getBooleanResource(LogoPanel.ImageVisible)); SC.css.ensureClass(document.documentElement, LogoIconVisible, SC.util.getBooleanResource(LogoPanel.IconVisible)); SC.css.ensureClass(document.documentElement, LogoHeadingVisible, SC.util.getBooleanResource(LogoPanel.HeadingVisible)); SC.css.ensureClass(document.documentElement, AnimationReduced, SC.util.getBooleanResource(Page.AnimationReduced)); SC.css.ensureClass(document.documentElement, SC.context.pageType, true); SC.extension.initializeExtensions(); SC.event.dispatchGlobalEvent(SC.event.PreRender); SC.util.recordLifeCycleEvent(SC.event.PreRender); SC.ui.setVisible(document.body, true); SC.event.dispatchGlobalEvent(SC.event.PostRender); SC.util.recordLifeCycleEvent(SC.event.PostRender); $$(*tabIndex).forEach(function (_) { SC.event.addHandler(_, mousedown, function () { SC.ui.setHiddenFocusAndClearOthers(_); }); }); if (SC.context.focusedControlID) $(SC.context.focusedControlID).focus(); else if (document.activeElement document.body) { $(.NavigationPanel).focus(); SC.ui.setHiddenFocusAndClearOthers($(.NavigationPanel)); } /script>/body>/html>
View on OTX
|
View on ThreatMiner
Please enable JavaScript to view the
comments powered by Disqus.
Data with thanks to
AlienVault OTX
,
VirusTotal
,
Malwr
and
others
. [
Sitemap
]