Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonathanprince/nessus-api-helper
A simple helper for making requests to a Nessus API
https://github.com/jonathanprince/nessus-api-helper
Last synced: 11 days ago
JSON representation
A simple helper for making requests to a Nessus API
- Host: GitHub
- URL: https://github.com/jonathanprince/nessus-api-helper
- Owner: JonathanPrince
- Created: 2019-11-06T14:36:50.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T09:21:51.000Z (almost 2 years ago)
- Last Synced: 2024-04-16T08:46:33.506Z (7 months ago)
- Language: JavaScript
- Size: 745 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Nessus API Helper
A simple module to help make requests to the Nessus API.
## Usage
Create a client instance:
```
const nessus = new Nessus({
host: 'localhost',
user: 'username',
pass: 'password'
})
```Authenticate:
```
await nessus.authenticate()
```Make requests:
```
const scanData = await nessus.getScanById()
```## Constructor Config
| key | description | default |
|-----------|---------------------------------|-------------|
| host | Hostname or IP of Nessus server | localhost |
| port | Nessus port | 8834 |
| protocol | http or https | https |
| user | Nessus username | |
| password | Nessus password | |## Methods
### .authenticate()
Uses the user and password supplied in the constructor to set auth headers for subsequent requests.### .getFolders()
Returns the folder list### .getScans([queryObject])
Returns a list of scans
Optional query object can be used to add the query parameters `folder_id` and/or `last_modification_date`### .getScanById(scanId[, historyId])
Returns scan data for the given scan id### .getScanHost(scanId, hostId[, historyId])
Returns host data for the the given scan and host id### .getScanHostPlugin(scanId, hostId, pluginId[, historyId])
Returns the plugin data for the given scan, host and plugin id### .getScanHostCompliance(scanId, hostId, complianceId[, historyId])
Returns the compliance plugin data for the given scan, host and compliance id