[Openvas-commits] r8698 - in trunk/openvas-manager: . src/tests src/tests/report_formats src/tests/report_formats/expected_output src/tests/report_formats/input

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Aug 6 09:21:17 CEST 2010


Author: felix
Date: 2010-08-06 09:21:16 +0200 (Fri, 06 Aug 2010)
New Revision: 8698

Added:
   trunk/openvas-manager/src/tests/report_formats/
   trunk/openvas-manager/src/tests/report_formats/CMakeLists.txt
   trunk/openvas-manager/src/tests/report_formats/README
   trunk/openvas-manager/src/tests/report_formats/diffs/
   trunk/openvas-manager/src/tests/report_formats/expected_output/
   trunk/openvas-manager/src/tests/report_formats/expected_output/report_base.nbe
   trunk/openvas-manager/src/tests/report_formats/generated_output/
   trunk/openvas-manager/src/tests/report_formats/input/
   trunk/openvas-manager/src/tests/report_formats/input/report_base.xml
   trunk/openvas-manager/src/tests/report_formats/test_report_format
Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/tests/CMakeLists.txt
Log:
Add simple setup to check report format outputs against expected
output. Added testing suite consisting of a single, simple test.

* src/tests/CMakeLists.txt: Add report_formats testing subdirectory.

* src/tests/report_formats, src/tests/report_formats/CMakeLists.txt,
src/tests/report_formats/expected_output,
src/tests/report_formats/generated_output,
src/tests/report_formats/input, src/tests/report_formats/README,
src/tests/report_formats/test_report_format: New, test infrastructure.
        
* src/tests/report_formats/input/report_base.xml,
src/tests/report_formats/expected_output/report_base.nbe: New, data for
test.


Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog	2010-08-05 23:14:31 UTC (rev 8697)
+++ trunk/openvas-manager/ChangeLog	2010-08-06 07:21:16 UTC (rev 8698)
@@ -1,3 +1,20 @@
+2010-08-06  Felix Wolfsteller <felix.wolfsteller at greenbone.net>
+
+	Add simple setup to check report format outputs against expected
+	output. Added testing suite consisting of a single, simple test.
+
+	* src/tests/CMakeLists.txt: Add report_formats testing subdirectory.
+
+	* src/tests/report_formats, src/tests/report_formats/CMakeLists.txt,
+	src/tests/report_formats/expected_output,
+	src/tests/report_formats/generated_output,
+	src/tests/report_formats/input, src/tests/report_formats/README,
+	src/tests/report_formats/test_report_format: New, test infrastructure.
+	
+	* src/tests/report_formats/input/report_base.xml,
+	src/tests/report_formats/expected_output/report_base.nbe: New, data for
+	test.
+
 2010-08-05  Matthew Mundell <matthew.mundell at greenbone.net>
 
 	* doc/report-format-HOWTO: Convert tabs to spaces.

Modified: trunk/openvas-manager/src/tests/CMakeLists.txt
===================================================================
--- trunk/openvas-manager/src/tests/CMakeLists.txt	2010-08-05 23:14:31 UTC (rev 8697)
+++ trunk/openvas-manager/src/tests/CMakeLists.txt	2010-08-06 07:21:16 UTC (rev 8698)
@@ -618,4 +618,8 @@
 target_link_libraries (timeout_0 common)
 add_test (timeout_0 timeout_0)
 
+## Report Format tests
+
+add_subdirectory (report_formats)
+
 ## End

Added: trunk/openvas-manager/src/tests/report_formats/CMakeLists.txt
===================================================================
--- trunk/openvas-manager/src/tests/report_formats/CMakeLists.txt	2010-08-05 23:14:31 UTC (rev 8697)
+++ trunk/openvas-manager/src/tests/report_formats/CMakeLists.txt	2010-08-06 07:21:16 UTC (rev 8698)
@@ -0,0 +1,30 @@
+# OpenVAS
+# $Id$
+# Description: CMakefile for the tests of the OpenVAS Manager export generators
+#
+# Authors:
+# Matthew Mundell <matthew.mundell at greenbone.net>
+# Felix Wolfsteller <felix.wolfsteller at greenbone.net>
+#
+# Copyright:
+# Copyright (C) 2010 Greenbone Networks GmbH
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2,
+# or, at your option, any later version as published by the Free
+# Software Foundation
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+## Testing output of report generators
+
+add_test (nbe_report_base   test_report_format  NBE  report_base)
+
+## End

