From 77b14177c5f215580f80be9c453b6248b7a5f5be Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Tue, 2 Apr 2019 11:08:56 +0300 Subject: [PATCH] Moved attack scan status enum to common --- monkey/common/utils/attack_status_enum.py | 10 ++++++++++ monkey/infection_monkey/monkey.py | 2 +- .../transport/attack_telems/base_telem.py | 10 ---------- 3 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 monkey/common/utils/attack_status_enum.py diff --git a/monkey/common/utils/attack_status_enum.py b/monkey/common/utils/attack_status_enum.py new file mode 100644 index 000000000..c7d2dc62c --- /dev/null +++ b/monkey/common/utils/attack_status_enum.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class ScanStatus(Enum): + # Technique wasn't scanned + UNSCANNED = 0 + # Technique was attempted/scanned + SCANNED = 1 + # Technique was attempted and succeeded + USED = 2 diff --git a/monkey/infection_monkey/monkey.py b/monkey/infection_monkey/monkey.py index 4d5d8f016..841a5521d 100644 --- a/monkey/infection_monkey/monkey.py +++ b/monkey/infection_monkey/monkey.py @@ -17,7 +17,7 @@ from infection_monkey.system_info import SystemInfoCollector from infection_monkey.system_singleton import SystemSingleton from infection_monkey.windows_upgrader import WindowsUpgrader from infection_monkey.post_breach.post_breach_handler import PostBreach -from infection_monkey.transport.attack_telems.base_telem import ScanStatus +from common.utils.attack_status_enum import ScanStatus from infection_monkey.transport.attack_telems.victim_host_telem import VictimHostTelem __author__ = 'itamar' diff --git a/monkey/infection_monkey/transport/attack_telems/base_telem.py b/monkey/infection_monkey/transport/attack_telems/base_telem.py index 054927a0d..9d0275356 100644 --- a/monkey/infection_monkey/transport/attack_telems/base_telem.py +++ b/monkey/infection_monkey/transport/attack_telems/base_telem.py @@ -1,4 +1,3 @@ -from enum import Enum from infection_monkey.config import WormConfiguration, GUID import requests import json @@ -10,15 +9,6 @@ __author__ = "VakarisZ" LOG = logging.getLogger(__name__) -class ScanStatus(Enum): - # Technique wasn't scanned - UNSCANNED = 0 - # Technique was attempted/scanned - SCANNED = 1 - # Technique was attempted and succeeded - USED = 2 - - class AttackTelem(object): def __init__(self, technique, status, data=None):