Code cleanup. Removed TODOs

pull/3/head
Thorsten Sick 4 years ago
parent 89b73a7262
commit baf2515c60

@ -5,14 +5,6 @@
import json
import datetime
# TODO: Collect caldera attacks: Source, target, type of attack. Start/Stop. Results. Parameters
# TODO: Collect kali attacks: Source, target, type of attack. Start/Stop. Results. Parameters. Settings
# TODO: Export data
# TODO: Add TTP and similar metadata
def __get_timestamp__():
return datetime.datetime.now().strftime("%H:%M:%S.%f")

@ -267,9 +267,6 @@ class CalderaControl():
for a_step in orep["steps"][paw]["steps"]:
if a_step["ability_id"] == ability_id:
try:
# TODO There is no output if the state is for example -4 (untrusted). Fix that. Why is the caldera implant untrusted ?
# print("Operation report: ")
# pprint(orep)
return a_step["output"]
except KeyError as exception:
raise CalderaError from exception
@ -372,8 +369,6 @@ class CalderaControl():
# ######### Delete
# TODO: Delete agent
# curl -X DELETE http://localhost:8888/api/rest -d '{"index":"operations","id":"$operation_id"}'
def delete_operation(self, opid):
""" Delete operation by id
@ -434,8 +429,6 @@ class CalderaControl():
# TODO: Get uploaded files
#
# Link, chain and stuff
def is_operation_finished(self, opid, debug=False):
@ -467,15 +460,6 @@ class CalderaControl():
raise CalderaError from exception
return False
# try:
# for alink in operation[0]["chain"]:
# if alink["status"] != 0:
# return False
# if alink["status"] == 0:
# return True
# except Exception as exception:
# raise CalderaError from exception
# return True
def is_operation_finished_multi(self, opid):
""" Checks if an operation finished - finished is not necessary successful ! On several targets.
@ -519,8 +503,6 @@ class CalderaControl():
adversary_name = "generated_adv__" + str(time.time())
operation_name = "testoperation__" + str(time.time())
# TODO: Verify that any agent with the given paw/group exists and is connected
self.add_adversary(adversary_name, ability_id)
adid = self.get_adversary(adversary_name)["adversary_id"]

@ -409,8 +409,6 @@ class Machine():
print(f"{CommandlineColors.OKBLUE}Starting Caldera client {name} {CommandlineColors.ENDC}")
if self.get_os() == "windows":
# TODO: Do not mount but use ssh to copy
url = "http://" + self.caldera_server + ":8888"
caldera_control = CalderaControl(url, apikey=self.calderakey)
caldera_control.fetch_client(platform="windows",

@ -93,7 +93,6 @@ def create_parser():
parser_abilities.add_argument("--all", default=False, action="store_true",
help="List all abilities")
# TODO: Add sub parser to list agents
parser_agents = subparsers.add_parser("agents", help="agents")
parser_agents.set_defaults(func=list_agents)

@ -5,6 +5,7 @@ import os
import yaml
# from shutil import copy
# TODO: Proper planning and re-building of plugin system. Especially the default config handling should be streamlined. All the plugin types should have a very similar programming interface.
class BasePlugin():
""" Base class for plugins """

Loading…
Cancel
Save