diff --git a/monkey/infection_monkey/transport/attack_telems/__init__.py b/monkey/infection_monkey/transport/attack_telems/__init__.py deleted file mode 100644 index 98867ed4d..000000000 --- a/monkey/infection_monkey/transport/attack_telems/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__author__ = 'VakarisZ' diff --git a/monkey/infection_monkey/transport/attack_telems/base_telem.py b/monkey/infection_monkey/transport/attack_telems/base_telem.py deleted file mode 100644 index ad1908e95..000000000 --- a/monkey/infection_monkey/transport/attack_telems/base_telem.py +++ /dev/null @@ -1,41 +0,0 @@ -from enum import Enum -from infection_monkey.config import WormConfiguration, GUID -import requests -import json -from infection_monkey.control import ControlClient -import logging - -__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, machine=None): - self.technique = technique - self.result = status - self.data = {'machine': machine, 'status': status, 'monkey_guid': GUID} - self.data.update(data) - - def send(self): - if not WormConfiguration.current_server: - return - try: - reply = requests.post("https://%s/api/%s" % (WormConfiguration.current_server, self.technique), - data=json.dumps(self.data), - headers={'content-type': 'application/json'}, - verify=False, - proxies=ControlClient.proxies) - except Exception as exc: - LOG.warn("Error connecting to control server %s: %s", - WormConfiguration.current_server, exc) diff --git a/monkey/monkey_island/cc/resources/attack.py b/monkey/monkey_island/cc/resources/attack.py deleted file mode 100644 index 457e6bfff..000000000 --- a/monkey/monkey_island/cc/resources/attack.py +++ /dev/null @@ -1,22 +0,0 @@ -import flask_restful -from flask import request, send_from_directory, Response -from cc.services.config import ConfigService, PBA_WINDOWS_FILENAME_PATH, PBA_LINUX_FILENAME_PATH, UPLOADS_DIR -from cc.auth import jwt_required -import os -from werkzeug.utils import secure_filename -import logging -import copy - -__author__ = 'VakarisZ' - -LOG = logging.getLogger(__name__) - - -class Attack(flask_restful.Resource): - """ - ATT&CK endpoint used to retrieve matrix related info - """ - - @jwt_required() - def post(self, attack_type): -