Update wording to clarify the different between package version and interface version.

This commit is contained in:
Mike Auty
2016-11-04 17:56:58 +00:00
parent 28fdbbe348
commit 2dba1bbddd
4 changed files with 17 additions and 14 deletions
+3 -4
View File
@@ -4,7 +4,7 @@ import sys
import volatility.framework
import volatility.plugins
from volatility.framework import automagic, contexts, interfaces
from volatility.framework import automagic, constants, contexts, interfaces
from volatility.framework.renderers.text import TextRenderer
__author__ = 'mike'
@@ -27,10 +27,9 @@ class CommandLine(object):
pass
def run(self):
ver = volatility.framework.version()
sys.stdout.write("Volatility Framework 3 (version " + "{0}.{1}.{2}".format(ver[0], ver[1], ver[2]) + ")\n")
sys.stdout.write("Volatility Framework {}\n".format(constants.PACKAGE_VERSION))
volatility.framework.require_version(0, 0, 0)
volatility.framework.require_interface_version(0, 0, 0)
# TODO: Get CLI config options
volatility.framework.import_files(volatility.plugins)
+10 -8
View File
@@ -26,22 +26,24 @@ AGE = 0 # Number of consecutive versions of the interface the current version s
vollog = logging.getLogger("volatility")
def version():
def interface_version():
"""Provides the so version number of the library"""
return CURRENT - AGE, AGE, REVISION
def require_version(*args):
def require_interface_version(*args):
"""Checks the required version of a plugin"""
if len(args):
if args[0] != version()[0]:
if args[0] != interface_version()[0]:
raise RuntimeError(
"Framework version {} is incompatible with required version {}".format(version()[0], args[0]))
"Framework interface version {} is incompatible with required version {}".format(interface_version()[0],
args[0]))
if len(args) > 1:
if args[1] > version()[1]:
raise RuntimeError("Framework version {} is an older revision than the required version {}".format(
".".join([str(x) for x in version()[0:1]]),
".".join([str(x) for x in args[0:2]])))
if args[1] > interface_version()[1]:
raise RuntimeError(
"Framework interface version {} is an older revision than the required version {}".format(
".".join([str(x) for x in interface_version()[0:1]]),
".".join([str(x) for x in args[0:2]])))
def class_subclasses(cls):
+1
View File
@@ -7,3 +7,4 @@ import os.path
PLUGINS_PATH = [os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "plugins"))]
BANG = "!"
PACKAGE_VERSION = "3.0.0_alpha1"
+3 -2
View File
@@ -3,7 +3,7 @@ import json
import logging
import urllib.parse
from volatility.framework import constants, exceptions, interfaces, objects, class_subclasses
from volatility.framework import class_subclasses, constants, exceptions, interfaces, objects
vollog = logging.getLogger(__name__)
@@ -34,7 +34,8 @@ class IntermediateSymbolTable(interfaces.symbols.SymbolTableInterface):
supported, age, revision = [int(x) for x in version.split(".")]
supported_versions = [x for x in versions.keys() if x[0] == supported and x[1] >= age]
if not supported_versions:
raise ValueError("No Intermediate Format versions support file version: {}".format(version))
raise ValueError(
"No Intermediate Format interface versions support file interface version: {}".format(version))
return versions[max(supported_versions)]
def _construct_delegate_function(name, is_property = False):