%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
| Server IP : kowitt.ac.th / Your IP : 216.73.216.106 Web Server : Microsoft-IIS/7.5 System : Windows NT SERVER02 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.6.31 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Windows/security/msscw/TransformFiles/ |
Upload File : |
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:msftscw="http://www.microsoft.com/windows/security/"
version="1.0">
<xsl:import href="scwxmlloc.xsl" />
<xsl:include href="View\Vars.xsl" />
<xsl:output method="html" />
<xsl:variable name ="XMLAllFirewallProfiles"
select="SecurityPolicy/Rules/Rule[@Name='Microsoft.OS.Networking.Firewall']/Firewall/ProfilesSettings/ProfileSettings"/>
<xsl:variable name ="XMLAllFirewallRules"
select="SecurityPolicy/Rules/Rule[@Name='Microsoft.OS.Networking.Firewall']/Firewall/FirewallRules/FirewallRule"/>
<xsl:template match="/">
<HTML>
<LINK REL="stylesheet"
HREF="../TransformFiles/view/kb.css"
type="text/css"/>
<HEAD>
<!-- Initialize the localization -->
<xsl:comment>
<xsl:value-of select="msftscw:InitLocVariable($UserUILanguage, 'KBLocFile', 'SCWLocStrings.xml', '..\MUI\', '..\')" />
<xsl:value-of select="msftscw:InitLocVariable($UserUILanguage, 'AnalysisLocFile', 'SCWAnaLocStrings.xml', '.\MUI\', '.\')" />
</xsl:comment>
<TITLE>
<xsl:value-of select="msftscw:getString('SCWPolicy/Header/Title', 'KBLocFile')"/>
</TITLE>
<xsl:comment>
<xsl:value-of select="msftscw:InitializeLookup()" />
</xsl:comment>
<xsl:text disable-output-escaping="yes"><![CDATA[
<script language="JScript">
function getImagePath(FileName)
{
var strPath = "../TransformFiles/View/" + FileName;
return strPath;
}
function changeImgForDiv(bHoverOver)
{
div = event.srcElement.parentElement;
obj = div.nextSibling;
ImgElement = div.firstChild;
if("none" == obj.currentStyle.display)
{
if ( bHoverOver )
ImgElement.src = getImagePath("RightArrowHighLight.gif");
else
ImgElement.src = getImagePath("RightArrow.gif");
}
else
{
if ( bHoverOver )
ImgElement.src = getImagePath("DownArrowHighLight.gif");
else
ImgElement.src = getImagePath("DownArrow.gif");
}
}
function toggleDisplay()
{
var div = event.srcElement.parentElement;
var obj = div.nextSibling;
if("none" == obj.currentStyle.display)
{
obj.style.display = "block";
div.firstChild.src="../TransformFiles/view/downarrow.gif";
}
else
{
obj.style.display = "none";
div.firstChild.src="../TransformFiles/view/rightarrow.gif";
}
}
function onKeyUp()
{
switch(event.keyCode)
{
case 13:
case 32:
toggleDisplay();
break;
}
}
</script>
]]></xsl:text>
</HEAD>
<body class="kbbody">
<!-- ************************************ -->
<!-- ************** TITLE *************** -->
<!-- ************************************ -->
<table class="SEVarResultsHeaderTable"
ignore="true">
<tr>
<td>
<table class="SEVarResultsHeaderTableLeftCell"
ignore="true">
<tr>
<td class="SEVarResultsHeader">
<xsl:value-of select="msftscw:getTitle(//SecurityPolicy)"/>
</td>
</tr>
<tr>
<td class="SEVarResultsDescription">
<xsl:value-of select="msftscw:getDescription(//SecurityPolicy)"/>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<div class="SEVarResultsHeaderTableLeftCell">
<table class="SEVarResultsMachineTable"
ignore="true">
<xsl:for-each select="//SecurityPolicy/PolicyAuthoringData/Extension/PrototypeMachine">
<tr>
<td class="SEVarResultsTableLabel">
<xsl:value-of select="msftscw:getString('SCWPolicy/Header/Target', 'KBLocFile')"/>
</td>
<td nowrap="true"
class="SEVarResultsTableData">
<xsl:value-of select="@Name"/>
</td>
</tr>
</xsl:for-each>
</table>
</div>
</td>
</tr>
</table>
<!-- ************************************ -->
<!-- ********* SERVICES SECTION ********* -->
<!-- ************************************ -->
<div class="kbsections">
<div class="kbsectionheaders">
<img class="policyNorgieImage"
tabindex="0"
onkeyup="onKeyUp()"
onclick="toggleDisplay();"
onmouseover='changeImgForDiv(1);'
onmouseout='changeImgForDiv(0);'
src="../TransformFiles/view/rightarrow.gif"></img>
<span class="policySectionHeadingSpan"
onclick="toggleDisplay();"
onmouseover='changeImgForDiv(1);'
onmouseout='changeImgForDiv(0);' >
<xsl:value-of select="msftscw:getString('SCWPolicy/Sections/Services/Title', 'KBLocFile')"/>
</span>
</div>
<xsl:value-of disable-output-escaping="yes"
select="msftscw:getServicesTable(//SecurityPolicy/Rules/Rule[@Name='Microsoft.OS.Services'])"/>
</div>
<!-- ************************************ -->
<!-- ********** Firewall SECTION *********** -->
<!-- ************************************ -->
<div class="kbsections">
<xsl:apply-templates select="SecurityPolicy/Rules/Rule[@Name='Microsoft.OS.Networking.Firewall']/Firewall"/>
</div>
<!-- ************************************ -->
<!-- ********* REGISTRY SECTION ********* -->
<!-- ************************************ -->
<div class="kbsections">
<div class="kbsectionheaders">
<img class="policyNorgieImage"
tabindex="0"
onkeyup="onKeyUp()"
onclick="toggleDisplay();"
onmouseover='changeImgForDiv(1);'
onmouseout='changeImgForDiv(0);'
src="../TransformFiles/view/rightarrow.gif"></img>
<span class="policySectionHeadingSpan"
onclick="toggleDisplay();"
onmouseover='changeImgForDiv(1);'
onmouseout='changeImgForDiv(0);'>
<xsl:value-of select="msftscw:getString('SCWPolicy/Sections/Registry/Title', 'KBLocFile')"/>
</span>
</div>
<div class="policyResultsTableDiv"
style="display:'none'">
<table class="expanddescription policyResultsTable">
<thead>
<td class="settingsheadersexpanded policySectionsExpanded">
<xsl:value-of select="msftscw:getString('SCWPolicy/Sections/Registry/Table/Key', 'KBLocFile')"/>
</td>
<td class="settingsheadersexpanded policySectionsExpanded">
<xsl:value-of select="msftscw:getString('SCWPolicy/Sections/Registry/Table/Name', 'KBLocFile')"/>
</td>
<td class="settingsheadersexpanded policySectionsExpanded">
<xsl:value-of select="msftscw:getString('SCWPolicy/Sections/Registry/Table/Type', 'KBLocFile')"/>
</td>
<td class="policyRegValueColumn settingsheadersexpanded policySectionsExpanded">
<xsl:value-of select="msftscw:getString('SCWPolicy/Sections/Registry/Table/Data', 'KBLocFile')"/>
</td>
</thead>
<xsl:for-each select="//SecurityPolicy/Rules/Rule[@Name='Microsoft.OS.Registry.Values']/Parameters/Parameter/Value">
<xsl:sort select="Hive"/>
<xsl:sort select="Key"/>
<xsl:sort select="Name"/>
<xsl:variable name="strHive"
select="normalize-space(Hive)"/>
<xsl:variable name="strKey"
select="normalize-space(Key)"/>
<xsl:variable name="KeyTemp1"
select="concat($strHive, '\', $strKey)"/>
<xsl:variable name="KeyTemp2"
select="msftscw:getRegKeyString($KeyTemp1, null)"/>
<tr class="policyResultDataRow">
<td class="policyCellPadding policyResultDataRow">
<xsl:value-of select="$KeyTemp2"/>
<xsl:value-of disable-output-escaping="yes"
select="msftscw:getRegKeyString($KeyTemp1, $KeyTemp2)"/>
</td>
<td class="policyCellPadding policyResultDataRow">
<xsl:value-of select="Name"/>
</td>
<td class="policyCellPadding policyResultDataRow">
<xsl:value-of select="Type"/>
</td>
<td class="policyRegValueColumn policyCellPadding policyLastCellPadding policyResultDataRow">
<xsl:value-of select="Data"/>
</td>
</tr>
</xsl:for-each>
</table>
</div>
</div>
<!-- ************************************ -->
<!-- ********** AUDIT SECTION ********* -->
<!-- ************************************ -->
<div class="kbsections">
<div class="kbsectionheaders">
<img class="policyNorgieImage"
tabindex="0"
onkeyup="onKeyUp()"
onclick="toggleDisplay();"
onmouseover='changeImgForDiv(1);'
onmouseout='changeImgForDiv(0);'
src="../TransformFiles/view/rightarrow.gif"></img>
<span class="policySectionHeadingSpan"
onclick="toggleDisplay();"
onmouseover='changeImgForDiv(1);'
onmouseout='changeImgForDiv(0);'>
<xsl:value-of select="msftscw:getString('SCWPolicy/Sections/Audit/Title', 'KBLocFile')"/>
</span>
</div>
<div class="policyResultsTableDiv"
style="display:'none'">
<table class="expanddescription policyResultsTable">
<thead>
<td class="settingsheadersexpanded policySectionsExpanded">
<xsl:value-of select="msftscw:getString('SCWPolicy/Sections/Audit/Table/EventType', 'KBLocFile')"/>
</td>
<td class="settingsheadersexpanded policySectionsExpanded">
<xsl:value-of select="msftscw:getString('SCWPolicy/Sections/Audit/Table/Success', 'KBLocFile')"/>
</td>
<td class="settingsheadersexpanded policySectionsExpanded">
<xsl:value-of select="msftscw:getString('SCWPolicy/Sections/Audit/Table/Failure', 'KBLocFile')"/>
</td>
</thead>
<xsl:for-each select="//SecurityPolicy/Rules/Rule[@Name='Microsoft.OS.Audit']/Parameters/Parameter/Event">
<xsl:sort select="@Type"/>
<xsl:variable name="AuditType"
select="normalize-space(@Type)"/>
<xsl:variable name="AuditSuccess"
select="normalize-space(@Success)"/>
<xsl:variable name="AuditFailure"
select="normalize-space(@Failure)"/>
<tr class="policyResultDataRow">
<td class="policyCellPadding policyResultDataRow">
<xsl:value-of select="msftscw:getAuditType($AuditType)"/>
</td>
<td class="policyCellPadding policyResultDataRow">
<xsl:value-of select="msftscw:getAuditValue($AuditSuccess)"/>
</td>
<td class="policyCellPadding policyLastCellPadding policyResultDataRow">
<xsl:value-of select="msftscw:getAuditValue($AuditFailure)"/>
</td>
</tr>
</xsl:for-each>
</table>
</div>
</div>
<!-- ************************************ -->
<!-- ********* TEMPLATES SECTION ******** -->
<!-- ************************************ -->
<div class="kbsections">
<div class="kbsectionheaders">
<img class="policyNorgieImage"
tabindex="0"
onkeyup="onKeyUp()"
onclick="toggleDisplay();"
onmouseover='changeImgForDiv(1);'
onmouseout='changeImgForDiv(0);'
src="../TransformFiles/view/rightarrow.gif"></img>
<span class="policySectionHeadingSpan"
onclick="toggleDisplay();"
onmouseover='changeImgForDiv(1);'
onmouseout='changeImgForDiv(0);'>
<xsl:value-of select="msftscw:getString('SCWPolicy/Sections/Templates/Title', 'KBLocFile')"/>
</span>
</div>
<div class="policyResultsTableDiv"
style="display:'none'">
<table class="expanddescription policyResultsTable" >
<thead>
<td class="settingsheadersexpanded policySectionsExpanded">
<xsl:value-of select="msftscw:getString('SCWPolicy/Sections/Templates/Table/Name', 'KBLocFile')"/>
</td>
<td class="settingsheadersexpanded policySectionsExpanded">
<xsl:value-of select="msftscw:getString('SCWPolicy/Sections/Templates/Table/Date', 'KBLocFile')"/>
</td>
<td class="settingsheadersexpanded policySectionsExpanded">
<xsl:value-of select="msftscw:getString('SCWPolicy/Sections/Templates/Table/Time', 'KBLocFile')"/>
</td>
<td class="policyRegValueColumn settingsheadersexpanded policySectionsExpanded">
<xsl:value-of select="msftscw:getString('SCWPolicy/Sections/Templates/Table/Size', 'KBLocFile')"/>
</td>
</thead>
<xsl:for-each select="//SecurityPolicy/Rules/Rule[@Name='Microsoft.OS.SCETemplates']/Parameters/Parameter/Template">
<xsl:sort select="@Precedence"/>
<xsl:variable name="TemplateDate"
select="normalize-space(@Date)"/>
<xsl:variable name="TemplateTime"
select="normalize-space(@Time)"/>
<tr class="policyResultDataRow">
<td class="policyCellPadding policyResultDataRow">
<xsl:value-of select="@Name"/>
</td>
<td class="policyCellPadding policyResultDataRow">
<xsl:value-of select="msftscw:getLocaleDate($TemplateDate)"/>
</td>
<td class="policyCellPadding policyResultDataRow">
<xsl:value-of select="msftscw:getLocaleTime($TemplateTime)"/>
</td>
<td class="policyRegValueColumn policyLastCellPadding policyResultDataRow">
<xsl:value-of select="@Size"/>
</td>
</tr>
</xsl:for-each>
</table>
</div>
</div>
</body>
</HTML>
</xsl:template>
<xsl:template match="Firewall">
<div>
<span id="shortFirewall">
<table class="kbsections"
width="100%"
marginheight="0"
marginwidth="0"
cellpadding="0"
cellspacing="0">
<tr class="kbsectionheaders">
<td width="10"></td>
<td width="17"
style="cursor:hand;"
onclick="shortFirewall.style.display='none'; longFirewall.style.display='inline';">
<img src="../TransformFiles/View/RightArrow.gif"
tabindex="0"
onkeyup="onKeyUp(1)"
onmouseOver="this.src='../TransformFiles/View/RightArrowHighLight.gif';"
onmouseout="this.src='../TransformFiles/View/RightArrow.gif';"/>
</td>
<td>
<table class="kbsectionheaders"
cellpadding="0"
cellspacing="0">
<tr>
<td style="cursor:hand;"
onclick="shortFirewall.style.display='none'; longFirewall.style.display='inline';">
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallHeading', 'KBLocFile')"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</span>
<span id="longFirewall"
style="display:'none'">
<table class="kbsections"
width="100%"
marginheight="0"
marginwidth="0"
cellpadding="0"
cellspacing="0">
<tr class="kbsectionheaders">
<td width="10"/>
<td width="10"
style="cursor:hand;"
onclick="shortFirewall.style.display='inline'; longFirewall.style.display='none';">
<img src="../TransformFiles/View/DownArrow.gif"
tabindex="0"
onkeyup="onKeyUp(0)"
onmouseover="this.src='../TransformFiles/View/DownArrowHighLight.gif';"
onmouseout="this.src='../TransformFiles/View/DownArrow.gif';"/>
</td>
<td>
<table class="kbsectionheaders"
cellpadding="0"
cellspacing="0">
<tr>
<td width="5"/>
<td style="cursor:hand;"
onclick="shortFirewall.style.display='inline'; longFirewall.style.display='none';">
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallHeading', 'KBLocFile')"/>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td></td>
<td></td>
<td>
<xsl:call-template name="DisplayFirewallProfiles"/>
<xsl:call-template name="DisplayFirewallRules"/>
</td>
</tr>
</table>
</span>
</div>
</xsl:template>
<xsl:template name="DisplayFirewallProfiles">
<div>
<span id="shortFirewallProfiles">
<table class="kbsections"
width="100%"
marginheight="0"
marginwidth="0"
cellpadding="0"
cellspacing="0">
<tr class="kbsectionheaders">
<td width="10"></td>
<td width="17"
style="cursor:hand;"
onclick="shortFirewallProfiles.style.display='none'; longFirewallProfiles.style.display='inline';">
<img src="../TransformFiles/View/RightArrow.gif"
tabindex="0"
onkeyup="onKeyUp(1)"
onmouseOver="this.src='../TransformFiles/View/RightArrowHighLight.gif';"
onmouseout="this.src='../TransformFiles/View/RightArrow.gif';"/>
</td>
<td>
<table class="kbsectionheaders"
cellpadding="0"
cellspacing="0">
<tr>
<td style="cursor:hand;"
onclick="shortFirewallProfiles.style.display='none'; longFirewallProfiles.style.display='inline';">
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallProfilesHeading', 'KBLocFile')"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</span>
<span id="longFirewallProfiles"
style="display:'none'">
<table class="kbsections"
width="100%"
marginheight="0"
marginwidth="0"
cellpadding="0"
cellspacing="0">
<tr class="kbsectionheaders">
<td width="10"/>
<td width="10"
style="cursor:hand;"
onclick="shortFirewallProfiles.style.display='inline'; longFirewallProfiles.style.display='none';">
<img src="../TransformFiles/View/DownArrow.gif"
tabindex="0"
onkeyup="onKeyUp(0)"
onmouseover="this.src='../TransformFiles/View/DownArrowHighLight.gif';"
onmouseout="this.src='../TransformFiles/View/DownArrow.gif';"/>
</td>
<td>
<table class="kbsectionheaders"
cellpadding="0"
cellspacing="0">
<tr>
<td width="5"/>
<td style="cursor:hand;"
onclick="shortFirewallProfiles.style.display='inline'; longFirewallProfiles.style.display='none';">
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallProfilesHeading', 'KBLocFile')"/>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td></td>
<td></td>
<td>
<xsl:for-each select="$XMLAllFirewallProfiles">
<xsl:call-template name="DisplayFirewallProfile">
<xsl:with-param name="XMLFirewallProfile"
select="."/>
</xsl:call-template>
</xsl:for-each>
</td>
</tr>
</table>
</span>
</div>
</xsl:template>
<xsl:template name="DisplayFirewallProfile">
<xsl:param name="XMLFirewallProfile"/>
<xsl:variable name="ElementId"
select="translate($XMLFirewallProfile/@Type, '{} 	

