Extended exploiter report info class to have all possible values that exploit processors could add

This commit is contained in:
VakarisZ 2021-04-02 12:00:04 +03:00
parent 72a97e6465
commit de2581d323
3 changed files with 28 additions and 19 deletions

View File

@ -0,0 +1,23 @@
from dataclasses import dataclass
from enum import Enum
from typing import Union, List
class CredentialType(Enum):
PASSWORD = 'password'
HASH = 'hash'
KEY = 'key'
@dataclass
class ExploiterReportInfo:
machine: str
ip_address: str
type: str
username: Union[str, None] = None
credential_type: Union[CredentialType, None] = None
ssh_key: Union[str, None] = None
password: Union[str, None] = None
port: Union[str, None] = None
paths: Union[List[str], None] = None
password_restored: Union[bool, None] = None

View File

@ -1,15 +1,8 @@
from __future__ import annotations
from enum import Enum
from monkey_island.cc.services.reporting.issue_processing.exploit_processing.processors.exploit import \
ExploiterReportInfo, ExploitProcessor
class CredentialType(Enum):
PASSWORD = 'password'
HASH = 'hash'
KEY = 'key'
from monkey_island.cc.services.reporting.issue_processing.exploit_processing.exploiter_report_info import \
ExploiterReportInfo, CredentialType
from monkey_island.cc.services.reporting.issue_processing.exploit_processing.processors.exploit import ExploitProcessor
class CredExploitProcessor:

View File

@ -1,15 +1,8 @@
from __future__ import annotations
from dataclasses import dataclass
from monkey_island.cc.services.node import NodeService
@dataclass
class ExploiterReportInfo:
machine: str
ip_address: str
type: str
from monkey_island.cc.services.reporting.issue_processing.exploit_processing.exploiter_report_info import \
ExploiterReportInfo
class ExploitProcessor: