-
-
28 May 2007 18:14:21 UTC
- Distribution: Nmap-Scanner
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (7)
- Testers (449 / 55 / 0)
- Kwalitee
Bus factor: 0- 79.17% Coverage
- License: unknown
- Activity
24 month- Tools
- Download (68.37KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
DESCRIPTION
This class holds the results from a scan. Results include a host list (Nmap::Scanner::HostList) instance and an instance of Nmap::Scanner::NmapRun, which contains information about the scan. There are several methods in this class used by the scanner to populate the result set; the only three that will be of interest to most programmers are:
get_host_list()
Returns an instance of Nmap::Scanner::HostList that can be iterated through to get the host objects found by the search.
Example (Assumes scanner instance is named $scanner):
my $results = $scanner->scan();
my $host_list = $results->get_host_list();
while (my $host = $host_list->get_next()) {
print "Found host named: " . $host->hostname() . "\n"; .. etc ..
}
as_xml()
Returns the results as a well-formed XML document.
Example (Assumes scanner instance is named $scanner):
my $results = $scanner->scan();
print $results->as_xml();
nmap_run()
Returns the Nmap::Scanner::NmapRun instance with information about the scan itself.
See the examples/ directory in the distribution for more examples.
Module Install Instructions
To install Nmap::Scanner, copy and paste the appropriate command in to your terminal.
cpanm Nmap::Scanner
perl -MCPAN -e shell install Nmap::Scanner
For more information on module installation, please visit the detailed CPAN module installation guide.