Agent: Use Enum for credential_type instead of string (Enum.value)

This commit is contained in:
Mike Salvatore 2022-02-23 08:15:27 -05:00
parent 1e12a55240
commit dc4273f970
5 changed files with 5 additions and 5 deletions

View File

@ -7,6 +7,6 @@ from infection_monkey.i_puppet import ICredentialComponent
@dataclass(frozen=True)
class LMHash(ICredentialComponent):
credential_type: CredentialComponentType = field(
default=CredentialComponentType.LM_HASH.value, init=False
default=CredentialComponentType.LM_HASH, init=False
)
lm_hash: str

View File

@ -7,6 +7,6 @@ from infection_monkey.i_puppet import ICredentialComponent
@dataclass(frozen=True)
class NTHash(ICredentialComponent):
credential_type: CredentialComponentType = field(
default=CredentialComponentType.NT_HASH.value, init=False
default=CredentialComponentType.NT_HASH, init=False
)
nt_hash: str

View File

@ -7,6 +7,6 @@ from infection_monkey.i_puppet import ICredentialComponent
@dataclass(frozen=True)
class Password(ICredentialComponent):
credential_type: CredentialComponentType = field(
default=CredentialComponentType.PASSWORD.value, init=False
default=CredentialComponentType.PASSWORD, init=False
)
password: str

View File

@ -7,7 +7,7 @@ from infection_monkey.i_puppet import ICredentialComponent
@dataclass(frozen=True)
class SSHKeypair(ICredentialComponent):
credential_type: CredentialComponentType = field(
default=CredentialComponentType.SSH_KEYPAIR.value, init=False
default=CredentialComponentType.SSH_KEYPAIR, init=False
)
private_key: str
public_key: str

View File

@ -7,6 +7,6 @@ from infection_monkey.i_puppet import ICredentialComponent
@dataclass(frozen=True)
class Username(ICredentialComponent):
credential_type: CredentialComponentType = field(
default=CredentialComponentType.USERNAME.value, init=False
default=CredentialComponentType.USERNAME, init=False
)
username: str