294 lines
12 KiB
XML
294 lines
12 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="List">
|
|
<xsl:apply-templates select="LSA_Secret" />
|
|
</xsl:template>
|
|
|
|
|
|
<xsl:template match="LSA_Secret">
|
|
<xsl:value-of select="Secret" />
|
|
<xsl:value-of select="@Secret"/>
|
|
<xsl:text>
</xsl:text>
|
|
<xsl:if test = "LSA_Data">
|
|
<!-- BINARY -->
|
|
<xsl:call-template name="PrintBinary">
|
|
<xsl:with-param name="data" select="LSA_Data"/>
|
|
</xsl:call-template>
|
|
</xsl:if>
|
|
<xsl:text>
</xsl:text>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="Success">
|
|
<xsl:text>LSA Dump 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) > 32">
|
|
<xsl:call-template name="PrintBinary">
|
|
<xsl:with-param name="data" select="substring($data, 1, 32)"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintBinary">
|
|
<xsl:with-param name="data" select="substring($data, 33)"/>
|
|
</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:variable name="val9" select="substring($data, 17, 2)"/>
|
|
<xsl:variable name="val10" select="substring($data, 19, 2)"/>
|
|
<xsl:variable name="val11" select="substring($data, 21, 2)"/>
|
|
<xsl:variable name="val12" select="substring($data, 23, 2)"/>
|
|
<xsl:variable name="val13" select="substring($data, 25, 2)"/>
|
|
<xsl:variable name="val14" select="substring($data, 27, 2)"/>
|
|
<xsl:variable name="val15" select="substring($data, 29, 2)"/>
|
|
<xsl:variable name="val16" select="substring($data, 31, 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:text> </xsl:text>
|
|
<xsl:value-of select="$val9"/>
|
|
<xsl:text> </xsl:text>
|
|
<xsl:value-of select="$val10"/>
|
|
<xsl:text> </xsl:text>
|
|
<xsl:value-of select="$val11"/>
|
|
<xsl:text> </xsl:text>
|
|
<xsl:value-of select="$val12"/>
|
|
<xsl:text> </xsl:text>
|
|
<xsl:value-of select="$val13"/>
|
|
<xsl:text> </xsl:text>
|
|
<xsl:value-of select="$val14"/>
|
|
<xsl:text> </xsl:text>
|
|
<xsl:value-of select="$val15"/>
|
|
<xsl:text> </xsl:text>
|
|
<xsl:value-of select="$val16"/>
|
|
|
|
<xsl:call-template name="Whitespace">
|
|
<xsl:with-param name="i" select="40 - 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:call-template name="PrintCharacter">
|
|
<xsl:with-param name="char" select="$val9"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintCharacter">
|
|
<xsl:with-param name="char" select="$val10"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintCharacter">
|
|
<xsl:with-param name="char" select="$val11"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintCharacter">
|
|
<xsl:with-param name="char" select="$val12"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintCharacter">
|
|
<xsl:with-param name="char" select="$val13"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintCharacter">
|
|
<xsl:with-param name="char" select="$val14"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintCharacter">
|
|
<xsl:with-param name="char" select="$val15"/>
|
|
</xsl:call-template>
|
|
<xsl:call-template name="PrintCharacter">
|
|
<xsl:with-param name="char" select="$val16"/>
|
|
</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>
|
|
|
|
|
|
|
|
|