"""Nessus======This package covers the Nessus interface... autoclass:: Nessus :members:.. toctree:: :hidden: :glob: agent_groups agents editor files folders groups mail permissions plugin_rules plugins policies proxy scanners scans server session settings software_update tokens users"""fromtenable.base.platformimportAPIPlatformfrom.agent_groupsimportAgentGroupsAPIfrom.agentsimportAgentsAPIfrom.editorimportEditorAPIfrom.filesimportFilesAPIfrom.foldersimportFoldersAPIfrom.groupsimportGroupsAPIfrom.mailimportMailAPIfrom.permissionsimportPermissionsAPIfrom.plugin_rulesimportPluginRulesAPIfrom.pluginsimportPluginsAPIfrom.policiesimportPoliciesAPIfrom.proxyimportProxyAPIfrom.scannersimportScannersAPIfrom.scansimportScansAPIfrom.serverimportServerAPIfrom.sessionimportSessionAPIfrom.settingsimportSettingsAPIfrom.software_updateimportSoftwareUpdateAPIfrom.tokensimportTokensAPIfrom.usersimportUsersAPI
[docs]classNessus(APIPlatform):""" The Nessus object is the primary interaction point for users to interface with Tenable Nessus via the pyTenable library. All of the API endpoint classes that have been written will be grafted onto this class. """_env_base='NESSUS'_ssl_verify=False_conv_json=Truedef_session_auth(self,username,password):# noqa: PLW0221,PLW0613token=self.post('session',json={'username':username,'password':password}).get('token')self._session.headers.update({'X-Cookie':f'token={token}'})self._auth_mech='user'@propertydefagent_groups(self):""" The interface object for the :doc:`Tenable Nessus Agent Groups APIs <agent_groups>`. """returnAgentGroupsAPI(self)@propertydefagents(self):""" The interface object for the :doc:`Tenable Nessus Agents APIs <agents>`. """returnAgentsAPI(self)@propertydefeditor(self):""" The interface object for the :doc:`Tenable Nessus Editor APIs <editor>`. """returnEditorAPI(self)@propertydeffiles(self):""" The interface object for the :doc:`Tenable Nessus File APIs <files>`. """returnFilesAPI(self)@propertydeffolders(self):""" The interface object for the :doc:`Tenable Nessus Folders APIs <folders>`. """returnFoldersAPI(self)@propertydefgroups(self):""" The interface object for the :doc:`Tenable Nessus Groups APIs <groups>`. """returnGroupsAPI(self)@propertydefmail(self):""" The interface object for the :doc:`Tenable Nessus Mail APIs <mail>`. """returnMailAPI(self)@propertydefpermissions(self):""" The interface object for the :doc:`Tenable Nessus Permissions APIs <permissions>`. """returnPermissionsAPI(self)@propertydefplugin_rules(self):""" The interface object for the :doc:`Tenable Nessus Plugin Rules APIs <plugin_rules>`. """returnPluginRulesAPI(self)@propertydefplugins(self):""" The interface object for the :doc:`Tenable Nessus Plugins APIs <plugins>`. """returnPluginsAPI(self)@propertydefpolicies(self):""" The interface object for the :doc:`Tenable Nessus Policies APIs <policies>`. """returnPoliciesAPI(self)@propertydefproxy(self):""" The interface object for the :doc:`Tenable Nessus Proxy APIs <proxy>`. """returnProxyAPI(self)@propertydefscanners(self):""" The interface object for the :doc:`Tenable Nessus Scanners APIs <scanners>`. """returnScannersAPI(self)@propertydefscans(self):""" The interface object for the :doc:`Tenable Nessus Scans APIs <scans>`. """returnScansAPI(self)@propertydefserver(self):""" The interface object for the :doc:`Tenable Nessus Server APIs <server>`. """returnServerAPI(self)@propertydefsession(self):""" The interface object for the :doc:`Tenable Nessus Session APIs <session>`. """returnSessionAPI(self)@propertydefsettings(self):""" The interface object for the :doc:`Tenable Nessus Settings APIs <settings>`. """returnSettingsAPI(self)@propertydefsoftware_update(self):""" The interface object for the :doc:`Tenable Nessus Software Update APIs <software_update>`. """returnSoftwareUpdateAPI(self)@propertydeftokens(self):""" The interface object for the :doc:`Tenable Nessus Tokens APIs <tokens>`. """returnTokensAPI(self)@propertydefusers(self):""" The interface object for the :doc:`Tenable Nessus Users APIs <users>`. """returnUsersAPI(self)