qualys 'about.php' query made mock tests fail, added a bit of logging to mock

This commit is contained in:
Quim
2020-03-03 11:33:03 +01:00
parent 8743b59147
commit e25141261c
2 changed files with 4 additions and 2 deletions

View File

@ -19,9 +19,9 @@ class qualysWhisperAPI(object):
self.logger = logging.getLogger('qualysWhisperAPI')
self.config = config
try:
self.qgc = qualysapi.connect(config, 'qualys_vuln')
self.qgc = qualysapi.connect(config_file=config, section='qualys_vuln')
# Fail early if we can't make a request or auth is incorrect
self.qgc.request('about.php')
# self.qgc.request('about.php')
self.logger.info('Connected to Qualys at {}'.format(self.qgc.server))
except Exception as e:
self.logger.error('Could not connect to Qualys: {}'.format(str(e)))

View File

@ -21,10 +21,12 @@ class mockAPI(object):
def get_directories(self, path):
dir, subdirs, files = next(os.walk(path))
self.logger.debug('Subdirectories found: {}'.format(subdirs))
return subdirs
def get_files(self, path):
dir, subdirs, files = next(os.walk(path))
self.logger.debug('Files found: {}'.format(files))
return files
def qualys_vuln_callback(self, request, uri, response_headers):