From 01612c402aa462bf8f1106d5c68911b155ce2438 Mon Sep 17 00:00:00 2001 From: vakarisz Date: Tue, 15 Feb 2022 14:58:03 +0200 Subject: [PATCH] Agent: add options to ICredentialCollector interface --- .../credential_collectors/i_credential_collector.py | 4 ++-- .../mimikatz_collector/mimikatz_cred_collector.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/monkey/infection_monkey/credential_collectors/i_credential_collector.py b/monkey/infection_monkey/credential_collectors/i_credential_collector.py index 15798cf06..846cd26ec 100644 --- a/monkey/infection_monkey/credential_collectors/i_credential_collector.py +++ b/monkey/infection_monkey/credential_collectors/i_credential_collector.py @@ -1,10 +1,10 @@ from abc import ABC, abstractmethod -from typing import List +from typing import List, Mapping, Union from .credentials import Credentials class ICredentialCollector(ABC): @abstractmethod - def collect_credentials(self) -> List[Credentials]: + def collect_credentials(self, options: Union[Mapping, None]) -> List[Credentials]: pass 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 708bc7a32..75a84c0bb 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 @@ -14,7 +14,7 @@ from .windows_credentials import WindowsCredentials class MimikatzCredentialCollector(ICredentialCollector): - def collect_credentials(self) -> List[Credentials]: + def collect_credentials(self, options=None) -> List[Credentials]: creds = pypykatz_handler.get_windows_creds() return MimikatzCredentialCollector._to_credentials(creds)