OpenVAS::OMP - Pure-perl interface to the OpenVAS Management Protocol
use OpenVAS::OMP; my $omp = OpenVAS::OMP->new( host => 'localhost', ssl_verify => 1, username => 'ttester', password => 'Th!s-Is,S3crEt', port => 9390, ); my $hashrefRequest = $omp->commandHash( $hashref ); my $xmlRequest = $omp->commandXML( '<get_info name="CVE-2010-1234" type="cve" details="1"/>', 1 ); my $version = $omp->getVersion;
This module is a simple pure perl interface to the OpenVAS Management Protocol (OMP). It provides and similar functionality as the OMP-CLI client (shipped with OpenVAS).
The class constructor. It accepts serveral configuration arguments (some of them which are optional).
Optional argument. Defaults to 'localhost'. This arguments tells the module the hostname of the server to connect to.
Optional argument. Defaults to '9390'. Use this argument to provide the server port for the OMP server.
Provide a username to authenticate to the OMP server. This argument is not needed for the getVersion() call.
Provide a password to authenticate to the OMP server. This argument is not needed for the getVersion() call.
Optional argument. Defaults to '1' (true). Tell IO::Socket::SSL to verify the SSL certificate on the OMP server. If this argument is set to true and the server certificate is not valid, no connection will be established. If set to '0' or 'undef' the module will not perform any SSL certificate validation (which is not a good idea).
Get the version string from the OMP server. This call doesn't require any user authentication, so username and password arguments are not required in the constructor call.
Query the OMP server with the provided XML string. The resposne will be a hashref with the server response. If you prefer the raw XML output from the server, the optional request raw response argument can be set.
Query the OMP server with the provided hashref. The call will take the hashref and convert it to a XML string and will then query the OMP server. The resposne will be a hashref with the server response. If you prefer the raw XML output from the server, the optional request raw response argument can be set.
The project and the latest code can be found on BitBucket: https://bitbucket.org/wneessen/openvas-omp/
Copyright (C) 2013 by Winfried Neessen <wn@neessen.net>. Published under the terms of the Artistic License 2.0.
To install OpenVAS::OMP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenVAS::OMP
CPAN shell
perl -MCPAN -e shell install OpenVAS::OMP
For more information on module installation, please visit the detailed CPAN module installation guide.