Agent: Accept event queue in Mimikatz collector's constructor

This commit is contained in:
Shreya Malviya 2022-08-16 12:39:59 +05:30
parent 2edaf52140
commit d745e10bf1
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import logging
from typing import Sequence
from common.credentials import Credentials, LMHash, NTHash, Password, Username
from common.event_queue import IEventQueue
from infection_monkey.i_puppet import ICredentialCollector
from infection_monkey.model import USERNAME_PREFIX
@ -12,6 +13,9 @@ logger = logging.getLogger(__name__)
class MimikatzCredentialCollector(ICredentialCollector):
def __init__(self, event_queue: IEventQueue):
self._event_queue = event_queue
def collect_credentials(self, options=None) -> Sequence[Credentials]:
logger.info("Attempting to collect windows credentials with pypykatz.")
windows_credentials = pypykatz_handler.get_windows_creds()