Iterate through nessus download data
This commit is contained in:
@ -88,7 +88,14 @@ class NessusAPI(object):
|
|||||||
return response.json()
|
return response.json()
|
||||||
if download:
|
if download:
|
||||||
self.logger.debug('Returning data.content')
|
self.logger.debug('Returning data.content')
|
||||||
return response.content
|
response_data = ''
|
||||||
|
count = 0
|
||||||
|
for chunk in response.iter_content(chunk_size=8192):
|
||||||
|
count += 1
|
||||||
|
if chunk:
|
||||||
|
response_data += chunk
|
||||||
|
self.logger.debug('Processed {} chunks'.format(count))
|
||||||
|
return response_data
|
||||||
return response
|
return response
|
||||||
|
|
||||||
def get_scans(self):
|
def get_scans(self):
|
||||||
|
Reference in New Issue
Block a user