Log In
New Account
  
 
Home My Page Project Tree Code Snippets Project Openings OpenVAS
 
 
Summary Tracker Lists News SCM Files
 

openvas: trunk/openvas-plugins/scripts/scan_info.nasl

File: [openvas] / trunk / openvas-plugins / scripts / scan_info.nasl (download)
Revision: 7711, Fri May 14 14:04:28 2010 UTC (3 months, 2 weeks ago) by chandra
File size: 3047 byte(s)
Added risk_factor
#
# (C) Tenable Network Security
# 
# This script is released under the GPLv2
#

if(description)
{
 script_id(19506);
 script_version ("$Revision$");
 script_tag(name:"risk_factor", value:"None");
 name = "Information about the scan";
 script_name(name);
 script_tag(name:"risk_factor", value:"None");
 
 desc = "
This script displays, for each tested host, information about the scan itself:

 - The version of the plugin set
 - The type of plugin feed (Direct, Registered or GPL)
 - The version of the OpenVAS Engine
 - The port scanner(s) used
 - The port range scanned
 - The date of the scan
 - The duration of the scan
 - The number of hosts scanned in parallel
 - The number of checks done in parallel

Risk factor : None";


 script_description(desc);
 
 summary = "Displays information about the scan";
 script_summary(summary);
 
 script_category(ACT_END);
 
 
 script_copyright("This script is released under the GNU GPLv2");
 family = "General";
 script_family(family);
 exit(0);
}

include('plugin_feed_info.inc');
include('global_settings.inc');


# 
# If no plugin has shown anything, quietly exit
#
list = get_kb_list("Success/*");
if ( isnull(list) ) exit(0);

version = NESSUS_VERSION;
if(isnull(version)) {
 version = OPENVAS_VERSION;
} 

if(isnull(version)) {
 version = "Unknown (OPENVAS_NASL_LEVEL=" + OPENVAS_NASL_LEVEL + ")";
}  

report = 'Information about this scan : \n\n';
report += 'OpenVAS version : ' + version + '\n';

if ( PLUGIN_SET )
{
 report += 'Plugin feed version : ' + PLUGIN_SET     + '\n';
 report += 'Type of plugin feed : ' + PLUGIN_FEED    + '\n';
}

report += 'Scanner IP : ' + this_host()    + '\n';


list = get_kb_list("Host/scanners/*");
if ( ! isnull(list) )
{
 foreach item ( keys(list) )
 {
  item -= "Host/scanners/";
  scanners += item + ' ';
 }

 report += 'Port scanner(s) : ' + scanners + '\n';
}


range = get_preference("port_range");
if ( ! range ) range = "(?)";
report += 'Port range : ' + range + '\n';

report += 'Thorough tests : ';
if ( thorough_tests ) report += 'yes\n';
else report += 'no\n';

report += 'Experimental tests : ';
if ( experimental_scripts ) report += 'yes\n';
else report += 'no\n';

report += 'Paranoia level : ';
report += report_paranoia + '\n';

report += 'Report Verbosity : ';
report += report_verbosity + '\n';

report += 'Safe checks : ';
if ( safe_checks() ) report += 'yes\n';
else report += 'no\n';

report += 'Max hosts : ' + get_preference("max_hosts") + '\n';
report += 'Max checks : ' + get_preference("max_checks") + '\n';


start = get_kb_item("/tmp/start_time");



if ( start )
{
 time = localtime(start);
 if ( time["min"] < 10 ) zero = "0";
 else zero = NULL;

 report += 'Scan Start Date : ' + time["year"] + '/' + time["mon"] + '/' + time["mday"] + ' ' + time["hour"] + ':' + zero + time["min"] + '\n';
}



if ( ! start ) scan_duration = 'unknown (ping_host.nasl not launched?)';
else           scan_duration = string (unixtime() - start, " sec");
report += 'Scan duration : ' + scan_duration + '\n';

log_message(port:0, data:report);

CVS/SVN Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS/SVN Help


This site is hosted by the Intevation GmbH