Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Nessus-Users
[Top] [All Lists]

Re: Report Template sharing --

Subject: Re: Report Template sharing --
Date: Wed, 16 May 2007 12:00:29 -0700
I fixed the issues I was having -- here's a modified template file (the 
complete file), my changes noted in bold, and by >>>

The changes do the following:
Change 1: <xsl:if test = "(alert/level='INFO') or (alert/level='HOLE')">
        Only creates a row if the identified port has a HOLE or INFO level 
item associated with that port
Change 2: <xsl:if test = "(level='INFO') or (level='HOLE')">
        Prints only the HOLES and INFO level items associated with the 
host (no NOTES).


This allowed me to do very full/thorough/verbose scans, but generate 
reports with items needing remediation that were pretty clean and easier 
to read.

Hopefully someone finds it useful, and if you make any good tweaks, feel 
free to pass along

Thx,
Mike


<?xml version='1.0' encoding='utf-8' ?>
<!--Copyright 2003-2004(C) Tenable Network Security-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
<xsl:import href="report_lib.xsl"/>
<xsl:output method="html" indent="yes"/>

<xsl:template name="_report_summary">
        <xsl:for-each select="host">
                <tr>
                        <td width="100%" class="border">
                                <table width="100%" cellspacing="0" 
cellpadding="0">
                                        <tr>
                                                <td width="20%" 
height="100%">
                                                        <div 
class="report_host">
                                                                <a>
 <xsl:attribute name="href"><![CDATA[#]]><xsl:value-of 
select="@hostname"/></xsl:attribute>
 <img border="0" src="images/host.gif" align="absMiddle"></img>
 <xsl:value-of select="@hostname"/>
                                                                </a>
                                                        </div>
                                                </td>
                                                <td 
class="summary_text"><img  src="images/pixel.gif" width="20" 
align="absMiddle"/>
                                                        <xsl:value-of 
select="count(port)"/><![CDATA[ ]]>Open Ports,
                                                        <![CDATA[ 
]]><xsl:value-of 
select="count((port|general)/alert[level='NOTE'])"/><![CDATA[ ]]>Notes,
                                                        <![CDATA[ 
]]><xsl:value-of 
select="count((port|general)/alert[level='INFO'])"/><![CDATA[ ]]>Warnings,
                                                        <![CDATA[ 
]]><xsl:value-of 
select="count((port|general)/alert[level='HOLE'])"/><![CDATA[ ]]>Holes.
                                                </td>
                                        </tr>
                                </table>
                        </td>
                </tr>
                <tr><td height="5"></td></tr>
        </xsl:for-each>
</xsl:template>


<xsl:template match="results">
 
        <xsl:call-template name="report_html_head"/>
 
        <body>
                <table width="100%" cellspacing="0" cellpadding="0">
                        <tr>
                        <td align="center" colspan="2" width="100%">
                                <table width="90%" height="100%" 
cellspacing="0" align="center">
 
                                        <xsl:call-template 
name="report_header"/>
                                        <xsl:call-template 
name="report_time"/>
                                        <tr><td height="40"></td></tr>
                                        <xsl:call-template 
name="report_target"/>
                                        <xsl:call-template 
name="report_error"/>
                                        <xsl:call-template 
name="_report_summary"/>
                                        <tr><td height="40"></td></tr>
 
                                </table>
                        </td>
                        </tr>
                </table>
 
                <!--Main content-->
                <xsl:for-each select="host">

                        <table width="90%" align="center">

                                <xsl:call-template 
name="report_sub_header">
                                        <xsl:with-param name="mode" 
select="'view_by_host'"/>
                                </xsl:call-template>

                                <xsl:for-each select="port|general">
                            <xsl:if test = "(alert/level='INFO') or 
(alert/level='HOLE')">
                                        <tr>
                                        <td width="100%">
                                        <table width="100%" 
cellspacing="0" cellpadding="0">
 
                                        <tr>
                                                <xsl:call-template 
name="report_showhostport">
                                                        <xsl:with-param 
name="showport2" select="'yes'"/>
                                                </xsl:call-template>
 
                                                <td 
class="left_open_border" height="100%">
                                                        <table 
width="100%" height="100%" cellspacing="0" cellpadding="0">
 <xsl:for-each select="alert">
                                                                <xsl:sort 
select="level" order="ascending"/>
                                                            <xsl:if 
test = "(level='INFO') or (level='HOLE')">
 <tr><td><img src="images/pixel.gif" height="3"/></td></tr>
 <xsl:call-template name="report_showalert"/>
                                                            </xsl:if>
 </xsl:for-each>
                                                        </table>
                                                </td>
                                        </tr>
 
                                        </table>
                                        </td>
                                        </tr>
                                        <tr><td height="5"></td></tr>
                            </xsl:if>
                                </xsl:for-each>

                        </table>
 
                        <!--Space-->
                        <table width="100%"><tr><td align="right" 
height="40"></td></tr></table>

                </xsl:for-each> 
 
                <xsl:call-template name="report_footer"/> 
 
        </body>

</xsl:template>
 
</xsl:stylesheet>




_______________________________________________
Nessus mailing list
Nessus@list.nessus.org
http://mail.nessus.org/mailman/listinfo/nessus
<Prev in Thread] Current Thread [Next in Thread>