Agent: Move the definition of ICredentialCollector to i_puppet

Low-level components plug into high-level components. i_puppet defines
all of the interfaces that puppets can use, while the concrete
implementations of these things rely on the definitions in i_puppet.
This commit is contained in:
Mike Salvatore 2022-02-15 14:07:59 -05:00
parent c39fb6746d
commit 569159b11a
13 changed files with 21 additions and 21 deletions

View File

@ -1,6 +1,4 @@
from .i_credential_collector import ICredentialCollector
from .credential_components.nt_hash import NTHash
from .credential_components.lm_hash import LMHash
from .credential_components.password import Password
from .credential_components.username import Username
from .credentials import Credentials

View File

@ -1,7 +1,6 @@
from dataclasses import dataclass, field
from ..credential_type import CredentialType
from .i_credential_component import ICredentialComponent
from infection_monkey.i_puppet import CredentialType, ICredentialComponent
@dataclass(frozen=True)

View File

@ -1,7 +1,6 @@
from dataclasses import dataclass, field
from ..credential_type import CredentialType
from .i_credential_component import ICredentialComponent
from infection_monkey.i_puppet import CredentialType, ICredentialComponent
@dataclass(frozen=True)

View File

@ -1,7 +1,6 @@
from dataclasses import dataclass, field
from ..credential_type import CredentialType
from .i_credential_component import ICredentialComponent
from infection_monkey.i_puppet import CredentialType, ICredentialComponent
@dataclass(frozen=True)

View File

@ -1,7 +1,6 @@
from dataclasses import dataclass, field
from ..credential_type import CredentialType
from .i_credential_component import ICredentialComponent
from infection_monkey.i_puppet import CredentialType, ICredentialComponent
@dataclass(frozen=True)

View File

@ -1,13 +1,8 @@
from typing import Iterable
from infection_monkey.credential_collectors import (
Credentials,
ICredentialCollector,
LMHash,
NTHash,
Password,
Username,
)
from infection_monkey.credential_collectors import LMHash, NTHash, Password, Username
from infection_monkey.i_puppet.credential_collection import Credentials, ICredentialCollector
from . import pypykatz_handler
from .windows_credentials import WindowsCredentials

View File

@ -10,3 +10,9 @@ from .i_puppet import (
UnknownPluginError,
)
from .i_fingerprinter import IFingerprinter
from .credential_collection import (
Credentials,
CredentialType,
ICredentialCollector,
ICredentialComponent,
)

View File

@ -0,0 +1,4 @@
from .i_credential_collector import ICredentialCollector
from .credentials import Credentials
from .i_credential_component import ICredentialComponent
from .credential_type import CredentialType

View File

@ -1,7 +1,7 @@
from dataclasses import dataclass
from typing import Tuple
from .credential_components.i_credential_component import ICredentialComponent
from .i_credential_component import ICredentialComponent
@dataclass(frozen=True)

View File

@ -1,6 +1,6 @@
from abc import ABC, abstractmethod
from infection_monkey.credential_collectors.credential_type import CredentialType
from .credential_type import CredentialType
class ICredentialComponent(ABC):

View File

@ -2,13 +2,14 @@ from typing import List
import pytest
from infection_monkey.credential_collectors import Credentials, LMHash, NTHash, Password, Username
from infection_monkey.credential_collectors import LMHash, NTHash, Password, Username
from infection_monkey.credential_collectors.mimikatz_collector.mimikatz_cred_collector import (
MimikatzCredentialCollector,
)
from infection_monkey.credential_collectors.mimikatz_collector.windows_credentials import (
WindowsCredentials,
)
from infection_monkey.i_puppet import Credentials
def patch_pypykatz(win_creds: [WindowsCredentials], monkeypatch):