From 811434ff22a4acc81b902960e498f573433371d8 Mon Sep 17 00:00:00 2001 From: vakarisz Date: Tue, 15 Feb 2022 18:41:19 +0200 Subject: [PATCH] Agent: improved type hints in mimikatz_cred_collector.py --- .../mimikatz_collector/mimikatz_cred_collector.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/monkey/infection_monkey/credential_collectors/mimikatz_collector/mimikatz_cred_collector.py b/monkey/infection_monkey/credential_collectors/mimikatz_collector/mimikatz_cred_collector.py index 9463b3d4f..c4e27a33c 100644 --- a/monkey/infection_monkey/credential_collectors/mimikatz_collector/mimikatz_cred_collector.py +++ b/monkey/infection_monkey/credential_collectors/mimikatz_collector/mimikatz_cred_collector.py @@ -1,4 +1,4 @@ -from typing import List +from typing import Iterable from infection_monkey.credential_collectors import ( Credentials, @@ -13,12 +13,12 @@ from .windows_credentials import WindowsCredentials class MimikatzCredentialCollector(ICredentialCollector): - def collect_credentials(self, options=None) -> List[Credentials]: + def collect_credentials(self, options=None) -> Iterable[Credentials]: creds = pypykatz_handler.get_windows_creds() return MimikatzCredentialCollector._to_credentials(creds) @staticmethod - def _to_credentials(win_creds: List[WindowsCredentials]) -> [Credentials]: + def _to_credentials(win_creds: Iterable[WindowsCredentials]) -> [Credentials]: all_creds = [] for win_cred in win_creds: identities = []