-', '')"/>
<xsl:variable name="Type"
select="$XMLFirewallProfile/@Type"/>
<div>
<span id="shortFirewallProfile{$ElementId}">
<table class="settingsheaderscollapsed"
width="100%" >
<tr>
<td width="5"
style="cursor:hand;"
onclick="shortFirewallProfile{$ElementId}.style.display='none'; longFirewallProfile{$ElementId}.style.display='inline';" >
<xsl:attribute name="title">
<xsl:if test="string-length($Type) != 0">
<xsl:value-of select="$Type"/>
</xsl:if>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Tooltip', 'KBLocFile')"/>
</xsl:attribute>
<img src="../TransformFiles/View/RightArrow.gif"
tabindex="0"
onkeyup="onKeyUp(1)"
onmouseOver="this.src='../TransformFiles/View/RightArrowHighLight.gif';"
onmouseout="this.src='../TransformFiles/View/RightArrow.gif';"/>
</td>
<td style="cursor:hand;"
onclick="shortFirewallProfile{$ElementId}.style.display='none'; longFirewallProfile{$ElementId}.style.display='inline';">
<xsl:attribute name="title">
<xsl:if test="string-length($Type) != 0">
<xsl:value-of select="concat($Type, ', ')"/>
</xsl:if>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Tooltip', 'KBLocFile')"/>
</xsl:attribute>
<xsl:value-of select="$Type"/>
</td>
</tr>
</table>
</span>
<span id="longFirewallProfile{$ElementId}"
style="display:'none'">
<table width="100%">
<tr>
<td valign="top"
width="15"
style="cursor:hand;"
onclick="shortFirewallProfile{$ElementId}.style.display='inline'; longFirewallProfile{$ElementId}.style.display='none';">
<img src="../TransformFiles/View/DownArrow.gif"
style="cursor:hand;"
tabindex="0"
onkeyup="onKeyUp(0)"
onclick="shortFirewallProfile{$ElementId}.style.display='inline'; longFirewallProfile{$ElementId}.style.display='none';"
onmouseover="this.src='../TransformFiles/View/DownArrowHighLight.gif';"
onmouseout="this.src='../TransformFiles/View/DownArrow.gif';"/>
</td>
<td>
<table class="sectionsexpanded"
width="95%"
cellpadding="0"
cellspacing="0">
<tr>
<td class="settingsheadersexpanded"
style="cursor:hand;"
onclick="shortFirewallProfile{$ElementId}.style.display='inline'; longFirewallProfile{$ElementId}.style.display='none';">
<xsl:value-of select="$Type"/>
</td>
</tr>
<tr>
<td>
<xsl:call-template name="DisplayFirewallProfileData">
<xsl:with-param name="XMLFirewallProfile"
select="."/>
<xsl:with-param name="DisplayName">False</xsl:with-param>
</xsl:call-template>
</td>
</tr>
</table>
</td>
</tr>
</table>
</span>
</div>
</xsl:template>
<xsl:template name="DisplayFirewallProfileData">
<xsl:param name="XMLFirewallProfile"/>
<xsl:param name="DisplayName"/>
<xsl:variable name="ElementId"
select="translate($XMLFirewallProfile/@Type, '{} 	

