NAME

Net::SecurityCenter::REST - Perl interface to Tenable SecurityCenter REST API

SYNOPSIS

use Net::SecurityCenter::REST;
my $sc = Net::SecurityCenter::REST('sc.example.org');

$sc->login('secman', 'password');

my $running_scans = $sc->get('/scanResult', { filter => 'running' });

$sc->logout();

DESCRIPTION

This module provides Perl scripts easy way to interface the REST API of Tenable SecurityCenter.

For more information about the SecurityCenter REST API follow the online documentation:

https://docs.tenable.com/sccv/api/index.html

CONSTRUCTOR

Net::SecurityCenter::REST->new ( host [, { timeout => $timeout , ssl_options => $ssl_options } ] )

Create a new instance of Net::Security::Center::REST.

  • timeout : Request timeout in seconds (default is 180) If a socket open, read or write takes longer than the timeout, an exception is thrown.

  • ssl_options : A hashref of SSL_* options to pass through to IO::Socket::SSL.

METHODS

$sc->post|get|put|delete|patch ( path [, { param => value, ... } ] )

Execute a request to SecurityCenter REST API. These methods are shorthand for calling request() for the given method.

my $nessus_scan = $sc->post('/scanResult/1337/download',  { 'downloadType' => 'v2' });

$sc->request (method, path [, { param => value, ... } ] )

Execute a HTTP request of the given method type ('GET', 'POST', 'PUT', 'DELETE', ''PATCH') to SecurityCenter REST API.

$sc->login ( username, password )

Login into SecurityCenter.

$sc->logout

Logout from SecurityCenter.

SUPPORT

Bugs / Feature Requests

Please report any bugs or feature requests through the issue tracker at https://github.com/LotarProject/perl-Net-SecurityCenter/issues. You will be notified automatically of any progress on your issue.

Source Code

This is open source software. The code repository is available for public review and contribution under the terms of the license.

https://github.com/LotarProject/perl-Net-SecurityCenter

git clone https://github.com/LotarProject/perl-Net-SecurityCenter.git

AUTHORS

  • Giuseppe Di Terlizzi <gdt@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by Giuseppe Di Terlizzi.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.