Initial commit of pyinstaller spec. Some changes to path handling to help.

This commit is contained in:
Mike Auty
2018-10-30 23:56:34 +00:00
parent 241b7475fb
commit e3e1c4e00b
5 changed files with 43 additions and 2 deletions
+4
View File
@@ -22,3 +22,7 @@ volatility/symbols/windows*
# Volatility's config
config*.json
# Pyinstaller files
build
dist
+32
View File
@@ -0,0 +1,32 @@
# -*- mode: python -*-
block_cipher = None
a = Analysis(['vol.py'],
pathex=[],
binaries=[],
datas=[('volatility/schemas', 'volatility/schemas')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='vol',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
runtime_tmpdir=None,
console=True )
+4 -2
View File
@@ -102,10 +102,12 @@ class CommandLine(interfaces.plugins.FileConsumerInterface):
known_args = [arg for arg in sys.argv if arg != '--help' and arg != '-h']
partial_args, _ = parser.parse_known_args(known_args)
if partial_args.plugin_dirs:
volatility.plugins.__path__ = partial_args.plugin_dirs.split(";") + constants.PLUGINS_PATH
volatility.plugins.__path__ = [os.path.abspath(p) for p in
partial_args.plugin_dirs.split(";")] + constants.PLUGINS_PATH
if partial_args.symbol_dirs:
volatility.symbols.__path__ = partial_args.symbol_dirs.split(";") + constants.SYMBOL_BASEPATHS
volatility.symbols.__path__ = [os.path.abspath(p) for p in
partial_args.symbol_dirs.split(";")] + constants.SYMBOL_BASEPATHS
if partial_args.log:
file_logger = logging.FileHandler(partial_args.log)
@@ -10,6 +10,7 @@ import os
import struct
import typing
from volatility import symbols
from volatility.framework import constants, exceptions, layers, validity
from volatility.framework.configuration import requirements
from volatility.framework.interfaces import configuration
+2
View File
@@ -146,6 +146,8 @@ class IntermediateSymbolTable(interfaces.symbols.SymbolTableInterface):
zip_match = "/".join(os.path.split(filename))
# Check user symbol directory first, then fallback to the framework's library to allow for overloading
vollog.log(constants.LOGLEVEL_VVVV,
"Searching for symbols in {}".format(", ".join(volatility.symbols.__path__)))
for path in volatility.symbols.__path__:
if not os.path.isabs(path):
path = os.path.abspath(os.path.join(__file__, path))