forked from p15670423/monkey
Upgrade after finding server
This commit is contained in:
parent
355a75feef
commit
e30e9c8b83
|
@ -68,15 +68,16 @@ class InfectionMonkey(object):
|
||||||
LOG.debug("Default server: %s is already in command servers list" % self._default_server)
|
LOG.debug("Default server: %s is already in command servers list" % self._default_server)
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
if WindowsUpgrader.should_upgrade():
|
|
||||||
WindowsUpgrader.upgrade(self._opts)
|
|
||||||
return
|
|
||||||
|
|
||||||
LOG.info("Monkey is running...")
|
LOG.info("Monkey is running...")
|
||||||
|
|
||||||
if firewall.is_enabled():
|
if firewall.is_enabled():
|
||||||
firewall.add_firewall_rule()
|
firewall.add_firewall_rule()
|
||||||
ControlClient.find_server(default_tunnel=self._default_tunnel)
|
ControlClient.find_server(default_tunnel=self._default_tunnel)
|
||||||
|
|
||||||
|
if WindowsUpgrader.should_upgrade():
|
||||||
|
WindowsUpgrader.upgrade(self._opts)
|
||||||
|
return
|
||||||
|
|
||||||
ControlClient.wakeup(parent=self._parent)
|
ControlClient.wakeup(parent=self._parent)
|
||||||
ControlClient.load_control_config()
|
ControlClient.load_control_config()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue