forked from p15670423/monkey
Agent: move _set_propagation_depth and _add_default_server_to_config from constructor to start
Moved because these methods don't initialize the parameters, they change the global WormConfiguration object which is logic/behavior
This commit is contained in:
parent
1e9c9ab823
commit
e4bdc96410
|
@ -109,9 +109,7 @@ class InfectionMonkey:
|
||||||
# Sets island's IP and port for monkey to communicate to
|
# Sets island's IP and port for monkey to communicate to
|
||||||
if not self._is_default_server_set():
|
if not self._is_default_server_set():
|
||||||
raise Exception(
|
raise Exception(
|
||||||
"Monkey couldn't find server with {} default tunnel.".format(
|
"Monkey couldn't find server with {} default tunnel.".format(self._opts.tunnel)
|
||||||
self._opts.tunnel
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
self._set_default_port()
|
self._set_default_port()
|
||||||
|
|
||||||
|
@ -190,7 +188,7 @@ class InfectionMonkey:
|
||||||
logger.info("Monkey cleanup started")
|
logger.info("Monkey cleanup started")
|
||||||
try:
|
try:
|
||||||
if self._is_upgrade_to_64_needed():
|
if self._is_upgrade_to_64_needed():
|
||||||
logger.debug("Detected upgrade to 64bit")
|
logger.debug("Cleanup not needed for 32 bit agent on 64 bit system(it didn't run)")
|
||||||
return
|
return
|
||||||
|
|
||||||
if self._master:
|
if self._master:
|
||||||
|
|
Loading…
Reference in New Issue