diff --git a/monkey/infection_monkey/credential_collectors/credential_components/i_credential_component.py b/monkey/infection_monkey/credential_collectors/credential_components/i_credential_component.py index 43ebb9aca..f2d46c091 100644 --- a/monkey/infection_monkey/credential_collectors/credential_components/i_credential_component.py +++ b/monkey/infection_monkey/credential_collectors/credential_components/i_credential_component.py @@ -7,4 +7,3 @@ from ..credential_type import CredentialType @dataclass class ICredentialComponent(ABC): type: CredentialType - content: dict diff --git a/monkey/infection_monkey/credential_collectors/credential_components/lm_hash.py b/monkey/infection_monkey/credential_collectors/credential_components/lm_hash.py index d9557c9b0..ecfb97d49 100644 --- a/monkey/infection_monkey/credential_collectors/credential_components/lm_hash.py +++ b/monkey/infection_monkey/credential_collectors/credential_components/lm_hash.py @@ -4,4 +4,5 @@ from .i_credential_component import ICredentialComponent class LMHash(ICredentialComponent): def __init__(self, lm_hash: str): - super().__init__(type=CredentialType.NTLM_HASH, content={"lm_hash": lm_hash}) + super().__init__(type=CredentialType.NTLM_HASH) + self.lm_hash = lm_hash diff --git a/monkey/infection_monkey/credential_collectors/credential_components/nt_hash.py b/monkey/infection_monkey/credential_collectors/credential_components/nt_hash.py index ae412310e..5ffc83016 100644 --- a/monkey/infection_monkey/credential_collectors/credential_components/nt_hash.py +++ b/monkey/infection_monkey/credential_collectors/credential_components/nt_hash.py @@ -4,4 +4,5 @@ from .i_credential_component import ICredentialComponent class NTHash(ICredentialComponent): def __init__(self, nt_hash: str): - super().__init__(type=CredentialType.NTLM_HASH, content={"nt_hash": nt_hash}) + super().__init__(type=CredentialType.NTLM_HASH) + self.nt_hash = nt_hash diff --git a/monkey/infection_monkey/credential_collectors/credential_components/password.py b/monkey/infection_monkey/credential_collectors/credential_components/password.py index 87abe1575..01b970de0 100644 --- a/monkey/infection_monkey/credential_collectors/credential_components/password.py +++ b/monkey/infection_monkey/credential_collectors/credential_components/password.py @@ -4,4 +4,5 @@ from .i_credential_component import ICredentialComponent class Password(ICredentialComponent): def __init__(self, password: str): - super().__init__(type=CredentialType.PASSWORD, content={"password": password}) + super().__init__(type=CredentialType.PASSWORD) + self.password = password diff --git a/monkey/infection_monkey/credential_collectors/credential_components/ssh_keypair.py b/monkey/infection_monkey/credential_collectors/credential_components/ssh_keypair.py index 040256ee0..0ccb14ec3 100644 --- a/monkey/infection_monkey/credential_collectors/credential_components/ssh_keypair.py +++ b/monkey/infection_monkey/credential_collectors/credential_components/ssh_keypair.py @@ -4,4 +4,5 @@ from .i_credential_component import ICredentialComponent class SSHKeypair(ICredentialComponent): def __init__(self, content: dict): - super().__init__(type=CredentialType.SSH_KEYPAIR, content=content) + super().__init__(type=CredentialType.SSH_KEYPAIR) + self.content = content diff --git a/monkey/infection_monkey/credential_collectors/credential_components/username.py b/monkey/infection_monkey/credential_collectors/credential_components/username.py index 98c7b0b3d..154fa3817 100644 --- a/monkey/infection_monkey/credential_collectors/credential_components/username.py +++ b/monkey/infection_monkey/credential_collectors/credential_components/username.py @@ -4,4 +4,5 @@ from .i_credential_component import ICredentialComponent class Username(ICredentialComponent): def __init__(self, username: str): - super().__init__(type=CredentialType.USERNAME, content={"username": username}) + super().__init__(type=CredentialType.USERNAME) + self.username = username