This module provides Perl scripts easy way to interface the OMP (OpenVAS Management Protocol) of OpenVAS.
For more information about the OPM follow the online documentation:
https://docs.greenbone.net/API/OMP/omp.html
use Net::OpenVAS;
my $openvas = Net::OpenVAS->new(
host => 'localhost:9390',
username => 'admin',
password => 's3cr3t'
) or die "ERROR: $@";
my $task = $openvas->create_task(
name => [ 'Scan created via Net::OpenVAS' ],
target => { id => 'a800d5c7-3493-4f73-8401-c42e5f2bfc9c' },
config => { id => 'daba56c8-73ec-11df-a475-002264764cea' }
);
if ( $task->is_created ) {
my $task_id = $task->result->{id};
say "Created task $task_id";
my $task_start = $openvas->start_task( task_id => $task_id );
say "Task $task_id started (" . $task_start->status_text . ')' if ( $task_start->is_accepted );
}
if ( $openvas->error ) {
say "ERROR: " . $openvas->error;
}
To install Net::OpenVAS
distribution, run the following commands:
perl Makefile.PL
make
make test
make install
- Copyright 2020 © Giuseppe Di Terlizzi