292 lines
No EOL
11 KiB
XML
292 lines
No EOL
11 KiB
XML
<?xml version='1.0' ?>
|
|
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
|
|
|
<xsl:import href="StandardTransforms.xsl"/>
|
|
|
|
<xsl:output method="text"/>
|
|
|
|
<xsl:template match="Key">
|
|
<xsl:text>KeyCode SubKeyName
|
|
______________________________________________________________
|
|
</xsl:text>
|
|
|
|
<xsl:choose>
|
|
<xsl:when test="@hive = 'HKEY_LOCAL_MACHINE'"> L </xsl:when>
|
|
<xsl:when test="@hive = 'HKEY_USERS'"> U </xsl:when>
|
|
<xsl:when test="@hive = 'HKEY_CLASSES_ROOT'"> R </xsl:when>
|
|
<xsl:when test="@hive = 'HKEY_CURRENT_USER'"> C </xsl:when>
|
|
<xsl:when test="@hive = 'HKEY_CURRENT_CONFIG'"> G </xsl:when>
|
|
<xsl:otherwise>? </xsl:otherwise>
|
|
</xsl:choose>
|
|
|
|
<xsl:value-of select="@name"/>
|
|
<xsl:text>

</xsl:text>
|
|
|
|
<xsl:if test="@denied = 'true'">
|
|
<xsl:text> ACCESS_DENIED</xsl:text>
|
|
</xsl:if>
|
|
|
|
<xsl:apply-templates select="Subkey"/>
|
|
|
|
<xsl:text>
</xsl:text>
|
|
|
|
<xsl:apply-templates select="Value"/>
|
|
|
|
<xsl:text>
</xsl:text>
|
|
|
|
</xsl:template>
|
|
|
|
<xsl:template match="Subkey">
|
|
<xsl:call-template name="Whitespace">
|
|
<xsl:with-param name="i" select="2"/>
|
|
</xsl:call-template>
|
|
<xsl:value-of select="@name"/>
|
|
<xsl:text>
</xsl:text>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="Value">
|
|
<xsl:call-template name="Whitespace">
|
|
<xsl:with-param name="i" select="4"/>
|
|
</xsl:call-template>
|
|
<xsl:value-of select="@name"/>
|
|
<xsl:text> (</xsl:text><xsl:value-of select="@type"/><xsl:text>)
</xsl:text>
|
|
|
|
<xsl:choose>
|
|
<xsl:when test="(@type = 'REG_EXPAND_SZ') or
|
|
(@type = 'REG_SZ') or
|
|
(@type = 'REG_DWORD') or
|
|
(@type = 'REG_DWORD_BIG_ENDIAN')">
|
|
<xsl:call-template name="Whitespace">
|
|
<xsl:with-param name="i" select="8"/>
|
|
</xsl:call-template>
|
|
<xsl:value-of select="."/>
|
|
<xsl:text>
</xsl:text>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<!-- BINARY -->
|
|
<xsl:call-template name="PrintBinary">
|
|
<xsl:with-param name="data" select="."/>
|
|
</xsl:call-template>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
|
|
<xsl:text>
</xsl:text>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="Success">
|
|
<xsl:text>Registry query complete
</xsl:text>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="PrintBinary">
|
|
<xsl:param name="data"/>
|
|
<xsl:choose>
|
|
<xsl:when test="string-length($data) > 1024">
|
|
<xsl:call-template name="PrintBinary">
|
|
<xsl:with-param name="data" select="substring($data, 1, 1024)"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintBinary">
|
|
<xsl:with-param name="data" select="substring($data, 1025)"/>
|
|
</xsl:call-template>
|
|
</xsl:when>
|
|
<xsl:when test="string-length($data) > 256">
|
|
<xsl:call-template name="PrintBinary">
|
|
<xsl:with-param name="data" select="substring($data, 1, 256)"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintBinary">
|
|
<xsl:with-param name="data" select="substring($data, 257)"/>
|
|
</xsl:call-template>
|
|
</xsl:when>
|
|
<xsl:when test="string-length($data) > 64">
|
|
<xsl:call-template name="PrintBinary">
|
|
<xsl:with-param name="data" select="substring($data, 1, 64)"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintBinary">
|
|
<xsl:with-param name="data" select="substring($data, 65)"/>
|
|
</xsl:call-template>
|
|
</xsl:when>
|
|
<xsl:when test="string-length($data) > 16">
|
|
<xsl:call-template name="PrintBinary">
|
|
<xsl:with-param name="data" select="substring($data, 1, 16)"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintBinary">
|
|
<xsl:with-param name="data" select="substring($data, 17)"/>
|
|
</xsl:call-template>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:call-template name="PrintBinaryLine">
|
|
<xsl:with-param name="data" select="$data"/>
|
|
</xsl:call-template>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="PrintBinaryLine">
|
|
<xsl:param name="data"/>
|
|
|
|
<!-- set the values -->
|
|
<xsl:variable name="val1" select="substring($data, 1, 2)"/>
|
|
<xsl:variable name="val2" select="substring($data, 3, 2)"/>
|
|
<xsl:variable name="val3" select="substring($data, 5, 2)"/>
|
|
<xsl:variable name="val4" select="substring($data, 7, 2)"/>
|
|
<xsl:variable name="val5" select="substring($data, 9, 2)"/>
|
|
<xsl:variable name="val6" select="substring($data, 11, 2)"/>
|
|
<xsl:variable name="val7" select="substring($data, 13, 2)"/>
|
|
<xsl:variable name="val8" select="substring($data, 15, 2)"/>
|
|
|
|
<xsl:call-template name="Whitespace">
|
|
<xsl:with-param name="i" select="8"/>
|
|
</xsl:call-template>
|
|
|
|
<xsl:value-of select="$val1"/>
|
|
<xsl:text> </xsl:text>
|
|
<xsl:value-of select="$val2"/>
|
|
<xsl:text> </xsl:text>
|
|
<xsl:value-of select="$val3"/>
|
|
<xsl:text> </xsl:text>
|
|
<xsl:value-of select="$val4"/>
|
|
<xsl:text> </xsl:text>
|
|
<xsl:value-of select="$val5"/>
|
|
<xsl:text> </xsl:text>
|
|
<xsl:value-of select="$val6"/>
|
|
<xsl:text> </xsl:text>
|
|
<xsl:value-of select="$val7"/>
|
|
<xsl:text> </xsl:text>
|
|
<xsl:value-of select="$val8"/>
|
|
|
|
<xsl:call-template name="Whitespace">
|
|
<xsl:with-param name="i" select="20 - string-length($data)"/>
|
|
</xsl:call-template>
|
|
|
|
<xsl:call-template name="PrintCharacter">
|
|
<xsl:with-param name="char" select="$val1"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintCharacter">
|
|
<xsl:with-param name="char" select="$val2"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintCharacter">
|
|
<xsl:with-param name="char" select="$val3"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintCharacter">
|
|
<xsl:with-param name="char" select="$val4"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintCharacter">
|
|
<xsl:with-param name="char" select="$val5"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintCharacter">
|
|
<xsl:with-param name="char" select="$val6"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintCharacter">
|
|
<xsl:with-param name="char" select="$val7"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintCharacter">
|
|
<xsl:with-param name="char" select="$val8"/>
|
|
</xsl:call-template>
|
|
|
|
<xsl:text>
</xsl:text>
|
|
|
|
</xsl:template>
|
|
|
|
<xsl:template name="PrintCharacter">
|
|
<xsl:param name="char"/>
|
|
|
|
<xsl:choose>
|
|
<xsl:when test="$char = '20'"><xsl:text> </xsl:text></xsl:when>
|
|
<xsl:when test="$char = '21'">!</xsl:when>
|
|
<xsl:when test="$char = '22'">"</xsl:when>
|
|
<xsl:when test="$char = '23'">#</xsl:when>
|
|
<xsl:when test="$char = '24'">$</xsl:when>
|
|
<xsl:when test="$char = '25'">%</xsl:when>
|
|
<xsl:when test="$char = '26'">&</xsl:when>
|
|
<xsl:when test="$char = '27'">'</xsl:when>
|
|
<xsl:when test="$char = '28'">(</xsl:when>
|
|
<xsl:when test="$char = '29'">)</xsl:when>
|
|
<xsl:when test="$char = '2a'">*</xsl:when>
|
|
<xsl:when test="$char = '2b'">+</xsl:when>
|
|
<xsl:when test="$char = '2c'">,</xsl:when>
|
|
<xsl:when test="$char = '2d'">-</xsl:when>
|
|
<xsl:when test="$char = '2e'">.</xsl:when>
|
|
<xsl:when test="$char = '2f'">/</xsl:when>
|
|
<xsl:when test="$char = '30'">0</xsl:when>
|
|
<xsl:when test="$char = '31'">1</xsl:when>
|
|
<xsl:when test="$char = '32'">2</xsl:when>
|
|
<xsl:when test="$char = '33'">3</xsl:when>
|
|
<xsl:when test="$char = '34'">4</xsl:when>
|
|
<xsl:when test="$char = '35'">5</xsl:when>
|
|
<xsl:when test="$char = '36'">6</xsl:when>
|
|
<xsl:when test="$char = '37'">7</xsl:when>
|
|
<xsl:when test="$char = '38'">8</xsl:when>
|
|
<xsl:when test="$char = '39'">9</xsl:when>
|
|
<xsl:when test="$char = '3a'">:</xsl:when>
|
|
<xsl:when test="$char = '3b'">;</xsl:when>
|
|
<xsl:when test="$char = '3c'"><</xsl:when>
|
|
<xsl:when test="$char = '3d'">=</xsl:when>
|
|
<xsl:when test="$char = '3e'">></xsl:when>
|
|
<xsl:when test="$char = '3f'">?</xsl:when>
|
|
<xsl:when test="$char = '40'">@</xsl:when>
|
|
<xsl:when test="$char = '41'">A</xsl:when>
|
|
<xsl:when test="$char = '42'">B</xsl:when>
|
|
<xsl:when test="$char = '43'">C</xsl:when>
|
|
<xsl:when test="$char = '44'">D</xsl:when>
|
|
<xsl:when test="$char = '45'">E</xsl:when>
|
|
<xsl:when test="$char = '46'">F</xsl:when>
|
|
<xsl:when test="$char = '47'">G</xsl:when>
|
|
<xsl:when test="$char = '48'">H</xsl:when>
|
|
<xsl:when test="$char = '49'">I</xsl:when>
|
|
<xsl:when test="$char = '4a'">J</xsl:when>
|
|
<xsl:when test="$char = '4b'">K</xsl:when>
|
|
<xsl:when test="$char = '4c'">L</xsl:when>
|
|
<xsl:when test="$char = '4d'">M</xsl:when>
|
|
<xsl:when test="$char = '4e'">N</xsl:when>
|
|
<xsl:when test="$char = '4f'">O</xsl:when>
|
|
<xsl:when test="$char = '50'">P</xsl:when>
|
|
<xsl:when test="$char = '51'">Q</xsl:when>
|
|
<xsl:when test="$char = '52'">R</xsl:when>
|
|
<xsl:when test="$char = '53'">S</xsl:when>
|
|
<xsl:when test="$char = '54'">T</xsl:when>
|
|
<xsl:when test="$char = '55'">U</xsl:when>
|
|
<xsl:when test="$char = '56'">V</xsl:when>
|
|
<xsl:when test="$char = '57'">W</xsl:when>
|
|
<xsl:when test="$char = '58'">X</xsl:when>
|
|
<xsl:when test="$char = '59'">Y</xsl:when>
|
|
<xsl:when test="$char = '5a'">Z</xsl:when>
|
|
<xsl:when test="$char = '5b'">[</xsl:when>
|
|
<xsl:when test="$char = '5c'">\</xsl:when>
|
|
<xsl:when test="$char = '5d'">]</xsl:when>
|
|
<xsl:when test="$char = '5e'">^</xsl:when>
|
|
<xsl:when test="$char = '5f'">_</xsl:when>
|
|
<xsl:when test="$char = '60'">`</xsl:when>
|
|
<xsl:when test="$char = '61'">a</xsl:when>
|
|
<xsl:when test="$char = '62'">b</xsl:when>
|
|
<xsl:when test="$char = '63'">c</xsl:when>
|
|
<xsl:when test="$char = '64'">d</xsl:when>
|
|
<xsl:when test="$char = '65'">e</xsl:when>
|
|
<xsl:when test="$char = '66'">f</xsl:when>
|
|
<xsl:when test="$char = '67'">g</xsl:when>
|
|
<xsl:when test="$char = '68'">h</xsl:when>
|
|
<xsl:when test="$char = '69'">i</xsl:when>
|
|
<xsl:when test="$char = '6a'">j</xsl:when>
|
|
<xsl:when test="$char = '6b'">k</xsl:when>
|
|
<xsl:when test="$char = '6c'">l</xsl:when>
|
|
<xsl:when test="$char = '6d'">m</xsl:when>
|
|
<xsl:when test="$char = '6e'">n</xsl:when>
|
|
<xsl:when test="$char = '6f'">o</xsl:when>
|
|
<xsl:when test="$char = '70'">p</xsl:when>
|
|
<xsl:when test="$char = '71'">q</xsl:when>
|
|
<xsl:when test="$char = '72'">r</xsl:when>
|
|
<xsl:when test="$char = '73'">s</xsl:when>
|
|
<xsl:when test="$char = '74'">t</xsl:when>
|
|
<xsl:when test="$char = '75'">u</xsl:when>
|
|
<xsl:when test="$char = '76'">v</xsl:when>
|
|
<xsl:when test="$char = '77'">w</xsl:when>
|
|
<xsl:when test="$char = '78'">x</xsl:when>
|
|
<xsl:when test="$char = '79'">y</xsl:when>
|
|
<xsl:when test="$char = '7a'">z</xsl:when>
|
|
<xsl:when test="$char = '7b'">{</xsl:when>
|
|
<xsl:when test="$char = '7c'">|</xsl:when>
|
|
<xsl:when test="$char = '7d'">}</xsl:when>
|
|
<xsl:when test="$char = '7e'">~</xsl:when>
|
|
<xsl:otherwise>.</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:template>
|
|
|
|
</xsl:transform> |