-', '')"/>
<xsl:variable name="Type"
select="$XMLFirewallProfile/@Type"/>
<xsl:variable name="FirewallState"
select="$XMLFirewallProfile/@FirewallState"/>
<xsl:variable name="DefaultInboundConnectionsAreAllowed"
select="$XMLFirewallProfile/@DefaultInboundConnectionsAreAllowed"/>
<xsl:variable name="DefaultOutboundConnectionsAreAllowed"
select="$XMLFirewallProfile/@DefaultOutboundConnectionsAreAllowed"/>
<html>
<body>
<div>
<table class="expanddescription"
width="100%"
cellpadding="0"
cellspacing="0">
<tr>
<td width="5"/>
<td>
<div class="descriptionsections">
<xsl:if test="$DisplayName = 'True'">
<xsl:if test="string-length($Type) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallProfileType', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$Type"/>
</xsl:if>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($FirewallState) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallState', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$FirewallState"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($DefaultInboundConnectionsAreAllowed) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallDefaultInboundConnectionsAreAllowed', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$DefaultInboundConnectionsAreAllowed"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($DefaultOutboundConnectionsAreAllowed) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallDefaultOutboundConnectionsAreAllowed', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$DefaultOutboundConnectionsAreAllowed"/>
</xsl:if>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
</xsl:template>
<xsl:template name="DisplayFirewallRules">
<div>
<span id="shortFirewallRules">
<table class="kbsections"
width="100%"
marginheight="0"
marginwidth="0"
cellpadding="0"
cellspacing="0">
<tr class="kbsectionheaders">
<td width="10"></td>
<td width="17"
style="cursor:hand;"
onclick="shortFirewallRules.style.display='none'; longFirewallRules.style.display='inline';">
<img src="../TransformFiles/View/RightArrow.gif"
tabindex="0"
onkeyup="onKeyUp(1)"
onmouseOver="this.src='../TransformFiles/View/RightArrowHighLight.gif';"
onmouseout="this.src='../TransformFiles/View/RightArrow.gif';"/>
</td>
<td>
<table class="kbsectionheaders"
cellpadding="0"
cellspacing="0">
<tr>
<td style="cursor:hand;"
onclick="shortFirewallRules.style.display='none'; longFirewallRules.style.display='inline';">
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRulesHeading', 'KBLocFile')"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</span>
<span id="longFirewallRules"
style="display:'none'">
<table class="kbsections"
width="100%"
marginheight="0"
marginwidth="0"
cellpadding="0"
cellspacing="0">
<tr class="kbsectionheaders">
<td width="10"/>
<td width="10"
style="cursor:hand;"
onclick="shortFirewallRules.style.display='inline'; longFirewallRules.style.display='none';">
<img src="../TransformFiles/View/DownArrow.gif"
tabindex="0"
onkeyup="onKeyUp(0)"
onmouseover="this.src='../TransformFiles/View/DownArrowHighLight.gif';"
onmouseout="this.src='../TransformFiles/View/DownArrow.gif';"/>
</td>
<td>
<table class="kbsectionheaders"
cellpadding="0"
cellspacing="0">
<tr>
<td width="5"/>
<td style="cursor:hand;"
onclick="shortFirewallRules.style.display='inline'; longFirewallRules.style.display='none';">
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRulesHeading', 'KBLocFile')"/>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td></td>
<td></td>
<td>
<xsl:for-each select="$XMLAllFirewallRules">
<xsl:call-template name="DisplayFirewallRule">
<xsl:with-param name="XMLFirewallRule"
select="."/>
</xsl:call-template>
</xsl:for-each>
</td>
</tr>
</table>
</span>
</div>
</xsl:template>
<xsl:template name="DisplayFirewallRule">
<xsl:param name="XMLFirewallRule"/>
<xsl:variable name="ElementId"
select="translate($XMLFirewallRule/@Id, '{} 	