Added: trunk/openvas-manager/src/tests/report_formats/README
===================================================================
--- trunk/openvas-manager/src/tests/report_formats/README	2010-08-05 23:14:31 UTC (rev 8697)
+++ trunk/openvas-manager/src/tests/report_formats/README	2010-08-06 07:21:16 UTC (rev 8698)
@@ -0,0 +1,51 @@
+Explanation of test mechanism
+-----------------------------
+
+The script test_report_format takes two arguments.
+
+test_report_format <format> <input>
+
+with
+ - format: one of the directory names in
+           openvas-manager/src/report_formats (e.g. NBE or HTML)
+ - input:  one of the report xml files in
+           openvas-manager/src/tests/report_formats/input
+           __without file extension___
+
+It generates the corresponding report in
+  openvas-manager/src/tests/report_formats/generated_output/
+and compares it against the desired output in
+  openvas-manager/src/tests/report_formats/expected_output/
+If there is a difference, it is saved in
+  openvas-manager/src/tests/report_formats/diffs
+
+
+How to add a test
+-----------------
+
+1) Place the "source" xml report in
+   openvas-manager/src/tests/report_formats/input (or reuse one)
+   Example: "empty_report.xml"
+2) Get hold of the desired output and put it in
+   openvas-manager/src/tests/report_formats/expected_output .
+   Follow the naming convention.
+   Example: "empty_report.pdf"
+3) Add the test to CMakeLists.txt, like
+   add_test (nbe_report_base PDF empty_report)
+
+
+How to execute tests
+--------------------
+
+`cmake . && make test`
+If the test failed, a diff is placed in the diffs/- subdirectory.
+
+
+Caveats, todos for volunteers
+-----------------------------
+
+- Implicit but straigt-forward naming conventions
+- Need to sweep/backup diffs/- subdirectory yourself
+- test_report_format script is quick&dirty, not documented
+- Naming could still be better
+- Relatively inflexible (could be implemented as targets etc with cmake)

