From 80266f537d7d6746b92592868b10e421c9657ef2 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Tue, 2 Apr 2019 09:30:41 +0300 Subject: [PATCH] Documented set_results method --- .../cc/services/attack/attack_telem.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 monkey/monkey_island/cc/services/attack/attack_telem.py diff --git a/monkey/monkey_island/cc/services/attack/attack_telem.py b/monkey/monkey_island/cc/services/attack/attack_telem.py new file mode 100644 index 000000000..295100c23 --- /dev/null +++ b/monkey/monkey_island/cc/services/attack/attack_telem.py @@ -0,0 +1,19 @@ +""" +File that contains ATT&CK telemetry storing/retrieving logic +""" +import logging +from cc.database import mongo + +__author__ = "VakarisZ" + +logger = logging.getLogger(__name__) + + +def set_results(technique, data): + """ + Adds ATT&CK technique results(telemetry) to the database + :param technique: technique ID string e.g. T1110 + :param data: Data, relevant to the technique + """ + data.update({'technique': technique}) + mongo.db.attack_results.insert(data)