Add tag to system info if on Azure and harvested creds.

This commit is contained in:
Daniel Goldberg 2018-03-24 21:29:50 +03:00
parent e3bd29ef6f
commit 21abdb5cef
1 changed files with 4 additions and 1 deletions

View File

@ -117,7 +117,8 @@ class InfoCollector(object):
azure_collector = AzureCollector() azure_collector = AzureCollector()
if 'credentials' not in self.info: if 'credentials' not in self.info:
self.info["credentials"] = {} self.info["credentials"] = {}
for cred in azure_collector.extract_stored_credentials(): azure_creds = azure_collector.extract_stored_credentials()
for cred in azure_creds:
username = cred[0] username = cred[0]
password = cred[1] password = cred[1]
if username not in self.info["credentials"]: if username not in self.info["credentials"]:
@ -125,3 +126,5 @@ class InfoCollector(object):
# we might be losing passwords in case of multiple reset attempts on same username # we might be losing passwords in case of multiple reset attempts on same username
# or in case another collector already filled in a password for this user # or in case another collector already filled in a password for this user
self.info["credentials"][username]['Password'] = password self.info["credentials"][username]['Password'] = password
if len(azure_creds) != 0:
self.info["Azure"] = True