Important

The Nessus Package is currently a Technology Preview

Session

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

class SessionAPI(api: APISession)[source]
api_keys() Dict[source]

Generates a new API key pair for the current user. The API Keys for the current session will also be updated if the auth mechanism is api keys

Returns:

The newly generated keypair for the user.

Return type:

Dict

Example

>>> nessus.session.api_keys()
chpasswd(current_password, new_password) None[source]

Updated the current user’s password.

Parameters:
  • current_password (str) – The user’s current password

  • new_password (str) – The new password for the user

Example

>>> nessus.session.chpasswd('old_pass', 'new_pass')
edit(name: str | None = None, email: str | None = None) None[source]

Updates the current user’s settings.

Parameters:
  • name (str, optional) – Updated name for the user

  • email (str, optional) – Updated email for the user

Example

>>> nessus.session.edit(email='user@name.com')
get() Dict[source]

Returns the current user’s session data

Returns:

The session details dictionary

Return type:

Dict

Example

>>> nessus.session.get()