From 7919d3e56900d4b6a4fc8b0b337f66f3a16bf458 Mon Sep 17 00:00:00 2001 From: pemontto Date: Thu, 25 Apr 2019 14:13:31 +0100 Subject: [PATCH] Remove counter for nessus download --- tests/data | 2 +- vulnwhisp/frameworks/nessus.py | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/data b/tests/data index eea0512..8d3c7de 160000 --- a/tests/data +++ b/tests/data @@ -1 +1 @@ -Subproject commit eea0512099d1d6f437884d969ab2986e73dae087 +Subproject commit 8d3c7de5261f9ae55fb94066c414c9dc16e20b83 diff --git a/vulnwhisp/frameworks/nessus.py b/vulnwhisp/frameworks/nessus.py index 7b51501..32c50ab 100755 --- a/vulnwhisp/frameworks/nessus.py +++ b/vulnwhisp/frameworks/nessus.py @@ -135,8 +135,6 @@ class NessusAPI(object): def download_scan(self, scan_id=None, history=None, export_format=''): running = True - counter = 0 - data = {'format': export_format} if not history: query = self.EXPORT.format(scan_id=scan_id) @@ -149,19 +147,14 @@ class NessusAPI(object): token_id = req['token'] if 'token' in req else req['temp_token'] except Exception as e: self.logger.error('{}'.format(str(e))) - self.logger.info('Download for file id {}'.format(str(file_id))) + self.logger.info('Downloading file id {}'.format(str(file_id))) while running: time.sleep(2) - counter += 2 report_status = self.request(self.EXPORT_STATUS.format(scan_id=scan_id, file_id=file_id), method='GET', json_output=True) running = report_status['status'] != 'ready' sys.stdout.write('.') sys.stdout.flush() - # FIXME: why? can this be removed in favour of a counter? - if counter % 60 == 0: - self.logger.info('Completed: {}'.format(counter)) - self.logger.info('Done: {}'.format(counter)) if self.profile == 'tenable': content = self.request(self.EXPORT_FILE_DOWNLOAD.format(scan_id=scan_id, file_id=file_id), method='GET', download=True) else: