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
This commit is contained in:
Mike Salvatore 2022-02-15 13:47:01 -05:00
parent 236b545816
commit c39fb6746d
5 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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