Upgrade after finding server

This commit is contained in:
Itay Mizeretz 2018-02-28 16:23:54 +02:00
parent 355a75feef
commit e30e9c8b83
1 changed files with 5 additions and 4 deletions

View File

@ -68,15 +68,16 @@ class InfectionMonkey(object):
LOG.debug("Default server: %s is already in command servers list" % self._default_server)
def start(self):
if WindowsUpgrader.should_upgrade():
WindowsUpgrader.upgrade(self._opts)
return
LOG.info("Monkey is running...")
if firewall.is_enabled():
firewall.add_firewall_rule()
ControlClient.find_server(default_tunnel=self._default_tunnel)
if WindowsUpgrader.should_upgrade():
WindowsUpgrader.upgrade(self._opts)
return
ControlClient.wakeup(parent=self._parent)
ControlClient.load_control_config()