Download the PHP package leonjza/php-nessus-ng without Composer
On this page you can find all versions of the php package leonjza/php-nessus-ng. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download leonjza/php-nessus-ng
More information about leonjza/php-nessus-ng
Files in leonjza/php-nessus-ng
Package php-nessus-ng
Short Description PHP wrapper functions for interfacing with the Nessus V6.x API
License MIT
Informations about the package php-nessus-ng
PHPNessusNG
PHP wrapper functions for interfacing with the Nessus V6.x API.
If you are looking for the Nessus V5.x capable XMLRPC API Class, please see the n5
branch here
Information:
The Nessus 6 Vulnerability Scanner provides a RESTful API interface. This library aims to be a wrapper around this API, allowing you to query it directly, as detailed in the API documentation.
One major advantage of this library is that it does not necessarily have to update when new endpoints are made available. It is simply a wrapper. Calls to the API can be made exactly as it is documented in the API reference found at the /api
resource of your local scanner. For eg. If a API endpoint is defined as:
Then you can call it with:
The latest version of this wrapper has only been tested against a Nessus 6.1 scanner.
Concepts:
There are a fair number of ways to use this library. All methods start the same way though; Instantiating a new instance. The library will handle the authentication cookie automatically internally.
Some examples of calling the API:
Now, you may call API methods either via method chaining, or via the call()
, method.
A method chaining example (assuming $scan_id
== 5) would be:
The same using the call()
method would be:
NOTE: All calls should end with a via($method)
, where $method is the HTTP method to use. via()
accepts a second argument, which specifies if a response should be returned raw if true, or a parsed JSON object if not set (false).
Installation:
The easiest way by far would be to install the library via composer. Add the following line to your composer.json
:
Run php composer.phar update
. You should now have the \Nessus
class available to use.
This will give you the Nessus V6 compatible library. As previously mentioned, should you require the V5 compatile version, its details can be found in the n5
branch.
Usage example:
Include the Composer Autoloader, instantiate a new instance, and start using it. Below is an example script that will download the first available report in the .nessus
format:
Contact
Twitter: @leonjza