Added: trunk/openvas-manager/src/tests/report_formats/expected_output/report_base.nbe
===================================================================
--- trunk/openvas-manager/src/tests/report_formats/expected_output/report_base.nbe	2010-08-05 23:14:31 UTC (rev 8697)
+++ trunk/openvas-manager/src/tests/report_formats/expected_output/report_base.nbe	2010-08-06 07:21:16 UTC (rev 8698)
@@ -0,0 +1,35 @@
+timestamps|||scan_start|Thu Aug  5 07:52:45 2010|
+results|1.1.1.1|1.1.1.1|microsoft-ds (445/tcp)|1.3.6.1.4.1.25623.1.0.900233|Security Hole|\n\n  Overview: This host has critical security update missing according to\n  Microsoft Bulletin MS09-001.\n\n  Vulnerability Insight:\n  The issue is due to the way Server Message Block (SMB) Protocol software\n  handles specially crafted SMB packets.\n\n  Impact: Successful exploitation could allow remote unauthenticated attackers\n  to cause denying the service by sending a specially crafted network message\n  to a system running the server service.\n\n  Impact Level: System/Network\n\n  Affected Software/OS:\n  Microsoft Windows 2K Service Pack 4 and prior.\n  Microsoft Windows XP Service Pack 3 and prior.\n  Microsoft Windows 2003 Service Pack 2 and prior.\n\n  Fix: Run Windows Update and update the listed hotfixes or download and\n  update mentioned hotfixes in the advisory from the below link,\n  http://www.microsoft.com/technet/security/bulletin/ms09-001.mspx\n\n  References:\n  http://www.milw0rm.com/exploits/6463\n  http://www.microsoft.com/technet/security/bulletin/ms09-001.mspx\n\n  CVSS Score:\n    CVSS Base Score     : 7.1 (AV:N/AC:M/Au:NR/C:N/I:N/A:C)\n    CVSS Temporal Score : 5.6\n  Risk factor : High\nCVE : CVE-2008-4114, CVE-2008-4834, CVE-2008-4835\nBID : 31179\n
+results|1.1.1.1|1.1.1.1|netbios-ns (137/udp)|1.3.6.1.4.1.25623.1.0.10150|Security Warning|The following 4 NetBIOS names have been gathered :\n POLYNOE         = This is the computer name registered for workstation services by a WINS client.\n INTEVATION      = Workgroup / Domain name\n POLYNOE         = Computer name\n INTEVATION      = Workgroup / Domain name (part of the Browser elections)\nThe remote host has the following MAC address on its adapter :\n   00:11:2f:0e:75:11\n\nIf you do not want to allow everyone to find the NetBios name\nof your computer, you should filter incoming traffic to this port.\n\nRisk factor : Medium\nCVE : CAN-1999-0621\n
+results|1.1.1.1|1.1.1.1|vnc-http (5800/tcp)|1.3.6.1.4.1.25623.1.0.10758|Security Warning|\nThe remote server is running VNC.\nVNC permits a console to be displayed remotely.\n\nSolution: Disable VNC access from the network by \nusing a firewall, or stop VNC service if not needed.\n\nRisk factor : Medium\n
+results|1.1.1.1|1.1.1.1|general/tcp|1.3.6.1.4.1.25623.1.0.102002|Security Note|ICMP based OS fingerprint results: \n\nMicrosoft Windows 2003 Server Enterprise Edition (accuracy 100%)\nMicrosoft Windows 2003 Server Standard Edition (accuracy 100%)\nMicrosoft Windows XP SP2 (accuracy 100%)\n\n\n
+results|1.1.1.1|1.1.1.1|general/tcp|1.3.6.1.4.1.25623.1.0.50282|Security Note|System identifier unknown: "bash: uname: command not found\n"\nTherefore no local security checks applied (missing list of installed packages) though ssh login provided and works\n
+results|1.1.1.1|1.1.1.1|general/tcp|1.3.6.1.4.1.25623.1.0.900239|Security Note|Open TCP ports are 445, 5900, 22, 135, 5800, 139\n
+results|1.1.1.1|1.1.1.1|general/tcp|1.3.6.1.4.1.25623.1.0.90003|Security Note|Slad_Fetch has no Result polled.\n
+results|1.1.1.1|1.1.1.1|general/tcp|1.3.6.1.4.1.25623.1.0.90002|Security Note|ChkRootKit: The Plugin was not present on target system, but selected to execute.\nClamAV: The Plugin was not present on target system, but selected to execute.\nHardware MB sensors: The Plugin was not present on target system, but selected to execute.\nHardware MB sensors: The Plugin was not present on target system, but selected to execute.\nLSOF: The Plugin was not present on target system, but selected to execute.\nMBSA: The Plugin was not present on target system, but selected to execute.\nNetstat: The Plugin was not present on target system, but selected to execute.\nOvaldi: The Plugin was not present on target system, but selected to execute.\nTiger: The Plugin was not present on target system, but selected to execute.\nTripwire HIDS: The Plugin was not present on target system, but selected to execute.\nSFC: The Plugin was not present on target system, but selected to execute.\nSnmptrapd: The Plugin was not present on target system, but selected to execute.\nSnort: The Plugin was not present on target system, but selected to execute.\nssh vulnkey: The Plugin was not present on target system, but selected to execute.\nSyslogWatch: The Plugin was not present on target system, but selected to execute.\n\n
+results|1.1.1.1|1.1.1.1|general/tcp|1.3.6.1.4.1.25623.1.0.80091|Security Note|\nSynopsis :\n\nThe remote service implements TCP timestamps.\n\nDescription :\n\nThe remote host implements TCP timestamps, as defined by RFC1323.\nA side effect of this feature is that the uptime of the remote \nhost can sometimes be computed.\n\nSee also :\n\nhttp://www.ietf.org/rfc/rfc1323.txt\n\nRisk factor : \n\nNone\n
+results|1.1.1.1|1.1.1.1|general/tcp|1.3.6.1.4.1.25623.1.0.51662|Security Note|Here is the route from 192.168.11.233 to 1.1.1.1\n\n192.168.11.233\n1.1.1.1\n\n
+results|1.1.1.1|1.1.1.1|microsoft-ds (445/tcp)|1.3.6.1.4.1.25623.1.0.11011|Security Note|A CIFS server is running on this port\n
+results|1.1.1.1|1.1.1.1|microsoft-ds (445/tcp)|1.3.6.1.4.1.25623.1.0.10394|Security Note|It was not possible to log into the remote host using user defined\nlogin/password combinations :\n\n
+results|1.1.1.1|1.1.1.1|microsoft-ds (445/tcp)|1.3.6.1.4.1.25623.1.0.102011|Security Note|\nOverview:\nIt is possible to extract OS, domain and SMB server information\nfrom the Session Setup AndX Response packet which is generated\nduring NTLM authentication.\nDetected SMB workgroup: INTEVATION\nDetected SMB server: Windows 2000 LAN Manager\nDetected OS: Windows 5.1\n\n
+results|1.1.1.1|1.1.1.1|netbios-ssn (139/tcp)|1.3.6.1.4.1.25623.1.0.11011|Security Note|An SMB server is running on this port\n
+results|1.1.1.1|1.1.1.1|ntp (123/udp)|1.3.6.1.4.1.25623.1.0.10884|Security Note|\n  A NTP (Network Time Protocol) server is listening on this port.\n\n  Risk factor : Low\n
+results|1.1.1.1|1.1.1.1|ssh (22/tcp)|1.3.6.1.4.1.25623.1.0.10330|Security Note|An ssh server is running on this port\n
+results|1.1.1.1|1.1.1.1|ssh (22/tcp)|1.3.6.1.4.1.25623.1.0.90022|Security Note|It was possible to login using the SSH credentials supplied.\nHence local security check are enabled.\n
+results|1.1.1.1|1.1.1.1|ssh (22/tcp)|1.3.6.1.4.1.25623.1.0.10267|Security Note|Remote SSH version : SSH-2.0-OpenSSH_5.4\n\nRemote SSH supported authentication : publickey,password,keyboard-interactive\n\n\n
+results|1.1.1.1|1.1.1.1|ssh (22/tcp)|1.3.6.1.4.1.25623.1.0.100259|Security Note|\n\nOverview:\nThe remote SSH Server supports the following SSH Protocol Versions:\n\n1.99\n2.0\n\nSSHv2 Fingerprint: 59:10:f9:5c:e6:dd:3f:21:2b:b2:c8:68:03:f5:1e:55\n\n\nRisk factor : None\n\n
+results|1.1.1.1|1.1.1.1|vnc (5900/tcp)|1.3.6.1.4.1.25623.1.0.10342|Security Note|\nSynopsis :\n\nThe remote host is running a remote display software (VNC)\n\nDescription :\n\nThe remote server is running VNC, a software which ermits a \nconsole to be displayed remotely.\n\nThis allows authenticated users of the remote host to take its \ncontrol remotely.\n\nSolution : \n\nMake sure the use of this software is done in accordance with your\ncorporate security policy, filter incoming traffic to this port.\n\nRisk factor : \n\nNone\n\nPlugin output :\nThe version of the VNC protocol is : RFB 003.003\n\n
+results|1.1.1.1|1.1.1.1|vnc (5900/tcp)|1.3.6.1.4.1.25623.1.0.19288|Security Note|The remote VNC server chose security type #2 (VNC authentication)\n
+results|1.1.1.1|1.1.1.1|vnc-http (5800/tcp)|1.3.6.1.4.1.25623.1.0.10330|Security Note|A web server is running on this port\n
+results|1.1.1.1|1.1.1.1|vnc-http (5800/tcp)|1.3.6.1.4.1.25623.1.0.80109|Security Note|Here is the w3af report:\n[ Thu Aug  5 07:55:11 2010 - information ] Auto-enabling plugin: grep.error500\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ] plugins\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     audit sqli, xss\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     audit config sqli\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         back\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     audit config xss\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         set checkStored True\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         set numberOfChecks 3\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         back\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     back\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ] plugins\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     grep error500\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     back\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ] plugins\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     output textFile, console, gtkOutput\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     output config textFile\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         set verbose False\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         set fileName /tmp/openvas-w3af-1.1.1.1-5800.rep\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         set httpFileName /tmp/openvas-w3af-1.1.1.1-5800.http\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         set showCaller False\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         back\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     output config console\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         set verbose False\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         back\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     output config gtkOutput\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         back\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     back\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ] plugins\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     discovery yahooSiteExplorer\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     discovery config yahooSiteExplorer\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         set resultLimit 300\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         back\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     back\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ] target\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     set target http://1.1.1.1:5800\n[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     back\n[ Thu Aug  5 07:55:11 2010 - error ] There is no point in searching yahoo site explorer for site: "1.1.1.1" . Yahoo doesnt index private pages.\n[ Thu Aug  5 07:55:11 2010 - information ] Found 1 URLs and 1 different points of injection.\n[ Thu Aug  5 07:55:11 2010 - information ] The list of URLs is:\n[ Thu Aug  5 07:55:11 2010 - information ] - http://1.1.1.1:5800\n[ Thu Aug  5 07:55:11 2010 - information ] The list of fuzzable requests is:\n[ Thu Aug  5 07:55:11 2010 - information ] - http://1.1.1.1:5800 | Method: GET\n[ Thu Aug  5 07:55:11 2010 - information ] Finished scanning process.\n[ Thu Aug  5 07:55:12 2010 - console ] termios error: (25, 'Inappropriate ioctl for device')\n[ Thu Aug  5 07:55:12 2010 - console ] \n[ Thu Aug  5 07:55:12 2010 - console ] termios error: (25, 'Inappropriate ioctl for device')\n[ Thu Aug  5 07:55:12 2010 - console ] \nBye.\n\n\n
+results|1.1.1.1|1.1.1.1|epmap (135/tcp)|0|Log Message|Open port.
+results|1.1.1.1|1.1.1.1|general/CPE|1.3.6.1.4.1.25623.1.0.810002|Log Message|No CPE identities could be determined.\n
+results|1.1.1.1|1.1.1.1|general/tcp|1.3.6.1.4.1.25623.1.0.19506|Log Message|Information about this scan : \n\nOpenVAS version : 3.1.0.rc1.\nPlugin feed version : 201008041240\nType of plugin feed : Greenbone Security Feed\nScanner IP : 192.168.11.233\nPort scanner(s) : nmap \nPort range : default\nThorough tests : no\nExperimental tests : no\nParanoia level : 1\nReport Verbosity : 1\nSafe checks : yes\nMax hosts : 20\nMax checks : 4\nScan Start Date : 2010/8/5 7:52\nScan duration : 253 sec\n\n
+results|1.1.1.1|1.1.1.1|microsoft-ds (445/tcp)|0|Log Message|Open port.
+results|1.1.1.1|1.1.1.1|netbios-ssn (139/tcp)|0|Log Message|Open port.
+results|1.1.1.1|1.1.1.1|ssh (22/tcp)|0|Log Message|Open port.
+results|1.1.1.1|1.1.1.1|vnc (5900/tcp)|0|Log Message|Open port.
+results|1.1.1.1|1.1.1.1|vnc-http (5800/tcp)|0|Log Message|Open port.
+timestamps||1.1.1.1|host_start|Thu Aug  5 07:52:46 2010|
+timestamps||1.1.1.1|host_end|Thu Aug  5 07:56:59 2010|
+timestamps|||scan_end|Thu Aug  5 07:56:59 2010|

