- abstract C2Connector with authenticate / list_hosts / execute_task / get_task_result / cancel_task / execute_cleanup; stream_task_output optional v1 (NotImplementedError). - Payload / TaskHandle / TaskResult / TaskStatus frozen dataclasses. - UnsupportedPayloadType raised when no native command maps to the chosen (c2_type, payload_type) pair. - Mythic payload_type → native command map populated (spec §7 table). - HOME map left empty until PR2 is closed. - ConnectorFactory: register_connector decorator + build(c2_type) that instantiates + authenticates via an injected config resolver. No real Mythic / Home implementations land in this sprint.
28 lines
607 B
Python
28 lines
607 B
Python
"""C2Connector abstraction.
|
|
|
|
Sprint 0 ships the interface + dataclasses + payload mapping + factory.
|
|
Concrete `MythicConnector` and `HomeConnector` implementations land after
|
|
PR1 and PR2 respectively.
|
|
"""
|
|
|
|
from mimic.connectors.base import (
|
|
C2Connector,
|
|
Payload,
|
|
TaskHandle,
|
|
TaskResult,
|
|
TaskStatus,
|
|
UnsupportedPayloadType,
|
|
)
|
|
from mimic.connectors.factory import ConnectorFactory, register_connector
|
|
|
|
__all__ = [
|
|
"C2Connector",
|
|
"ConnectorFactory",
|
|
"Payload",
|
|
"TaskHandle",
|
|
"TaskResult",
|
|
"TaskStatus",
|
|
"UnsupportedPayloadType",
|
|
"register_connector",
|
|
]
|