Data Models
Config
The main configuration class used across atomic-operator
Exceptions:
Type | Description |
---|---|
AtomicsFolderNotFound |
Raised when unable to find the provided atomics_path value |
__init__(self, atomics_path, check_prereqs=False, get_prereqs=False, cleanup=False, command_timeout=20, show_details=False, prompt_for_input_args=False, kwargs={}, copy_source_files=True)
special
Method generated by attrs for class Config.
Source code in atomic_operator/models.py
def __init__(self, atomics_path, check_prereqs=attr_dict['check_prereqs'].default, get_prereqs=attr_dict['get_prereqs'].default, cleanup=attr_dict['cleanup'].default, command_timeout=attr_dict['command_timeout'].default, show_details=attr_dict['show_details'].default, prompt_for_input_args=attr_dict['prompt_for_input_args'].default, kwargs=attr_dict['kwargs'].default, copy_source_files=attr_dict['copy_source_files'].default):
_setattr = _cached_setattr.__get__(self, self.__class__)
_inst_dict = self.__dict__
_inst_dict['atomics_path'] = atomics_path
_inst_dict['check_prereqs'] = check_prereqs
_inst_dict['get_prereqs'] = get_prereqs
_inst_dict['cleanup'] = cleanup
_inst_dict['command_timeout'] = command_timeout
_inst_dict['show_details'] = show_details
_inst_dict['prompt_for_input_args'] = prompt_for_input_args
_inst_dict['kwargs'] = kwargs
_inst_dict['copy_source_files'] = copy_source_files
if _config._run_validators is True:
__attr_validator_atomics_path(self, __attr_atomics_path, self.atomics_path)
self.__attrs_post_init__()
Host
__init__(self, hostname, username=None, password=None, verify_ssl=False, ssh_key_path=None, private_key_string=None, port=22, timeout=5)
special
Method generated by attrs for class Host.
Source code in atomic_operator/models.py
def __init__(self, hostname, username=attr_dict['username'].default, password=attr_dict['password'].default, verify_ssl=attr_dict['verify_ssl'].default, ssh_key_path=attr_dict['ssh_key_path'].default, private_key_string=attr_dict['private_key_string'].default, port=attr_dict['port'].default, timeout=attr_dict['timeout'].default):
self.hostname = hostname
self.username = username
self.password = password
self.verify_ssl = verify_ssl
self.ssh_key_path = ssh_key_path
self.private_key_string = private_key_string
self.port = port
self.timeout = timeout
if _config._run_validators is True:
__attr_validator_ssh_key_path(self, __attr_ssh_key_path, self.ssh_key_path)
Atomic
A single Atomic data structure. Each Atomic (technique) will contain a list of one or more AtomicTest objects.
__init__(self, attack_technique, display_name, path, atomic_tests, hosts=None, supporting_files=[])
special
Method generated by attrs for class Atomic.
Source code in atomic_operator/atomic/atomic.py
def __init__(self, attack_technique, display_name, path, atomic_tests, hosts=attr_dict['hosts'].default, supporting_files=attr_dict['supporting_files'].default):
self.attack_technique = attack_technique
self.display_name = display_name
self.path = path
self.atomic_tests = atomic_tests
self.hosts = hosts
self.supporting_files = supporting_files
self.__attrs_post_init__()
AtomicDependency
__init__(self, description, get_prereq_command=None, prereq_command=None)
special
Method generated by attrs for class AtomicDependency.
Source code in atomic_operator/atomic/atomictest.py
def __init__(self, description, get_prereq_command=attr_dict['get_prereq_command'].default, prereq_command=attr_dict['prereq_command'].default):
self.description = description
self.get_prereq_command = get_prereq_command
self.prereq_command = prereq_command
AtomicExecutor
__init__(self, name, command, cleanup_command=None, elevation_required=False, steps=None)
special
Method generated by attrs for class AtomicExecutor.
Source code in atomic_operator/atomic/atomictest.py
def __init__(self, name, command, cleanup_command=attr_dict['cleanup_command'].default, elevation_required=attr_dict['elevation_required'].default, steps=attr_dict['steps'].default):
self.name = name
self.command = command
self.cleanup_command = cleanup_command
self.elevation_required = elevation_required
self.steps = steps
AtomicTest
A single Atomic test object structure
Returns:
Type | Description |
---|---|
AtomicTest |
A single Atomic test object |
__init__(self, name, description, supported_platforms, auto_generated_guid, executor, input_arguments=None, dependency_executor_name=None, dependencies=[])
special
Method generated by attrs for class AtomicTest.
Source code in atomic_operator/atomic/atomictest.py
def __init__(self, name, description, supported_platforms, auto_generated_guid, executor, input_arguments=attr_dict['input_arguments'].default, dependency_executor_name=attr_dict['dependency_executor_name'].default, dependencies=attr_dict['dependencies'].default):
self.name = name
self.description = description
self.supported_platforms = supported_platforms
self.auto_generated_guid = auto_generated_guid
self.executor = executor
self.input_arguments = input_arguments
self.dependency_executor_name = dependency_executor_name
self.dependencies = dependencies
self.__attrs_post_init__()
AtomicTestInput
__init__(self, name, description, type, default, value=None, source=None, destination=None)
special
Method generated by attrs for class AtomicTestInput.
Source code in atomic_operator/atomic/atomictest.py
def __init__(self, name, description, type, default, value=attr_dict['value'].default, source=attr_dict['source'].default, destination=attr_dict['destination'].default):
self.name = name
self.description = description
self.type = type
self.default = default
self.value = value
self.source = source
self.destination = destination