mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-28 10:49:42 +02:00
Initial commit of pyinstaller spec. Some changes to path handling to help.
This commit is contained in:
@@ -22,3 +22,7 @@ volatility/symbols/windows*
|
||||
|
||||
# Volatility's config
|
||||
config*.json
|
||||
|
||||
# Pyinstaller files
|
||||
build
|
||||
dist
|
||||
|
||||
@@ -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 )
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user