-', '')"/>
<xsl:variable name="Name"
select="$XMLFirewallRule/@Name"/>
<xsl:variable name="Description"
select="$XMLFirewallRule/@Description"/>
<div>
<span id="shortFirewallRule{$ElementId}">
<table class="settingsheaderscollapsed"
width="100%" >
<tr>
<td width="5"
style="cursor:hand;"
onclick="shortFirewallRule{$ElementId}.style.display='none'; longFirewallRule{$ElementId}.style.display='inline';" >
<xsl:attribute name="title">
<xsl:if test="string-length($Name) != 0">
<xsl:value-of select="$Name"/>
</xsl:if>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Tooltip', 'KBLocFile')"/>
</xsl:attribute>
<img src="../TransformFiles/View/RightArrow.gif"
tabindex="0"
onkeyup="onKeyUp(1)"
onmouseOver="this.src='../TransformFiles/View/RightArrowHighLight.gif';"
onmouseout="this.src='../TransformFiles/View/RightArrow.gif';"/>
</td>
<td style="cursor:hand;"
onclick="shortFirewallRule{$ElementId}.style.display='none'; longFirewallRule{$ElementId}.style.display='inline';">
<xsl:attribute name="title">
<xsl:if test="string-length($Description) != 0">
<xsl:value-of select="concat($Description, ', ')"/>
</xsl:if>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_Tooltip', 'KBLocFile')"/>
</xsl:attribute>
<xsl:value-of select="$Name"/>
</td>
</tr>
</table>
</span>
<span id="longFirewallRule{$ElementId}"
style="display:'none'">
<table width="100%">
<tr>
<td valign="top"
width="15"
style="cursor:hand;"
onclick="shortFirewallRule{$ElementId}.style.display='inline'; longFirewallRule{$ElementId}.style.display='none';">
<img src="../TransformFiles/View/DownArrow.gif"
style="cursor:hand;"
tabindex="0"
onkeyup="onKeyUp(0)"
onclick="shortFirewallRule{$ElementId}.style.display='inline'; longFirewallRule{$ElementId}.style.display='none';"
onmouseover="this.src='../TransformFiles/View/DownArrowHighLight.gif';"
onmouseout="this.src='../TransformFiles/View/DownArrow.gif';"/>
</td>
<td>
<table class="sectionsexpanded"
width="95%"
cellpadding="0"
cellspacing="0">
<tr>
<td class="settingsheadersexpanded"
style="cursor:hand;"
onclick="shortFirewallRule{$ElementId}.style.display='inline'; longFirewallRule{$ElementId}.style.display='none';">
<xsl:value-of select="$Name"/>
</td>
</tr>
<tr>
<td>
<xsl:call-template name="DisplayFirewallRuleData">
<xsl:with-param name="XMLFirewallRule"
select="$XMLFirewallRule"/>
<xsl:with-param name="DisplayName">False</xsl:with-param>
</xsl:call-template>
</td>
</tr>
</table>
</td>
</tr>
</table>
</span>
</div>
</xsl:template>
<xsl:template name="DisplayFirewallRuleData">
<xsl:param name="XMLFirewallRule"/>
<xsl:param name="DisplayName"/>
<xsl:variable name="ElementId"
select="translate($XMLFirewallRule/@Id, '{} 	

