Important

The Nessus Package is currently a Technology Preview

Files

Methods described in this section relate to the files API. These methods can be accessed at Nessus.files.

class FilesAPI(api: restfly.session.APISession)[source]
upload(fobj: _io.BytesIO, encrypted: bool = False) str[source]

Uploads a file to Tenable Nessus

Parameters
  • fobj (BytesIO) – The file object to upload

  • encrypted (bool, optional) – Is the file encrypted?

Returns

File identifier to be used in future calls.

Return type

str

Example

>>> with open('example.txt', 'rb') as fobj:
...     fn = nessus.files.upload(fobj)