Added: trunk/openvas-manager/src/tests/report_formats/input/report_base.xml
===================================================================
--- trunk/openvas-manager/src/tests/report_formats/input/report_base.xml	2010-08-05 23:14:31 UTC (rev 8697)
+++ trunk/openvas-manager/src/tests/report_formats/input/report_base.xml	2010-08-06 07:21:16 UTC (rev 8698)
@@ -0,0 +1,243 @@
+<report id="6962effb-8e63-4a4b-b0bd-65cb1fa1f17b"><sort><field>type<order>descending</order></field></sort><filters>hmlg<phrase></phrase><notes>1</notes><result_hosts_only>1</result_hosts_only><min_cvss_base></min_cvss_base><filter>High</filter><filter>Medium</filter><filter>Low</filter><filter>Log</filter></filters><scan_run_status>Done</scan_run_status><scan_result_count>31<filtered>31</filtered></scan_result_count><task id="1ee09f48-df94-4964-a6d4-17572f395fcd"><name>SLAD and the rest</name></task><scan_start>Thu Aug  5 07:52:45 2010</scan_start><ports start="1" max="1000"><port>microsoft-ds (445/tcp)<host>1.1.1.1</host><threat>High</threat></port><port>netbios-ns (137/udp)<host>1.1.1.1</host><threat>Medium</threat></port><port>vnc-http (5800/tcp)<host>1.1.1.1</host><threat>Medium</threat></port><port>general/tcp<host>1.1.1.1</host><threat>Low</threat></port><port>netbios-ssn (139/tcp)<host>1.1.1.1</host><threat>Low</threat></port><port>ntp (123/udp)<host>1.1.1.1</host><threat>Low</threat></port><port>ssh (22/tcp)<host>1.1.1.1</host><threat>Low</threat></port><port>vnc (5900/tcp)<host>1.1.1.1</host><threat>Low</threat></port><port>epmap (135/tcp)<host>1.1.1.1</host><threat>Log</threat></port><port>general/CPE<host>1.1.1.1</host><threat>Log</threat></port></ports><messages><debug>0</debug><hole>1</hole><info>20</info><log>8</log><warning>2</warning></messages><results start="1" max="1000"><result id="6a49072e-bd51-4b68-862a-da60601b8b45"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>microsoft-ds (445/tcp)</port><nvt oid="1.3.6.1.4.1.25623.1.0.900233"><name>Vulnerabilities in SMB Could Allow Remote Code Execution (958687) - Remote</name><cvss_base>7.1</cvss_base><risk_factor>High</risk_factor></nvt><threat>High</threat><description>
+
+  Overview: This host has critical security update missing according to
+  Microsoft Bulletin MS09-001.
+
+  Vulnerability Insight:
+  The issue is due to the way Server Message Block (SMB) Protocol software
+  handles specially crafted SMB packets.
+
+  Impact: Successful exploitation could allow remote unauthenticated attackers
+  to cause denying the service by sending a specially crafted network message
+  to a system running the server service.
+
+  Impact Level: System/Network
+
+  Affected Software/OS:
+  Microsoft Windows 2K Service Pack 4 and prior.
+  Microsoft Windows XP Service Pack 3 and prior.
+  Microsoft Windows 2003 Service Pack 2 and prior.
+
+  Fix: Run Windows Update and update the listed hotfixes or download and
+  update mentioned hotfixes in the advisory from the below link,
+  http://www.microsoft.com/technet/security/bulletin/ms09-001.mspx
+
+  References:
+  http://www.milw0rm.com/exploits/6463
+  http://www.microsoft.com/technet/security/bulletin/ms09-001.mspx
+
+  CVSS Score:
+    CVSS Base Score     : 7.1 (AV:N/AC:M/Au:NR/C:N/I:N/A:C)
+    CVSS Temporal Score : 5.6
+  Risk factor : High
+CVE : CVE-2008-4114, CVE-2008-4834, CVE-2008-4835
+BID : 31179
+</description><notes></notes></result><result id="c3278faa-86c3-4775-8bab-baaa2c585534"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>netbios-ns (137/udp)</port><nvt oid="1.3.6.1.4.1.25623.1.0.10150"><name>Using NetBIOS to retrieve information from a Windows host</name><cvss_base></cvss_base><risk_factor>Medium</risk_factor></nvt><threat>Medium</threat><description>The following 4 NetBIOS names have been gathered :
+ POLYNOE         = This is the computer name registered for workstation services by a WINS client.
+ INTEVATION      = Workgroup / Domain name
+ POLYNOE         = Computer name
+ INTEVATION      = Workgroup / Domain name (part of the Browser elections)
+The remote host has the following MAC address on its adapter :
+   00:11:2f:0e:75:11
+
+If you do not want to allow everyone to find the NetBios name
+of your computer, you should filter incoming traffic to this port.
+
+Risk factor : Medium
+CVE : CAN-1999-0621
+</description><notes></notes></result><result id="2987cc07-d398-4475-8146-7c8780633baa"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>vnc-http (5800/tcp)</port><nvt oid="1.3.6.1.4.1.25623.1.0.10758"><name>Check for VNC HTTP</name><cvss_base></cvss_base><risk_factor>Medium</risk_factor></nvt><threat>Medium</threat><description>
+The remote server is running VNC.
+VNC permits a console to be displayed remotely.
+
+Solution: Disable VNC access from the network by 
+using a firewall, or stop VNC service if not needed.
+
+Risk factor : Medium
+</description><notes></notes></result><result id="8d74ef57-48a4-435e-94bf-5b280f2f6973"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>general/tcp</port><nvt oid="1.3.6.1.4.1.25623.1.0.102002"><name>OS fingerprinting</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>ICMP based OS fingerprint results: 
+
+Microsoft Windows 2003 Server Enterprise Edition (accuracy 100%)
+Microsoft Windows 2003 Server Standard Edition (accuracy 100%)
+Microsoft Windows XP SP2 (accuracy 100%)
+
+
+</description><notes></notes></result><result id="c47e5680-fd63-4bf5-ac1e-46b1cb1e9ca1"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>general/tcp</port><nvt oid="1.3.6.1.4.1.25623.1.0.50282"><name>Determine OS and list of installed packages via SSH login</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>System identifier unknown: &quot;bash: uname: command not found
+&quot;
+Therefore no local security checks applied (missing list of installed packages) though ssh login provided and works
+</description><notes></notes></result><result id="1aee6bb7-1cf1-490c-a46f-59000b047fbc"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>general/tcp</port><nvt oid="1.3.6.1.4.1.25623.1.0.900239"><name>Checks for open tcp ports</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>Open TCP ports are 445, 5900, 22, 135, 5800, 139
+</description><notes></notes></result><result id="22ffe733-f9d7-4335-955a-b97f9654c474"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>general/tcp</port><nvt oid="1.3.6.1.4.1.25623.1.0.90003"><name>SLAD Fetch Results</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>Slad_Fetch has no Result polled.
+</description><notes></notes></result><result id="1f8f1877-2f40-4841-95fe-000c581678f8"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>general/tcp</port><nvt oid="1.3.6.1.4.1.25623.1.0.90002"><name>SLAD Run</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>ChkRootKit: The Plugin was not present on target system, but selected to execute.
+ClamAV: The Plugin was not present on target system, but selected to execute.
+Hardware MB sensors: The Plugin was not present on target system, but selected to execute.
+Hardware MB sensors: The Plugin was not present on target system, but selected to execute.
+LSOF: The Plugin was not present on target system, but selected to execute.
+MBSA: The Plugin was not present on target system, but selected to execute.
+Netstat: The Plugin was not present on target system, but selected to execute.
+Ovaldi: The Plugin was not present on target system, but selected to execute.
+Tiger: The Plugin was not present on target system, but selected to execute.
+Tripwire HIDS: The Plugin was not present on target system, but selected to execute.
+SFC: The Plugin was not present on target system, but selected to execute.
+Snmptrapd: The Plugin was not present on target system, but selected to execute.
+Snort: The Plugin was not present on target system, but selected to execute.
+ssh vulnkey: The Plugin was not present on target system, but selected to execute.
+SyslogWatch: The Plugin was not present on target system, but selected to execute.
+
+</description><notes></notes></result><result id="85d3077e-a40a-4634-a435-f1b84de7b8f5"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>general/tcp</port><nvt oid="1.3.6.1.4.1.25623.1.0.80091"><name>TCP timestamps</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>
+Synopsis :
+
+The remote service implements TCP timestamps.
+
+Description :
+
+The remote host implements TCP timestamps, as defined by RFC1323.
+A side effect of this feature is that the uptime of the remote 
+host can sometimes be computed.
+
+See also :
+
+http://www.ietf.org/rfc/rfc1323.txt
+
+Risk factor : 
+
+None
+</description><notes></notes></result><result id="472a89c7-5fd7-4b3a-a51f-b74a93942106"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>general/tcp</port><nvt oid="1.3.6.1.4.1.25623.1.0.51662"><name>Traceroute</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>Here is the route from 192.168.11.233 to 1.1.1.1
+
+192.168.11.233
+1.1.1.1
+
+</description><notes></notes></result><result id="0241ac46-766b-4ab7-a97f-91be884a5e07"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>microsoft-ds (445/tcp)</port><nvt oid="1.3.6.1.4.1.25623.1.0.11011"><name>SMB on port 445</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>A CIFS server is running on this port
+</description><notes></notes></result><result id="5f42056a-ec01-4988-848b-3be31724dc6b"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>microsoft-ds (445/tcp)</port><nvt oid="1.3.6.1.4.1.25623.1.0.10394"><name>SMB log in</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>It was not possible to log into the remote host using user defined
+login/password combinations :
+
+</description><notes></notes></result><result id="b4e179ae-4f68-4b86-9e1e-049ed026ac04"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>microsoft-ds (445/tcp)</port><nvt oid="1.3.6.1.4.1.25623.1.0.102011"><name>SMB NativeLanMan</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>
+Overview:
+It is possible to extract OS, domain and SMB server information
+from the Session Setup AndX Response packet which is generated
+during NTLM authentication.
+Detected SMB workgroup: INTEVATION
+Detected SMB server: Windows 2000 LAN Manager
+Detected OS: Windows 5.1
+
+</description><notes></notes></result><result id="0f5d2cc5-9d92-42e1-81aa-5c197cbf5e49"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>netbios-ssn (139/tcp)</port><nvt oid="1.3.6.1.4.1.25623.1.0.11011"><name>SMB on port 445</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>An SMB server is running on this port
+</description><notes></notes></result><result id="0e6c4bd5-fc37-4a60-9cc8-b89e66c1650c"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>ntp (123/udp)</port><nvt oid="1.3.6.1.4.1.25623.1.0.10884"><name>NTP read variables</name><cvss_base></cvss_base><risk_factor>Low</risk_factor></nvt><threat>Low</threat><description>
+  A NTP (Network Time Protocol) server is listening on this port.
+
+  Risk factor : Low
+</description><notes></notes></result><result id="5a4b7cd2-fc67-4763-89c9-ba09c943cb98"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>ssh (22/tcp)</port><nvt oid="1.3.6.1.4.1.25623.1.0.10330"><name>Services</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>An ssh server is running on this port
+</description><notes></notes></result><result id="fe595eff-f0f5-4b74-a220-f6ecceb4cc73"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>ssh (22/tcp)</port><nvt oid="1.3.6.1.4.1.25623.1.0.90022"><name>SSH Authorization</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>It was possible to login using the SSH credentials supplied.
+Hence local security check are enabled.
+</description><notes></notes></result><result id="555898b4-e0c4-43e3-b6a2-ea2b09f14084"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>ssh (22/tcp)</port><nvt oid="1.3.6.1.4.1.25623.1.0.10267"><name>SSH Server type and version</name><cvss_base></cvss_base><risk_factor>Low</risk_factor></nvt><threat>Low</threat><description>Remote SSH version : SSH-2.0-OpenSSH_5.4
+
+Remote SSH supported authentication : publickey,password,keyboard-interactive
+
+
+</description><notes></notes></result><result id="b54a248e-a592-40ea-9c68-942f057292ad"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>ssh (22/tcp)</port><nvt oid="1.3.6.1.4.1.25623.1.0.100259"><name>SSH Protocol Versions Supported</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>
+
+Overview:
+The remote SSH Server supports the following SSH Protocol Versions:
+
+1.99
+2.0
+
+SSHv2 Fingerprint: 59:10:f9:5c:e6:dd:3f:21:2b:b2:c8:68:03:f5:1e:55
+
+
+Risk factor : None
+
+</description><notes></notes></result><result id="d563647f-966f-4ad1-b53e-7fc98af4ead2"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>vnc (5900/tcp)</port><nvt oid="1.3.6.1.4.1.25623.1.0.10342"><name>Check for VNC</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>
+Synopsis :
+
+The remote host is running a remote display software (VNC)
+
+Description :
+
+The remote server is running VNC, a software which ermits a 
+console to be displayed remotely.
+
+This allows authenticated users of the remote host to take its 
+control remotely.
+
+Solution : 
+
+Make sure the use of this software is done in accordance with your
+corporate security policy, filter incoming traffic to this port.
+
+Risk factor : 
+
+None
+
+Plugin output :
+The version of the VNC protocol is : RFB 003.003
+
+</description><notes></notes></result><result id="ea404ac7-64c3-40df-ad7e-f440fedcf31d"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>vnc (5900/tcp)</port><nvt oid="1.3.6.1.4.1.25623.1.0.19288"><name>VNC security types</name><cvss_base></cvss_base><risk_factor>High</risk_factor></nvt><threat>Low</threat><description>The remote VNC server chose security type #2 (VNC authentication)
+</description><notes></notes></result><result id="d4814808-e335-49d0-a253-1b6ac8406e41"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>vnc-http (5800/tcp)</port><nvt oid="1.3.6.1.4.1.25623.1.0.10330"><name>Services</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>A web server is running on this port
+</description><notes></notes></result><result id="5f39c4dc-7006-41e1-bdcb-e4b05646d920"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>vnc-http (5800/tcp)</port><nvt oid="1.3.6.1.4.1.25623.1.0.80109"><name>w3af (NASL wrapper)</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Low</threat><description>Here is the w3af report:
+[ Thu Aug  5 07:55:11 2010 - information ] Auto-enabling plugin: grep.error500
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ] plugins
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     audit sqli, xss
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     audit config sqli
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         back
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     audit config xss
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         set checkStored True
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         set numberOfChecks 3
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         back
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     back
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ] plugins
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     grep error500
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     back
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ] plugins
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     output textFile, console, gtkOutput
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     output config textFile
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         set verbose False
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         set fileName /tmp/openvas-w3af-1.1.1.1-5800.rep
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         set httpFileName /tmp/openvas-w3af-1.1.1.1-5800.http
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         set showCaller False
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         back
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     output config console
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         set verbose False
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         back
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     output config gtkOutput
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         back
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     back
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ] plugins
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     discovery yahooSiteExplorer
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     discovery config yahooSiteExplorer
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         set resultLimit 300
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]         back
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     back
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ] target
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     set target http://1.1.1.1:5800
+[ Thu Aug  5 07:55:11 2010 - Enabled plugins ]     back
+[ Thu Aug  5 07:55:11 2010 - error ] There is no point in searching yahoo site explorer for site: &quot;1.1.1.1&quot; . Yahoo doesnt index private pages.
+[ Thu Aug  5 07:55:11 2010 - information ] Found 1 URLs and 1 different points of injection.
+[ Thu Aug  5 07:55:11 2010 - information ] The list of URLs is:
+[ Thu Aug  5 07:55:11 2010 - information ] - http://1.1.1.1:5800
+[ Thu Aug  5 07:55:11 2010 - information ] The list of fuzzable requests is:
+[ Thu Aug  5 07:55:11 2010 - information ] - http://1.1.1.1:5800 | Method: GET
+[ Thu Aug  5 07:55:11 2010 - information ] Finished scanning process.
+[ Thu Aug  5 07:55:12 2010 - console ] termios error: (25, &apos;Inappropriate ioctl for device&apos;)
+[ Thu Aug  5 07:55:12 2010 - console ] 
+[ Thu Aug  5 07:55:12 2010 - console ] termios error: (25, &apos;Inappropriate ioctl for device&apos;)
+[ Thu Aug  5 07:55:12 2010 - console ] 
+Bye.
+
+
+</description><notes></notes></result><result id="9be70515-9b2d-4c94-bf2b-d0c95ae1ba82"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>epmap (135/tcp)</port><nvt oid="0"><name></name><cvss_base></cvss_base><risk_factor></risk_factor></nvt><threat>Log</threat><description>Open port.</description><notes></notes></result><result id="e031d023-06d9-461b-8404-87dedeed2e3e"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>general/CPE</port><nvt oid="1.3.6.1.4.1.25623.1.0.810002"><name>CPE Inventory</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Log</threat><description>No CPE identities could be determined.
+</description><notes></notes></result><result id="351b3104-0fce-4450-88e4-79399ccc2d14"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>general/tcp</port><nvt oid="1.3.6.1.4.1.25623.1.0.19506"><name>Information about the scan</name><cvss_base></cvss_base><risk_factor>None</risk_factor></nvt><threat>Log</threat><description>Information about this scan : 
+
+OpenVAS version : 3.1.0.rc1.
+Plugin feed version : 201008041240
+Type of plugin feed : Greenbone Security Feed
+Scanner IP : 192.168.11.233
+Port scanner(s) : nmap 
+Port range : default
+Thorough tests : no
+Experimental tests : no
+Paranoia level : 1
+Report Verbosity : 1
+Safe checks : yes
+Max hosts : 20
+Max checks : 4
+Scan Start Date : 2010/8/5 7:52
+Scan duration : 253 sec
+
+</description><notes></notes></result><result id="45a925ed-10cd-4187-92be-4a71b8112f18"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>microsoft-ds (445/tcp)</port><nvt oid="0"><name></name><cvss_base></cvss_base><risk_factor></risk_factor></nvt><threat>Log</threat><description>Open port.</description><notes></notes></result><result id="3cc41866-4873-4c41-a2fb-aa5586d35398"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>netbios-ssn (139/tcp)</port><nvt oid="0"><name></name><cvss_base></cvss_base><risk_factor></risk_factor></nvt><threat>Log</threat><description>Open port.</description><notes></notes></result><result id="75382e32-6912-4f8d-8831-9ae747c73f4f"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>ssh (22/tcp)</port><nvt oid="0"><name></name><cvss_base></cvss_base><risk_factor></risk_factor></nvt><threat>Log</threat><description>Open port.</description><notes></notes></result><result id="ddc832c8-49db-4a1b-85c8-ad06f5ea8033"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>vnc (5900/tcp)</port><nvt oid="0"><name></name><cvss_base></cvss_base><risk_factor></risk_factor></nvt><threat>Log</threat><description>Open port.</description><notes></notes></result><result id="3833568d-05a6-4625-bae2-d6eaa6dc8814"><subnet>1.1.1.1</subnet><host>1.1.1.1</host><port>vnc-http (5800/tcp)</port><nvt oid="0"><name></name><cvss_base></cvss_base><risk_factor></risk_factor></nvt><threat>Log</threat><description>Open port.</description><notes></notes></result></results><host_start>Thu Aug  5 07:52:46 2010<host>1.1.1.1</host></host_start><host_end>Thu Aug  5 07:56:59 2010<host>1.1.1.1</host></host_end><scan_end>Thu Aug  5 07:56:59 2010</scan_end></report>
\ No newline at end of file

