Moved the check to a top level function.

This commit is contained in:
Daniel Goldberg 2018-12-05 13:59:33 +02:00
parent f8f948439c
commit 61f040ef6f
1 changed files with 4 additions and 5 deletions

View File

@ -38,6 +38,8 @@ class WindowsInfoCollector(InfoCollector):
super(WindowsInfoCollector, self).get_info()
self.get_wmi_info()
self.get_installed_packages()
from infection_monkey.config import WormConfiguration
if WormConfiguration.should_use_mimikatz:
self.get_mimikatz_info()
return self.info
@ -55,9 +57,6 @@ class WindowsInfoCollector(InfoCollector):
LOG.debug('finished get_wmi_info')
def get_mimikatz_info(self):
from infection_monkey.config import WormConfiguration
if not WormConfiguration.should_use_mimikatz:
return
mimikatz_collector = MimikatzCollector()
mimikatz_info = mimikatz_collector.get_logon_info()
if mimikatz_info: