Further documentation improvements.

This commit is contained in:
Mike Auty
2016-12-29 03:14:40 +00:00
parent c6c5283974
commit 1abebe67db
4 changed files with 37 additions and 6 deletions
+12 -1
View File
@@ -80,6 +80,12 @@ class Context(interfaces.context.ContextInterface):
Looks up the layername in the context, finds the object template based on the symbol,
and constructs an object using the object template on the layer at the offset.
:param symbol: The name of the symbol type on which to construct the object. This should contain an explicit table name.
:type symbol: str
:param layer_name: The name of the layer on which to construct the object
:type layer_name: str
:param offset: The offset within the layer at which the data used to create the object lives
:type offset: int
:return: A fully constructed object
:rtype: :py:class:`volatility.framework.interfaces.objects.ObjectInterface`
"""
@@ -91,7 +97,12 @@ class Context(interfaces.context.ContextInterface):
offset = offset))
def object_factory(self, symbol_table):
"""Allow a specific symbol_table to be used repeatedly for constructing objects"""
"""Allow a specific symbol_table to be used repeatedly for constructing objects
:param symbol_table: The name of the symbol table that the object factory will construct objects on
:type sybmol_table: str
:return: A function that takes the same arguments as :func:`object`
"""
def callable(symbol, layer_name, offset, **arguments):
"""Function to apply a specific symbol_table name to any unadored"""
+3 -3
View File
@@ -1,7 +1,7 @@
"""
Created on 12 Apr 2013
"""The interfaces module contains the API interface for the core volatility framework
@author: mike
These interfaces should help developers attempting to write components for the main framework
and help them understand how to use the internal components of volatility to write plugins.
"""
# Import the submodules we want people to be able to use without importing them themselves
@@ -1,3 +1,5 @@
"""Defines the automagic interfaces for populating the context before a plugin runs"""
from abc import ABCMeta, abstractmethod
from volatility.framework import validity
@@ -33,4 +35,11 @@ class StackerLayerInterface(validity.ValidityRoutines, metaclass = ABCMeta):
Configuration options provided by the context are ignored, and defaults
are to be used by this method to build a space where possible
:param context: Context in which to construct the higher layer
:type context: ~volatility.framework.interfaces.context.ContextInterface
:param layer_name: Name of the layer to stack on top of
:type layer_name: str
:param progress_callback: A callback function to indicate progress through a scan (if one is necessary)
:type progress_callback: A function that takes a percentage and an optional description
"""
@@ -1,3 +1,13 @@
"""The configuration module contains classes and functions for interacting with the
configuration and requirement trees.
Volatility plugins can specify a list of requirements (which may have subrequirements, thus forming a requirement tree).
These requirement trees can contain values, which are contained in a complementary configuration tree. These two trees
act as a protocol between the plugins and users. The plugins provide requirements that must be fulfilled, and the users
provide configurations values that fulfill those requirements. Where the user does not provide sufficient configuration
values, automagic modules may extend the configuration tree themselves.
"""
import collections
import copy
import json
@@ -17,7 +27,7 @@ vollog = logging.getLogger(__name__)
def path_join(*args):
"""Joins the config paths together"""
"""Joins configuration paths together"""
# If a path element (particularly the first) is empty, then remove it from the list
args = [arg for arg in args if arg]
return CONFIG_SEPARATOR.join(args)
@@ -103,7 +113,8 @@ class RequirementInterface(validity.ValidityRoutines, metaclass = ABCMeta):
class ClassRequirement(RequirementInterface):
"""Requires a specific class"""
"""Requires a specific class. This is used as means to serialize specific classes for :class:`TranslationLayerRequirement`
and :class:`SymbolRequirement` classes."""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)