forked from p34709852/monkey
Agent: Use Enum for credential_type instead of string (Enum.value)
This commit is contained in:
parent
1e12a55240
commit
dc4273f970
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue