Perl interface to Tenable.sc (SecurityCenter) REST API
View the Project on GitHub giterlizzi/perl-Net-SecurityCenter
Perl interface to Tenable.sc (SecurityCenter) REST API
Tenable.sc API command line interface.
use strict;
use warnings;
use Net::SecurityCenter;
my $sc = Net::SecurityCenter('sc.example.org') or die "Error: $@";
$sc->login( username => 'secman', password => 's3cr3t' );
if ($sc->error) {
print "Failed login: " . $sc->error;
exit 0;
}
my $running_scans = $sc->scan_result->list_running;
if ($sc->scan_result->status( id => 1337 ) eq 'completed') {
$sc->scan_result->download( id => 1337,
filename => '/tmp/1337.nessus' );
}
$sc->logout();
To install Net::SecurityCenter
distribution, run the following commands:
cpanm --installdeps .
perl Makefile.PL
make
make test
make install