NAME
Sslscan::Parser - Parse sslscan scan data with Perl
VERSION
This document describes Sslscan::Parser version .01
SYNOPSIS
my $np = new Sslscan::Parser;
my $parser = $np->parse_file('test1.xml');
#a Sslscan::Parser Object
my $host = $parser->get_host('10.0.0.100');
#a Sslscan::Parser::Host Object
my @ports = $host->get_all_ports();
#an Array of Sslscan::Parser::Host::Port Objects
my $port = $host->get_port('80');
#a Sslscan::Parser::Host::Port Object
my @ciphers = $port->get_all_ciphers();
#an Array of Sslscan::Parser::Host::Port::Cipher Objects
For a full listing of methods see the documentation corresponding to each object.
DESCRIPTION
OVERVIEW
Sslscan::Parser -- Core parser
|
+--Sslscan::Parser::Session -- Sslscan scan session information
|
+--Sslscan::Parser::Host -- General host information
| |
| |--Sslscan::Parser::Host::Port -- Port information
| | |
| | +--Sslscan::Parser::Host::Port::Cipher -- Cipher information
| | |
METHODS
Sslscan::Parser
The main idea behind the core modules is, you will first parse the scan data then extract the information. Therefore, you should run parse_file or parse_scan then the you can use any of the get_* methods.
- parse_file($xml_file)
-
Parse a Sslscan XML file. The XML files are generated from using the: Sslscan.pl --xml=file output.xml $IP
- parse_scan($scan_args,@ips)
-
Perform a Sslscan scan with Sslscan::Parser. The results will be parsed once the scan is complete.
- get_session()
-
Obtain the Sslscan::Parser::Session object which contains the session scan information.
- get_host($ipaddr)
-
Obtain the Sslscan::Parser::Host object which the host information.
- get_all_hosts()
-
Obtain an Array of Sslscan::Parser::Host objects which contain host information.
Sslscan::Parser::Session
This object contains the scan session information of the Sslscan scan.
- title()
-
Returns the title of the scan.
- web()
-
Returns the website.
- version()
-
Returns the version of sslscan.
Sslscan::Parser::Host
This object contains the information for a host.
- ip()
-
Returns a string which contains the ip of this host.
- get_port($port)
-
Obtain a Sslscan::Parser::Host::Port object which contains the port information.
- get_all_ports()
-
Obtain an Array of Sslscan::Parser::Host::Port objects which contain port information.
Sslscan::Parser::Host::Port
This object contains the information for a port.
- port()
-
Returns a string which contains the port number.
- get_all_ciphers()
-
Returns an Array of Sslscan::Parser::Host::Port::Cipher objects which contain information about the ciphers
SslScan::Parser::Host::Port::Cipher
This object contains the information for cipher.
- status()
-
Returns the status of the cipher
- cipher()
-
Returns the Cipher.
- bits()
-
Returns the number of bits
- sslversion()
-
Returns the ssl version
EXAMPLES
Here is an example of parsing an XML file using Sslscan::Parser:
my $sslpx = new Sslscan::Parser;
my $parser = $sslpx->parse_file("test1.xml");
foreach my $h ( $parser->get_all_hosts() ){ print "ip: " . $h->ip . "\n"; foreach my $p ( $h->get_all_ports ) { print "port: " . $p->port . "\n"; } print "---\n";
}
SEE ALSO
sslscan, XML::LibXML and Object::InsideOut
AUTHOR
Joshua "Jabra" Abraham, <jabra AT spl0it DOT org>
COPYRIGHT AND LICENSE
Copyright 2009 Joshua D. Abraham. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.