fix results

This commit is contained in:
Adrien MALINGREY 2023-04-13 21:14:27 +02:00
parent c6e1977ca2
commit 8537c2a0ca
2 changed files with 13 additions and 15 deletions

View File

@ -44,7 +44,7 @@ action = function(host, port)
answer = http.get_url(scheme.."://"..hostaddress..":"..port.number.."/"..path)
if (answer and answer.status == 200) then
favicon_relative_uri = parseIcon(answer.body) or "/favicon.ico"
favicon_relative_uri = parseIcon(answer.body) or "favicon.ico"
end
favicon_absolute_uri = scheme.."://"..hostaddress..":"..port.number.."/"..favicon_relative_uri

View File

@ -24,12 +24,10 @@
.ui.mini.button {
padding: 1em;
}
.icon {
display: flex !important;
align-items: center;
}
.icon > img {
width: 16px;
height: 16px;
@ -78,16 +76,16 @@
</xsl:choose>
</xsl:variable>
<div class="column">
<div>
<xsl:attribute name="class">
<xsl:variable name="status">
<xsl:choose>
<xsl:when test="$scannedHost/status/@state='up'">ui fluid mini left icon action input info</xsl:when>
<xsl:otherwise>ui fluid mini left icon action input error</xsl:otherwise>
<xsl:when test="$scannedHost/status/@state='up'">info</xsl:when>
<xsl:otherwise>error</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:variable>
<div class="ui fluid mini left icon action input {$status}">
<xsl:choose>
<xsl:when test="$scannedHost/ports/port/script[@id='http-favicon-url']/@output">
<i class="icon"><img class="ui image" src="{$scannedHost/ports/port/script[@id='http-favicon-url']/@output}" alt=""/></i>
<xsl:when test="$scannedHost/ports/port/script[@id='http-get']/elem[@key='favicon']">
<i class="icon"><img class="ui image" src="{$scannedHost/ports/port/script[@id='http-get']/elem[@key='favicon']}" alt=""/></i>
</xsl:when>
<xsl:otherwise>
<i class="server icon"></i>
@ -124,7 +122,7 @@
<xsl:param name="scannedHost"/>
<xsl:param name="scannedHostAddress"/>
<xsl:variable name="serviceName" select="@name"/>
<xsl:variable name="scannedPort" select="$scannedHost/ports/port[service/@name=$serviceName or @portid=$serviceName]"/>
<xsl:variable name="scannedPort" select="$scannedHost/ports/port[service/@name=$serviceName or @portid=$serviceName][1]"/>
<xsl:variable name="state">
<xsl:choose>
<xsl:when test="$scannedPort/script[@id='http-get']/elem[@key='status']>=400">red</xsl:when>
@ -138,9 +136,9 @@
<xsl:text>/</xsl:text>
<xsl:value-of select="$scannedPort/@protocol"/>
<xsl:text> </xsl:text>
<xsl:value-of select="$scannedPort/service/@name"/>
<xsl:text> </xsl:text>
<xsl:value-of select="$scannedPort/state/@state"/>
<xsl:text> </xsl:text>
<xsl:value-of select="$scannedPort/service/@name"/>
<xsl:if test="$scannedPort/script[@id='http-get']/elem[@key='status-line']">
<xsl:text> </xsl:text>
<xsl:value-of select="$scannedPort/script[@id='http-get']/elem[@key='status-line']"/>