-', '')"/>
<!--Rule Attributes-->
<xsl:variable name="Id"
select="$XMLFirewallRule/@Id"/>
<xsl:variable name="Name"
select="$XMLFirewallRule/@Name"/>
<xsl:variable name="Description"
select="$XMLFirewallRule/@Description"/>
<xsl:variable name="Group"
select="$XMLFirewallRule/@Group"/>
<xsl:variable name="ProtocolKeyword"
select="$XMLFirewallRule/@ProtocolKeyword"/>
<xsl:variable name="ProtocolNumber"
select="$XMLFirewallRule/@ProtocolNumber"/>
<xsl:variable name="Direction"
select="$XMLFirewallRule/@Direction"/>
<xsl:variable name="Program"
select="$XMLFirewallRule/@Program"/>
<xsl:variable name="Service"
select="$XMLFirewallRule/@Service"/>
<xsl:variable name="EnabledFlag"
select="$XMLFirewallRule/@Enabled"/>
<xsl:variable name="Action"
select="$XMLFirewallRule/@Action"/>
<!--Profiles-->
<xsl:variable name="XMLProfiles"
select="$XMLFirewallRule/Profiles/Profile"/>
<xsl:variable name="Profiles"
select="msftscw:getProfiles($XMLProfiles)"/>
<!--Local Ports-->
<xsl:variable name="XMLLocalPorts"
select="$XMLFirewallRule/LocalPorts"/>
<xsl:variable name="XMLLocalSpecificPorts"
select="$XMLLocalPorts/Port"/>
<xsl:variable name="XMLLocalCustomPorts"
select="$XMLLocalPorts/CustomPort"/>
<xsl:variable name="XMLLocalRegistryPorts"
select="$XMLLocalPorts/RegistryPort"/>
<xsl:variable name="LocalSpecialPorts"
select="msftscw:getSpecialPorts($XMLLocalPorts)"/>
<xsl:variable name="LocalSpecificPorts"
select="msftscw:getSpecificPorts($XMLLocalSpecificPorts)"/>
<xsl:variable name="LocalCustomPorts"
select="msftscw:getCustomPorts($XMLLocalCustomPorts)"/>
<xsl:variable name="LocalRegistryPorts"
select="msftscw:getCustomPorts($XMLLocalRegistryPorts)"/>
<xsl:variable name="LocalPorts"
select="msftscw:MergeLists($LocalSpecialPorts, $LocalSpecificPorts, $LocalCustomPorts, $LocalRegistryPorts)"/>
<!--Remote Ports-->
<xsl:variable name="XMLRemotePorts"
select="$XMLFirewallRule/RemotePorts"/>
<xsl:variable name="XMLRemoteSpecificPorts"
select="$XMLRemotePorts/Port"/>
<xsl:variable name="XMLRemoteCustomPorts"
select="$XMLRemotePorts/CustomPort"/>
<xsl:variable name="XMLRemoteRegistryPorts"
select="$XMLRemotePorts/RegistryPort"/>
<xsl:variable name="RemoteSpecificPorts"
select="msftscw:getSpecificPorts($XMLRemoteSpecificPorts)"/>
<xsl:variable name="RemoteCustomPorts"
select="msftscw:getCustomPorts($XMLRemoteCustomPorts)"/>
<xsl:variable name="RemoteRegistryPorts"
select="msftscw:getCustomPorts($XMLRemoteRegistryPorts)"/>
<xsl:variable name="RemotePorts"
select="msftscw:MergeLists($RemoteSpecificPorts, $RemoteCustomPorts, $RemoteRegistryPorts)"/>
<!--Local Addresses-->
<xsl:variable name="XMLLocalAddresses"
select="$XMLFirewallRule/LocalAddresses"/>
<xsl:variable name="XMLLocalV4Addresses"
select="$XMLLocalAddresses/V4Address"/>
<xsl:variable name="XMLLocalV6Addresses"
select="$XMLLocalAddresses/V6Address"/>
<xsl:variable name="XMLLocalV4Ranges"
select="$XMLLocalAddresses/V4AddressRange"/>
<xsl:variable name="XMLLocalV6Ranges"
select="$XMLLocalAddresses/V6AddressRange"/>
<xsl:variable name="XMLLocalV4Subnets"
select="$XMLLocalAddresses/V4Subnet"/>
<xsl:variable name="XMLLocalV6Subnets"
select="$XMLLocalAddresses/V6Subnet"/>
<xsl:variable name="LocalV4Addresses"
select="msftscw:getAddresses($XMLLocalV4Addresses)"/>
<xsl:variable name="LocalV6Addresses"
select="msftscw:getAddresses($XMLLocalV6Addresses)"/>
<xsl:variable name="LocalV4Ranges"
select="msftscw:getRanges($XMLLocalV4Ranges)"/>
<xsl:variable name="LocalV6Ranges"
select="msftscw:getRanges($XMLLocalV6Ranges)"/>
<xsl:variable name="LocalV4Subnets"
select="msftscw:getSubnets($XMLLocalV4Subnets)"/>
<xsl:variable name="LocalV6Subnets"
select="msftscw:getSubnets($XMLLocalV6Subnets)"/>
<xsl:variable name="LocalAddresses"
select="msftscw:MergeLists($LocalV4Addresses, $LocalV6Addresses, $LocalV4Ranges, $LocalV6Ranges, $LocalV4Subnets, $LocalV6Subnets)"/>
<!--Remote Addresses-->
<xsl:variable name="XMLRemoteAddresses"
select="$XMLFirewallRule/RemoteAddresses"/>
<xsl:variable name="XMLRemoteV4Addresses"
select="$XMLRemoteAddresses/V4Address"/>
<xsl:variable name="XMLRemoteV6Addresses"
select="$XMLRemoteAddresses/V6Address"/>
<xsl:variable name="XMLRemoteV4Ranges"
select="$XMLRemoteAddresses/V4AddressRange"/>
<xsl:variable name="XMLRemoteV6Ranges"
select="$XMLRemoteAddresses/V6AddressRange"/>
<xsl:variable name="XMLRemoteV4Subnets"
select="$XMLRemoteAddresses/V4Subnet"/>
<xsl:variable name="XMLRemoteV6Subnets"
select="$XMLRemoteAddresses/V6Subnet"/>
<xsl:variable name="DefaultGateway"
select="msftscw:getSpecialAddresses($XMLRemoteAddresses, 'DefaultGateway')"/>
<xsl:variable name="WINSServers"
select="msftscw:getSpecialAddresses($XMLRemoteAddresses, 'WINSServers')"/>
<xsl:variable name="DHCPServers"
select="msftscw:getSpecialAddresses($XMLRemoteAddresses, 'DHCPServers')"/>
<xsl:variable name="DNSServers"
select="msftscw:getSpecialAddresses($XMLRemoteAddresses, 'DNSServers')"/>
<xsl:variable name="LocalSubnet"
select="msftscw:getSpecialAddresses($XMLRemoteAddresses, 'LocalSubnet')"/>
<xsl:variable name="RemoteSpecialAddresses"
select="msftscw:MergeLists($DefaultGateway, $WINSServers, $DHCPServers, $DNSServers, $LocalSubnet)"/>
<xsl:variable name="RemoteV4Addresses"
select="msftscw:getAddresses($XMLRemoteV4Addresses)"/>
<xsl:variable name="RemoteV6Addresses"
select="msftscw:getAddresses($XMLRemoteV6Addresses)"/>
<xsl:variable name="RemoteV4Ranges"
select="msftscw:getRanges($XMLRemoteV4Ranges)"/>
<xsl:variable name="RemoteV6Ranges"
select="msftscw:getRanges($XMLRemoteV6Ranges)"/>
<xsl:variable name="RemoteV4Subnets"
select="msftscw:getSubnets($XMLRemoteV4Subnets)"/>
<xsl:variable name="RemoteV6Subnets"
select="msftscw:getSubnets($XMLRemoteV6Subnets)"/>
<xsl:variable name="RemoteAddresses"
select="msftscw:MergeLists($RemoteSpecialAddresses, $RemoteV4Addresses, $RemoteV6Addresses, $RemoteV4Ranges, $RemoteV6Ranges, $RemoteV4Subnets, $RemoteV6Subnets)"/>
<!--Interfaces-->
<xsl:variable name="XMLInterfaces"
select="$XMLFirewallRule/Interfaces/Interface"/>
<xsl:variable name="Interfaces"
select="msftscw:getInterfaces($XMLInterfaces)"/>
<!--ICMPs-->
<xsl:variable name="XMLICMPs"
select="$XMLFirewallRule/ICMPs/ICMP"/>
<xsl:variable name="ICMPs"
select="msftscw:getICMPs($XMLICMPs)"/>
<html>
<body>
<div>
<table class="expanddescription"
width="100%"
cellpadding="0"
cellspacing="0">
<tr>
<td width="5"/>
<td>
<div class="descriptionsections">
<xsl:if test="$DisplayName = 'True'">
<xsl:if test="string-length($Name) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleName', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$Name"/>
</xsl:if>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($Description) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleDescription', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$Description"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($Group) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleGroup', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$Group"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($ProtocolKeyword) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleProtocolKeyword', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$ProtocolKeyword"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($ProtocolNumber) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleProtocolNumber', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$ProtocolNumber"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($Direction) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleDirection', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$Direction"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($Program) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleProgram', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$Program"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($Service) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleService', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$Service"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($EnabledFlag) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleEnabledFlag', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$EnabledFlag"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($Action) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleAction', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$Action"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($Profiles) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleProfiles', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$Profiles"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($LocalPorts) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleLocalPorts', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$LocalPorts"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($RemotePorts) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleRemotePorts', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$RemotePorts"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($LocalAddresses) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleLocalAddresses', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$LocalAddresses"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($RemoteAddresses) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleRemoteAddresses', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$RemoteAddresses"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($Interfaces) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleInterfaces', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$Interfaces"/>
</xsl:if>
</div>
<div class="descriptionsections">
<xsl:if test="string-length($ICMPs) != 0">
<b>
<xsl:value-of select="msftscw:getString('SCWPolicy/SCWKBLocSection/KBLOC_FirewallRuleICMPs', 'KBLocFile')"/>
</b> 
<xsl:value-of select="$ICMPs"/>
</xsl:if>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
</xsl:template>
<msxsl:script language="JScript"
implements-prefix="msftscw">
<![CDATA[
function getRegKeyString(strKey, strSub)
{
var strReturn = "";
if( null == strKey || strKey.length == 0 )
{
return strReturn;
}
var bFirst = false;
var strTemp = "";
var strWidth = 35;
if( null == strSub || strSub.length == 0 )
{
bFirst = true;
strTemp = strKey;
if( strTemp.length <=strWidth )
{
return strTemp;
}
}
else if( strSub.length >= strKey.length )
{
return strReturn;
}
else
{
strTemp = strKey.substr(strSub.length);
strReturn = "<BR/>";
}
var index = strWidth;
var startpos = 0;
while( strTemp.length - startpos > strWidth )
{
while( index > 0 )
{
if( strTemp.charAt(startpos + index)=='\\' )
{
strReturn += strTemp.substr(startpos, index+1);
if( !bFirst )
{
strReturn += "<BR/>";
}
startpos = startpos + index + 1;
index = strWidth;
break;
}
index = index - 1;
}
if( 0 == index )
{
index = strWidth;
strReturn += strTemp.substr(startpos, index+1);
if( !bFirst )
{
strReturn += "<BR/>";
}
startpos = startpos + index + 1;
}
if( bFirst )
{
break;
}
}
if( !bFirst && startpos < strTemp.length )
{
strReturn += strTemp.substr(startpos);
}
return strReturn;
}
function getTableStart(arrTable)
{
//-------------------------------------------------------------------------
// Specify the default formatting of policy tables
//-------------------------------------------------------------------------
var strReturn = "<span style=display:'none'><div class='policyResultsTableDiv'><table class='expanddescription policyResultsTable'><thead>"
var strClass = "settingsheadersexpanded policySectionsExpanded";
//-------------------------------------------------------------------------
// Enumerate through the array
//-------------------------------------------------------------------------
for(i = 0; i < arrTable.length; i++)
{
strReturn += getCell(arrTable[i], strClass, true);
}
return strReturn + "</thead>";
}
function getTableEnd()
{
return "</table></div></span>";
}
function getCell(strText, strClass, bHeader)
{
var strDefaultClass = " policyCellPadding policyResultDataRow ";
var strTD = "<TD class=' ";
if(strClass)
strTD += strClass;
if(bHeader)
strTD += "' noWrap=true>";
else {
strTD += strDefaultClass;
strTD += "'>";
}
if ( ( strText == null ) || ( strText.length == 0 ) ) {
strText = " ";
}
return strTD + strText + "</TD>";
}
function getLocStartupMode(strStartupMode) {
strReturn = "";
strTemp = strStartupMode.toUpperCase();
strxPath = "SCWPolicy/SCWKBLocSection/";
switch ( strTemp ) {
case "AUTOMATIC":
case "MANUAL":
case "DISABLED":
case "IGNORED":
strxPath += strStartupMode;
break;
default:
strxPath = "";
break;
}
strReturn = getString(strxPath, "SCWLocStrings.xml");
if ( (strReturn == null) || ( strReturn.length == 0 ) ){
strReturn = strStartupMode;
}
return strReturn;
}
function getRow()
{
var strReturn = "<TR>";
//-------------------------------------------------------------------------
// For each argument passed in, append it to the return buffer
//-------------------------------------------------------------------------
for(nArgs = 0; nArgs < arguments.length; nArgs++)
{
strReturn += arguments[nArgs];
}
//-------------------------------------------------------------------------
// Return the result with a pad cell (for right whitespace) and a </TR>
//-------------------------------------------------------------------------
return strReturn + "</TR>";
}
function getNodeAttribute(nod, strNode, strAttr)
{
//-------------------------------------------------------------------------
// Select the node, or return null if not found
//-------------------------------------------------------------------------
var pNodeKey = nod;
if(strNode)
{
pNodeKey = nod.selectSingleNode(strNode);
if(null == pNodeKey)
return null;
}
//-------------------------------------------------------------------------
// Return the value or null if not found
//-------------------------------------------------------------------------
return pNodeKey.getAttribute(strAttr);
}
var m_pDomDocument;
var m_bLookupFileFound;
var m_ServiceInfoArray = new Array();
function InitializeLookup()
{
//-------------------------------------------------------------------------
// If a localization xml file exists, then use it.
//-------------------------------------------------------------------------
m_pDomDocument = new ActiveXObject("MSXML2.DOMDocument");
m_bLookupFileFound = false;
if(m_pDomDocument)
{
m_pDomDocument.async = false;
m_bLookupFileFound = m_pDomDocument.load("../kbs/main.xml");
}
if ( m_bLookupFileFound ) {
InitializeServiceInfoArray();
}
return "";
}
function ServiceInfo(name,DispName, Description)
{
this.ServiceName = name.toUpperCase();
this.ServiceDispName = DispName;
this.ServiceDescription = Description;
}
function SortServiceInfo(first, second)
{
if (first.ServiceName == second.ServiceName)
{
return 0 ;
}
else if ( first.ServiceName < second.ServiceName )
{
return -1;
}
else
{
return 1;
}
}
function InitializeServiceInfoArray()
{
strXPath = "SCWKnowledgeBase/ServiceLocalization/Service";
ServiceList = m_pDomDocument.selectNodes(strXPath);
if ( ServiceList != null )
{
for ( iServiceList = 0; iServiceList < ServiceList.length ; iServiceList++ )
{
ServiceNode = ServiceList.item(iServiceList);
if ( ServiceNode != null )
{
strServiceName = getNodeAttribute(ServiceNode, null, "Name");
strServiceDispName = getNodeTextFromString("DisplayName", ServiceNode);
strServiceDescription = getNodeTextFromString("Description", ServiceNode);
if ( strServiceDispName == null ) {
strServiceDispName = "";
}
if ( strServiceDescription == null) {
strServiceDescription = "";
}
m_ServiceInfoArray[iServiceList] = new ServiceInfo(strServiceName, strServiceDispName, strServiceDescription);
}
}
m_ServiceInfoArray.sort(SortServiceInfo);
}
}
function FindServiceInfoObject(Name)
{
Returnobj = null;
for ( iFindSrv = 0 ; iFindSrv < m_ServiceInfoArray.length ; iFindSrv ++ )
{
iComp = m_ServiceInfoArray[iFindSrv].ServiceName.localeCompare(Name.toUpperCase());
if ( iComp == 0 )
{
ReturnObj = m_ServiceInfoArray[iFindSrv];
break;
}
if ( iComp == 1 )
{
ReturnObj = null;
break;
}
}
return ReturnObj;
}
function getServicesTable(nodServicesRoot)
{
function ServiceObject(strDisplayName, strTableRow) {
this.m_strDisplayName = strDisplayName;
this.m_strTableRow = strTableRow;
}
function SortServiceObject(firstService, secondService) {
firstServiceName = firstService.m_strDisplayName.toUpperCase();
secondServiceName = secondService.m_strDisplayName.toUpperCase();
return firstServiceName.localeCompare(secondServiceName);
}
//-------------------------------------------------------------------------
// Show nothing on error
//-------------------------------------------------------------------------
var strReturn = "";
//-------------------------------------------------------------------------
// Get the headers
//-------------------------------------------------------------------------
var arrTableHeader = new Array(getString('SCWPolicy/Sections/Services/Table/ServiceName', 'KBLocFile'),
getString('SCWPolicy/Sections/Services/Table/StartupMode', 'KBLocFile'),
getString('SCWPolicy/Sections/Services/Table/Description', 'KBLocFile'));
//-------------------------------------------------------------------------
// Make sure the xsl:value-of select returned the services section
//-------------------------------------------------------------------------
if(null == nodServicesRoot)
return displayServicesTable();
//-------------------------------------------------------------------------
// Move past the hidden node
//-------------------------------------------------------------------------
var nodServices = nodServicesRoot.nextNode();
if(null == nodServices)
return displayServicesTable();
//-------------------------------------------------------------------------
// Select all of the services
//-------------------------------------------------------------------------
var strServices = "Parameters/Parameter/Service";
var nodServiceNodes = nodServices.selectNodes(strServices);
if(null == nodServiceNodes)
return displayServicesTable();
var strService;
var strDesc;
var strStartupMode;
var nodLookupService;
var strTemp;
//-------------------------------------------------------------------------
// Create a new array so we can sort the formatted services
//-------------------------------------------------------------------------
var arr = new Array(nodServiceNodes.length);
//-------------------------------------------------------------------------
// For each service
//-------------------------------------------------------------------------
for(nService = 0; nService < nodServiceNodes.length; nService++)
{
//---------------------------------------------------------------------
// Which service are we dealing with?
//---------------------------------------------------------------------
strService = getNodeAttribute(nodServiceNodes.item(nService),null,"Name");
//---------------------------------------------------------------------
// Remember its startup mode from the policy XML
//---------------------------------------------------------------------
strTemp = getLocStartupMode(getNodeAttribute(nodServiceNodes.item(nService),null,"StartupMode"));
strStartupMode = getCell(strTemp);
//---------------------------------------------------------------------
// If the the lookup file loaded, then locate this service
//---------------------------------------------------------------------
if(m_bLookupFileFound)
{
ServiceInfoObj = FindServiceInfoObject(strService);
}
else
{
ServiceInfoObj = null;
}
//---------------------------------------------------------------------
// If the service was found in the lookup file (some didn't during
// testing)
//---------------------------------------------------------------------
if(ServiceInfoObj)
{
//-----------------------------------------------------------------
// Get the friendly display name and description
//-----------------------------------------------------------------
strService = ServiceInfoObj.ServiceDispName;
strTemp = ServiceInfoObj.ServiceDescription;
if (strTemp == null)
strTemp = "";
strDesc = getCell(strTemp);
}
else
{
//-----------------------------------------------------------------
// Convert the service to uppercase to avoid sorting issues and
// leave the desc blank to give it a placeholder
//-----------------------------------------------------------------
strService = strService.toUpperCase();
strDesc = getCell("");
}
//---------------------------------------------------------------------
// Build the new service row
//---------------------------------------------------------------------
arr[nService] = new ServiceObject(strService, getRow(getCell(strService), strStartupMode, strDesc));
}
//-------------------------------------------------------------------------
// Use the default JScript ASCII sort
//-------------------------------------------------------------------------
arr.sort(SortServiceObject);
//-------------------------------------------------------------------------
// Convert the array into a string
//-------------------------------------------------------------------------
strReturn = "";
for ( nService = 0 ; nService < arr.length ; nService++ ) {
strReturn += arr[nService].m_strTableRow;
}
//-------------------------------------------------------------------------
// Return the formatted table
//-------------------------------------------------------------------------
function displayServicesTable()
{
return getTableStart(arrTableHeader) + strReturn + getTableEnd();
}
return displayServicesTable();
}
function getTitle(rootNodeList)
{
strText = "";
xPath = "SCWPolicy/Header/Title";
if ( rootNodeList != null ) {
rootNode = rootNodeList.nextNode();
}
if ( rootNode != null ) {
RoolbackAttribute = rootNode.attributes.getNamedItem("RollbackPolicy");
if ( RoolbackAttribute != null ) {
if ( RoolbackAttribute.value == "TRUE") {
xPath = "SCWPolicy/Header/RollbackTitle";
}
}
}
strText = getString(xPath, 'KBLocFile');
return strText;
}
function getDescription(rootNodeList)
{
strText = "";
xPath = "SCWPolicy/Header/Description";
if ( rootNodeList != null ) {
rootNode = rootNodeList.nextNode();
}
if ( rootNode != null ) {
RoolbackAttribute = rootNode.attributes.getNamedItem("RollbackPolicy");
if ( RoolbackAttribute != null ) {
if ( RoolbackAttribute.value == "TRUE") {
xPath = "SCWPolicy/Header/RollbackDescription";
}
}
}
strText = getString(xPath, 'KBLocFile');
return strText;
}
function getAuditValue(strAuditText)
{
strReturn = "";
strTemp = strAuditText.toUpperCase();
strxPath = "SCWPolicy/Sections/Audit/String/";
switch ( strTemp ) {
case "TRUE":
strxPath += "Audit_Enabled";
break;
case "FALSE":
strxPath += "Audit_Disabled";
break;
default:
strxPath = "";
break;
}
strReturn = getString(strxPath, "SCWLocStrings.xml");
if ( (strReturn == null) || ( strReturn.length == 0 ) ){
strReturn = strAuditText;
}
return strReturn;
}
function getAuditType(strAuditType)
{
strReturn = "";
strTemp = strAuditType.toUpperCase();
strxPath = "SCWPolicy/Sections/Audit/String/";
switch ( strTemp ) {
case "SYSTEM":
strxPath += "Audit_SYSTEM";
break;
case "LOGON":
strxPath += "Audit_LOGON";
break;
case "OBJECTACCESS":
strxPath += "Audit_OBJECTACCESS";
break;
case "PRIVILEGEUSE":
strxPath += "Audit_PRIVILEGEUSE";
break;
case "POLICYCHANGE":
strxPath += "Audit_POLICYCHANGE";
break;
case "ACCOUNTMANAGEMENT":
strxPath += "Audit_ACCOUNTMANAGEMENT";
break;
case "DETAILEDTRACKING":
strxPath += "Audit_DETAILEDTRACKING";
break;
case "DIRECTORYSERVICEACCESS":
strxPath += "Audit_DIRECTORYSERVICEACCESS";
break;
case "ACCOUNTLOGON":
strxPath += "Audit_ACCOUNTLOGON";
break;
default:
strxPath = "";
break;
}
strReturn = getString(strxPath, "SCWLocStrings.xml");
if ( (strReturn == null) || ( strReturn.length == 0 ) ){
strReturn = strAuditType;
}
return strReturn;
}
function getLocaleDate(strTemplateDate)
{
DateArr = strTemplateDate.split("/");
if (DateArr.length == 3 ) {
// The month stored in the xml file is of the type SYSTEMTIME, but jscript starts
// the date with 0 and not 1
month = parseInt(DateArr[0]) - 1;
Day = parseInt(DateArr[1]);
Year = parseInt(DateArr[2]);
dateObj = new Date(Year,month,Day);
strReturn = dateObj.toLocaleDateString();
}
else {
strReturn = strTemplateDate;
}
return strReturn;
}
function getLocaleTime(strTemplateTime)
{
TimeArr = strTemplateTime.split(":");
if (TimeArr.length == 3 )
{
hour = parseInt(TimeArr[0]);
min = parseInt(TimeArr[1]);
sec = parseInt(TimeArr[2]);
dateObj = new Date();
dateObj.setHours(hour,min,sec);
strReturn = dateObj.toLocaleTimeString();
}
else
{
strReturn = strTemplateTime;
}
return strReturn;
}
/////////////////////////
// //
// Firewall Section... //
// //
/////////////////////////
function getNodeAttr(node, attrName)
{
var strReturn = "";
if (node == null)
{
return strReturn;
}
var attributes = node.attributes;
var attribute = attributes.getNamedItem(attrName);
if (attribute != null)
{
strReturn = attribute.text;
}
return strReturn;
}
function Merge2Lists(list1, list2)
{
var strReturn = "";
if (list1 != null && list1 != "")
{
strReturn += list1;
}
if (list2 != null && list2 != "")
{
if (strReturn != "")
{
strReturn += ", ";
}
strReturn += list2;
}
return strReturn;
}
function MergeLists(list1, list2, list3, list4, list5, list6, list7, list8, list9, list10)
{
var strReturn = "";
strReturn = Merge2Lists(list1, list2);
strReturn = Merge2Lists(strReturn, list3);
strReturn = Merge2Lists(strReturn, list4);
strReturn = Merge2Lists(strReturn, list5);
strReturn = Merge2Lists(strReturn, list6);
strReturn = Merge2Lists(strReturn, list7);
strReturn = Merge2Lists(strReturn, list8);
strReturn = Merge2Lists(strReturn, list9);
strReturn = Merge2Lists(strReturn, list10);
return strReturn;
}
function getFirewallRules(requiredRules, allRules)
{
var strReturn = "";
if (requiredRules == null)
{
return strReturn;
}
for (var iRequiredRule = 0;
iRequiredRule < requiredRules.length;
++iRequiredRule)
{
var requiredRule = requiredRules.item(iRequiredRule);
var requiredRuleId = getNodeAttr(requiredRule, "Id");
for (var iRule = 0;
iRule < allRules.length;
++iRule)
{
var rule = allRules.item(iRule);
var ruleId = getNodeAttr(rule, "Id");
if (ruleId == requiredRuleId)
{
if (strReturn != "")
{
strReturn += ", ";
}
strReturn += getNodeAttr(rule, "Name");
}
}
}
return strReturn;
}
function getProfiles(nodeList)
{
var strReturn = "";
if (nodeList == null)
{
strReturn = "Domain, Public, Private";
return strReturn;
}
for (var i = 0; i < nodeList.length; ++i)
{
var node = nodeList.item(i);
if (strReturn != "")
{
strReturn += ", ";
}
strReturn += getNodeAttr(node, "Type");
}
return strReturn;
}
function getSpecialPorts(nodeList)
{
var strReturn = "";
if (nodeList == null)
{
return strReturn;
}
var node = nodeList.item(0);
if (node == null)
{
return strReturn;
}
strReturn = getNodeAttr(node, "SpecialPorts");
return strReturn;
}
function getSpecificPorts(nodeList)
{
var strReturn = "";
if (nodeList == null)
{
return strReturn;
}
for (var i = 0; i < nodeList.length; ++i)
{
var node = nodeList.item(i);
if (strReturn != "")
{
strReturn += ", ";
}
strReturn += getNodeAttr(node, "Value");
}
return strReturn;
}
function getCustomPorts(nodeList)
{
var strReturn = "";
if (nodeList == null)
{
return strReturn;
}
for (var i = 0; i < nodeList.length; ++i)
{
var node = nodeList.item(i);
if (strReturn != "")
{
strReturn += ", ";
}
strReturn += getNodeAttr(node, "ResultValue");
}
return strReturn;
}
function getSpecialAddresses(nodeList, keyword)
{
var strReturn = "";
if (nodeList == null)
{
return strReturn;
}
var node = nodeList.item(0);
if (node == null)
{
return strReturn;
}
if (getNodeAttr(node, keyword) == "True")
{
strReturn = keyword;
}
return strReturn;
}
function getAddresses(nodeList)
{
var strReturn = "";
if (nodeList == null)
{
return strReturn;
}
for (var i = 0; i < nodeList.length; ++i)
{
var node = nodeList.item(i);
if (strReturn != "")
{
strReturn += ", ";
}
strReturn += getNodeAttr(node, "Value");
}
return strReturn;
}
function getRanges(nodeList)
{
var strReturn = "";
if (nodeList == null)
{
return strReturn;
}
for (var i = 0; i < nodeList.length; ++i)
{
var node = nodeList.item(i);
if (strReturn != "")
{
strReturn += ", ";
}
strReturn += getNodeAttr(node, "Begin");
strReturn += " - ";
strReturn += getNodeAttr(node, "End");
}
return strReturn;
}
function getSubnets(nodeList)
{
var strReturn = "";
if (nodeList == null)
{
return strReturn;
}
for (var i = 0; i < nodeList.length; ++i)
{
var node = nodeList.item(i);
if (strReturn != "")
{
strReturn += ", ";
}
strReturn += getNodeAttr(node, "Address");
strReturn += "/";
strReturn += getNodeAttr(node, "PrefixLength");
}
return strReturn;
}
function getInterfaces(nodeList)
{
var strReturn = "";
if (nodeList == null)
{
return strReturn;
}
for (var i = 0; i < nodeList.length; ++i)
{
var node = nodeList.item(i);
if (strReturn != "")
{
strReturn += ", ";
}
strReturn += getNodeAttr(node, "Id");
}
return strReturn;
}
function getICMPs(nodeList)
{
var strReturn = "";
if (nodeList == null)
{
return strReturn;
}
for (var i = 0; i < nodeList.length; ++i)
{
var node = nodeList.item(i);
if (strReturn != "")
{
strReturn += ", ";
}
strReturn += getNodeAttr(node, "Type");
strReturn += "/";
strReturn += getNodeAttr(node, "Code");
}
return strReturn;
}
]]>
</msxsl:script>
</xsl:stylesheet>