forked from p15670423/monkey
Agent: Init a callable class and subscribe to it
This commit is contained in:
parent
d672fcfffe
commit
8f5681b1df
|
@ -199,17 +199,18 @@ class InfectionMonkey:
|
||||||
def _build_master(self):
|
def _build_master(self):
|
||||||
local_network_interfaces = InfectionMonkey._get_local_network_interfaces()
|
local_network_interfaces = InfectionMonkey._get_local_network_interfaces()
|
||||||
|
|
||||||
event_queue = PyPubSubEventQueue(Publisher())
|
|
||||||
event_queue.subscribe_type(
|
|
||||||
CredentialsStolenEvent, add_credentials_from_event_to_propagation_credentials_repository
|
|
||||||
)
|
|
||||||
|
|
||||||
# TODO control_channel and control_client have same responsibilities, merge them
|
# TODO control_channel and control_client have same responsibilities, merge them
|
||||||
control_channel = ControlChannel(
|
control_channel = ControlChannel(
|
||||||
self._control_client.server_address, GUID, self._control_client.proxies
|
self._control_client.server_address, GUID, self._control_client.proxies
|
||||||
)
|
)
|
||||||
credentials_store = AggregatingPropagationCredentialsRepository(control_channel)
|
credentials_store = AggregatingPropagationCredentialsRepository(control_channel)
|
||||||
|
|
||||||
|
event_queue = PyPubSubEventQueue(Publisher())
|
||||||
|
event_queue.subscribe_type(
|
||||||
|
CredentialsStolenEvent,
|
||||||
|
add_credentials_from_event_to_propagation_credentials_repository(credentials_store),
|
||||||
|
)
|
||||||
|
|
||||||
puppet = self._build_puppet(credentials_store, event_queue)
|
puppet = self._build_puppet(credentials_store, event_queue)
|
||||||
|
|
||||||
victim_host_factory = self._build_victim_host_factory(local_network_interfaces)
|
victim_host_factory = self._build_victim_host_factory(local_network_interfaces)
|
||||||
|
|
Loading…
Reference in New Issue