Added: trunk/openvas-manager/src/tests/report_formats/test_report_format
===================================================================
--- trunk/openvas-manager/src/tests/report_formats/test_report_format	2010-08-05 23:14:31 UTC (rev 8697)
+++ trunk/openvas-manager/src/tests/report_formats/test_report_format	2010-08-06 07:21:16 UTC (rev 8698)
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# OpenVAS
+# $Id$
+# Description: Script to create reports and compare them with desired
+#              results conveniently, for testing.
+#
+# Authors:
+# Felix Wolfsteller <felix.wolfsteller at greenbone.net>
+#
+# Copyright:
+# Copyright (C) 2010 Greenbone Networks GmbH
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2,
+# or, at your option, any later version as published by the Free
+# Software Foundation
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+FORMAT=$1
+FILE_EXTENSION=`echo $FORMAT | tr '[:upper:]' '[:lower:]'`
+INPUT_NAME=$2
+
+REL_TEST_DATA_DIR=../../tests/report_formats
+
+INPUT=$REL_TEST_DATA_DIR/input/$INPUT_NAME.xml
+EXPECTED_OUTPUT=$REL_TEST_DATA_DIR/expected_output/$INPUT_NAME.$FILE_EXTENSION
+GENERATED_OUTPUT=$REL_TEST_DATA_DIR/generated_output/test.$INPUT_NAME.$FILE_EXTENSION
+
+rm -f $GENERATED_OUTPUT
+
+cd ../../report_formats/$1 && sh generate $INPUT > $GENERATED_OUTPUT && diff $GENERATED_OUTPUT $EXPECTED_OUTPUT | tee $REL_TEST_DATA_DIR/diffs/$INPUT_NAME.$FILE_EXTENSION.diff


Property changes on: trunk/openvas-manager/src/tests/report_formats/test_report_format
___________________________________________________________________
Name: svn:executable
   + *



More information about the Openvas-commits mailing list