Installing the nessrest Python module

Nessus provides an API to access it programmatically from Python. Tenable provides a REST API that we can use any library that allows HTTP requests. We also have the possibility to use specific libraries in Python, such as nessrest: https://github.com/tenable/nessrest.

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

If we try to build the project from the github source code, the dependencies can be satisfied via

pip install -r requirements.txt:

You can import the module in your script ...

Get Mastering Python for Networking and Security 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.