From 3e859d84fb0bf27e0acfa5a6b45c5fc78ea63fbb Mon Sep 17 00:00:00 2001 From: Daniel Goldberg Date: Thu, 12 Apr 2018 17:57:21 +0300 Subject: [PATCH] Rename check for 64-bit to make explict it's a windows only check --- infection_monkey/utils.py | 6 +++++- infection_monkey/windows_upgrader.py | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/infection_monkey/utils.py b/infection_monkey/utils.py index baef2372a..e2f66bd03 100644 --- a/infection_monkey/utils.py +++ b/infection_monkey/utils.py @@ -15,7 +15,11 @@ def get_dropper_log_path(): else WormConfiguration.dropper_log_path_linux -def is_64bit_os(): +def is_64bit_windows_os(): + ''' + Checks for 64 bit Windows OS using environment variables. + :return: + ''' return 'PROGRAMFILES(X86)' in os.environ diff --git a/infection_monkey/windows_upgrader.py b/infection_monkey/windows_upgrader.py index 38cb3a479..cbd879c15 100644 --- a/infection_monkey/windows_upgrader.py +++ b/infection_monkey/windows_upgrader.py @@ -10,7 +10,7 @@ from config import WormConfiguration from control import ControlClient from exploit.tools import build_monkey_commandline_explicitly from model import MONKEY_CMDLINE_WINDOWS -from utils import is_windows_os, is_64bit_os, is_64bit_python +from utils import is_windows_os, is_64bit_windows_os, is_64bit_python __author__ = 'itay.mizeretz' @@ -27,7 +27,7 @@ class WindowsUpgrader(object): @staticmethod def should_upgrade(): - return is_windows_os() and is_64bit_os() \ + return is_windows_os() and is_64bit_windows_os() \ and not is_64bit_python() @staticmethod