Agent: Make publish methods private
This commit is contained in:
parent
8e161f0fd9
commit
b94002a984
|
@ -128,7 +128,7 @@ class HostExploiter:
|
|||
powershell = True if "powershell" in cmd.lower() else False
|
||||
self.exploit_info["executed_cmds"].append({"cmd": cmd, "powershell": powershell})
|
||||
|
||||
def publish_propagation_event(
|
||||
def _publish_propagation_event(
|
||||
self,
|
||||
target: str,
|
||||
propagation_success: bool,
|
||||
|
@ -145,7 +145,7 @@ class HostExploiter:
|
|||
)
|
||||
self.agent_event_queue.publish(propagation_event)
|
||||
|
||||
def publish_exploitation_event(
|
||||
def _publish_exploitation_event(
|
||||
self,
|
||||
target: str,
|
||||
exploitation_success: bool,
|
||||
|
|
|
@ -65,7 +65,7 @@ def test_publish_exploitation_event__uses_exploiter_name_by_default(
|
|||
options={},
|
||||
interrupt=threading.Event(),
|
||||
)
|
||||
exploiter.publish_exploitation_event(target=str(TARGET), exploitation_success=True)
|
||||
exploiter._publish_exploitation_event(target=str(TARGET), exploitation_success=True)
|
||||
expected_event = ExploitationEvent(
|
||||
source=AGENT_ID,
|
||||
target=TARGET,
|
||||
|
@ -92,7 +92,7 @@ def test_publish_propagation_event__uses_exploiter_name_by_default(
|
|||
options={},
|
||||
interrupt=threading.Event(),
|
||||
)
|
||||
exploiter.publish_propagation_event(target=str(TARGET), propagation_success=True)
|
||||
exploiter._publish_propagation_event(target=str(TARGET), propagation_success=True)
|
||||
expected_event = PropagationEvent(
|
||||
source=AGENT_ID, target=TARGET, success=True, exploiter_name=FakeExploiter.__name__
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue