Python library to interface into Tenable's products and applications
Project description
pyTenable is intended to be a pythonic interface into the Tenable application APIs. Further by providing a common interface and a common structure between all of the various applications, we can ease the transition from the vastly different APIs between some of the products.
Issue Tracker: https://github.com/tenable/pyTenable/issues
Github Repository: https://github.com/tenable/pyTenable
Installation
To install the most recent published version to pypi, its simply a matter of installing via pip:
pip install pytenable
If you’re looking for bleeding-edge, then feel free to install directly from the github repository like so:
pip install git+git://github.com/tenable/pytenable.git#egg=pytenable
Getting Started
Lets assume that we want to get the list of scans that have been run on our Tenable.io application. Performing this action is as simple as the following:
from tenable.io import TenableIO
tio = TenableIO('TIO_ACCESS_KEY', 'TIO_SECRET_KEY')
for scan in tio.scans.list():
print('{status}: {id}/{uuid} - {name}'.format(**scan))
Getting started with Tenable.sc is equally as easy:
from tenable.sc import TenableSC
sc = TenableSC('SECURITYCENTER_NETWORK_ADDRESS')
sc.login('SC_USERNAME', 'SC_PASSWORD')
for vuln in sc.analysis.vulns():
print('{ip}:{pluginID}:{pluginName}'.format(**vuln))
For more detailed information on whats available, please refer to the pyTenable Documentation
Logging
Enabling logging for pyTenable is a simple matter of enabling debug logs through the python logging package. An easy example is detailed here:
import logging
logging.basicConfig(level=logging.DEBUG)
License
The project is licensed under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pytenable-1.5.3.tar.gz
.
File metadata
- Download URL: pytenable-1.5.3.tar.gz
- Upload date:
- Size: 245.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b47b046510dc8a9e98965355c95939d973a8d913fe969ecf9a555d71deb24dc1 |
|
MD5 | 10fdae7ce015be698336264c9b38baf7 |
|
BLAKE2b-256 | 8a3d09e561c0814a343b63a255c312c064c8114ff39d773fcc75a6049ba6d621 |
File details
Details for the file pyTenable-1.5.3-py3-none-any.whl
.
File metadata
- Download URL: pyTenable-1.5.3-py3-none-any.whl
- Upload date:
- Size: 354.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f85c11564d66eac6ae310f4bb0bccb94f9b0425e6cbaee55b18882b3eaa9a6df |
|
MD5 | 823c67a4ced9cb9da36d382359b45265 |
|
BLAKE2b-256 | 44c3a7bc5dc0b9bcd68da47e90cf83d560fbf0a8c9bb1c6e614623266f35f2bc |