From e30e9c8b83c8c4f1e2c2033260e785f7ad9a07d9 Mon Sep 17 00:00:00 2001 From: Itay Mizeretz Date: Wed, 28 Feb 2018 16:23:54 +0200 Subject: [PATCH] Upgrade after finding server --- infection_monkey/monkey.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/infection_monkey/monkey.py b/infection_monkey/monkey.py index 19a456cff..6e0932ff2 100644 --- a/infection_monkey/monkey.py +++ b/infection_monkey/monkey.py @@ -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()