From c39fb6746dae5b67ac3541fc8a2beb52c00bf98d Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 15 Feb 2022 13:47:01 -0500 Subject: [PATCH] Agent: Rename ICredentialComponent.type -> credential_type "type" is built-in function in Python. To avoid confusion or a potential name collision, this commit renames the ICredentialComponent.type field to ICredentialComponent.credential_type --- .../credential_components/i_credential_component.py | 2 +- .../credential_collectors/credential_components/lm_hash.py | 2 +- .../credential_collectors/credential_components/nt_hash.py | 2 +- .../credential_collectors/credential_components/password.py | 2 +- .../credential_collectors/credential_components/username.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) 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 97b3e35c4..2a2c38f00 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 @@ -6,5 +6,5 @@ from infection_monkey.credential_collectors.credential_type import CredentialTyp class ICredentialComponent(ABC): @property @abstractmethod - def type(self) -> CredentialType: + def credential_type(self) -> CredentialType: pass 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 4236a5247..03869142e 100644 --- a/monkey/infection_monkey/credential_collectors/credential_components/lm_hash.py +++ b/monkey/infection_monkey/credential_collectors/credential_components/lm_hash.py @@ -6,5 +6,5 @@ from .i_credential_component import ICredentialComponent @dataclass(frozen=True) class LMHash(ICredentialComponent): - type: CredentialType = field(default=CredentialType.LM_HASH, init=False) + credential_type: CredentialType = field(default=CredentialType.LM_HASH, init=False) lm_hash: str 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 6f90f37ff..81b92093b 100644 --- a/monkey/infection_monkey/credential_collectors/credential_components/nt_hash.py +++ b/monkey/infection_monkey/credential_collectors/credential_components/nt_hash.py @@ -6,5 +6,5 @@ from .i_credential_component import ICredentialComponent @dataclass(frozen=True) class NTHash(ICredentialComponent): - type: CredentialType = field(default=CredentialType.NT_HASH, init=False) + credential_type: CredentialType = field(default=CredentialType.NT_HASH, init=False) nt_hash: str diff --git a/monkey/infection_monkey/credential_collectors/credential_components/password.py b/monkey/infection_monkey/credential_collectors/credential_components/password.py index e3ed03fcf..26fee38f5 100644 --- a/monkey/infection_monkey/credential_collectors/credential_components/password.py +++ b/monkey/infection_monkey/credential_collectors/credential_components/password.py @@ -6,5 +6,5 @@ from .i_credential_component import ICredentialComponent @dataclass(frozen=True) class Password(ICredentialComponent): - type: CredentialType = field(default=CredentialType.PASSWORD, init=False) + credential_type: CredentialType = field(default=CredentialType.PASSWORD, init=False) password: str diff --git a/monkey/infection_monkey/credential_collectors/credential_components/username.py b/monkey/infection_monkey/credential_collectors/credential_components/username.py index d822e0e20..23bfd56ff 100644 --- a/monkey/infection_monkey/credential_collectors/credential_components/username.py +++ b/monkey/infection_monkey/credential_collectors/credential_components/username.py @@ -6,5 +6,5 @@ from .i_credential_component import ICredentialComponent @dataclass(frozen=True) class Username(ICredentialComponent): - type: CredentialType = field(default=CredentialType.USERNAME, init=False) + credential_type: CredentialType = field(default=CredentialType.USERNAME, init=False) username: str