Vlatko Košturjak > Rapid7-NeXpose-API-0.03 > Rapid7::NeXpose::API

Download:
Rapid7-NeXpose-API-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  3
Open  0
View/Report Bugs
Module Version: 0.03   Source  

NAME ^

Rapid7::NeXpose::API - Communicate with NeXpose via XML NeXpose API v1.1

VERSION ^

Version 0.03

SYNOPSIS ^

This is Perl interface for communication with NeXpose scanner over API v1.1. You can start, stop, pause and resume scan. Watch progress and status of scan, download report, etc.

Currently you can only start scan, list sites and delete site.

    use Rapid7::NeXpose::API;

    my $n = Rapid7::NeXpose::API->new(
                    url=>'https://localhost:3780',password=>'test');
    my $sl = $n->sitelist();
    print "Starting scan for first site found: ";
    printf "%s with ID: %s\n", $sl->[0]->{'name'}, $sl->[0]->{'id'};
    $n->sitescan($sl->[0]->{'id'});

NOTICE ^

This CPAN module uses LWP for communicating with NeXpose over its API via https. Therefore, make sure that you have Net::SSL (provided by Crypt::SSLeay): http://search.cpan.org/perldoc?Crypt::SSLeay or IO::Socket::SSL: http://search.cpan.org/perldoc?IO::Socket::SSL

If you think you have login problems, check this first!

METHODS ^

new ( [key=>value, key2=>value2, ...] )

creates new object Rapid7::NeXpose::API

    my $n = Rapid7::NeXpose::API->new(
                    url=>'https://localhost:3780', debug=>1, 
                    user=>'user', password=>'test', nologin=>1
            );

url ( [$nexpose_url] )

get/set NeXpose base URL

urlapi ( [$nexpose_url_api] )

get/set NeXpose API URL

user ( [$user] )

set NeXpose credentials, returns $user

password ( [$password])

set NeXpose credentials, returns $password

session ( [$session])

set NeXpose session-id, returns $session

syncid ( [$syncid])

set NeXpose sync-id, returns $id

lwpdebug

get/set LWP debugging

xml_request ( <$req> )

perform XML request to nexpose

http_api <$post_data> )

perform api request to nexpose and return content

login ()

login to NeXpose

logout ()

sends logout request, returns 1 on success, 0 on failure

sitelist ()

list sites, returns list of sites

sitescan ( $siteid )

scan site specified by ID

sitedelete ( $siteid )

delete site specified by ID

DESTROY

destructor, calls logout method on destruction

AUTHOR ^

Vlatko Kosturjak, <kost at linux.hr>

BUGS ^

Please report any bugs or feature requests to bug-rapid7-nexpose-api at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Rapid7-NeXpose-API. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Rapid7::NeXpose::API

You can also look for information at:

REPOSITORY ^

Repository is available on GitHub: https://github.com/kost/rapid7-nexpose-api-perl

ACKNOWLEDGEMENTS ^

LICENSE AND COPYRIGHT ^

Copyright 2010 Vlatko Kosturjak.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

syntax highlighting: