Accessing Nessus 6 API with Python

Nessus is one of the popular vulnerability scanners developed by Tenable Network Security, which scans a computer and raises an alert if it discovers any vulnerabilities that an attacker could use to access any computer you have connected to a network. Nessus provides an API to access it programmatically. We can use any library to make HTTP requests, which abound in Python.  Tenable created a python library nessrest (https://github.com/tenable/nessrest) with the requests  module for using the Nessus 6  REST API.

To use this module in our Python script, import it as we did for other modules after installation. We can install the nessrest module with pip:

$ pip install nessrest

Then, import it in our script:

from ...

Get Effective Python Penetration Testing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.