forked from p15670423/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)
|
@dataclass(frozen=True)
|
||||||
class LMHash(ICredentialComponent):
|
class LMHash(ICredentialComponent):
|
||||||
credential_type: CredentialComponentType = field(
|
credential_type: CredentialComponentType = field(
|
||||||
default=CredentialComponentType.LM_HASH.value, init=False
|
default=CredentialComponentType.LM_HASH, init=False
|
||||||
)
|
)
|
||||||
lm_hash: str
|
lm_hash: str
|
||||||
|
|
|
@ -7,6 +7,6 @@ from infection_monkey.i_puppet import ICredentialComponent
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class NTHash(ICredentialComponent):
|
class NTHash(ICredentialComponent):
|
||||||
credential_type: CredentialComponentType = field(
|
credential_type: CredentialComponentType = field(
|
||||||
default=CredentialComponentType.NT_HASH.value, init=False
|
default=CredentialComponentType.NT_HASH, init=False
|
||||||
)
|
)
|
||||||
nt_hash: str
|
nt_hash: str
|
||||||
|
|
|
@ -7,6 +7,6 @@ from infection_monkey.i_puppet import ICredentialComponent
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class Password(ICredentialComponent):
|
class Password(ICredentialComponent):
|
||||||
credential_type: CredentialComponentType = field(
|
credential_type: CredentialComponentType = field(
|
||||||
default=CredentialComponentType.PASSWORD.value, init=False
|
default=CredentialComponentType.PASSWORD, init=False
|
||||||
)
|
)
|
||||||
password: str
|
password: str
|
||||||
|
|
|
@ -7,7 +7,7 @@ from infection_monkey.i_puppet import ICredentialComponent
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class SSHKeypair(ICredentialComponent):
|
class SSHKeypair(ICredentialComponent):
|
||||||
credential_type: CredentialComponentType = field(
|
credential_type: CredentialComponentType = field(
|
||||||
default=CredentialComponentType.SSH_KEYPAIR.value, init=False
|
default=CredentialComponentType.SSH_KEYPAIR, init=False
|
||||||
)
|
)
|
||||||
private_key: str
|
private_key: str
|
||||||
public_key: str
|
public_key: str
|
||||||
|
|
|
@ -7,6 +7,6 @@ from infection_monkey.i_puppet import ICredentialComponent
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class Username(ICredentialComponent):
|
class Username(ICredentialComponent):
|
||||||
credential_type: CredentialComponentType = field(
|
credential_type: CredentialComponentType = field(
|
||||||
default=CredentialComponentType.USERNAME.value, init=False
|
default=CredentialComponentType.USERNAME, init=False
|
||||||
)
|
)
|
||||||
username: str
|
username: str
|
||||||
|
|
Loading…
Reference in New Issue