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): class ICredentialComponent(ABC):
@property @property
@abstractmethod @abstractmethod
def type(self) -> CredentialType: def credential_type(self) -> CredentialType:
pass pass

View File

@ -6,5 +6,5 @@ from .i_credential_component import ICredentialComponent
@dataclass(frozen=True) @dataclass(frozen=True)
class LMHash(ICredentialComponent): 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 lm_hash: str

View File

@ -6,5 +6,5 @@ from .i_credential_component import ICredentialComponent
@dataclass(frozen=True) @dataclass(frozen=True)
class NTHash(ICredentialComponent): 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 nt_hash: str

View File

@ -6,5 +6,5 @@ from .i_credential_component import ICredentialComponent
@dataclass(frozen=True) @dataclass(frozen=True)
class Password(ICredentialComponent): class Password(ICredentialComponent):
type: CredentialType = field(default=CredentialType.PASSWORD, init=False) credential_type: CredentialType = field(default=CredentialType.PASSWORD, init=False)
password: str password: str

View File

@ -6,5 +6,5 @@ from .i_credential_component import ICredentialComponent
@dataclass(frozen=True) @dataclass(frozen=True)
class Username(ICredentialComponent): class Username(ICredentialComponent):
type: CredentialType = field(default=CredentialType.USERNAME, init=False) credential_type: CredentialType = field(default=CredentialType.USERNAME, init=False)
username: str username: str