diff --git a/vulnwhisp/frameworks/nessus.py b/vulnwhisp/frameworks/nessus.py index 3a56726..9be8103 100755 --- a/vulnwhisp/frameworks/nessus.py +++ b/vulnwhisp/frameworks/nessus.py @@ -46,8 +46,8 @@ class NessusAPI(object): self.logger = logging.getLogger('NessusAPI') if verbose: self.logger.setLevel(logging.DEBUG) - if username is None or password is None: - raise Exception('ERROR: Missing username or password.') + if not all((username, password)) and not all((access_key, secret_key)): + raise Exception('ERROR: Missing username, password or API keys.') self.user = username self.password = password diff --git a/vulnwhisp/vulnwhisp.py b/vulnwhisp/vulnwhisp.py index d15bc03..1e2b827 100755 --- a/vulnwhisp/vulnwhisp.py +++ b/vulnwhisp/vulnwhisp.py @@ -58,8 +58,12 @@ class vulnWhispererBase(object): except: self.enabled = False self.hostname = self.config.get(self.CONFIG_SECTION, 'hostname') - self.username = self.config.get(self.CONFIG_SECTION, 'username') - self.password = self.config.get(self.CONFIG_SECTION, 'password') + try: + self.username = self.config.get(self.CONFIG_SECTION, 'username') + self.password = self.config.get(self.CONFIG_SECTION, 'password') + except: + self.username = None + self.password = None self.write_path = self.config.get(self.CONFIG_SECTION, 'write_path') self.db_path = self.config.get(self.CONFIG_SECTION, 'db_path') self.verbose = self.config.getbool(self.CONFIG_SECTION, 'verbose')