Skip to content

Commit f63f690

Browse files
authored
Merge pull request #430 from volatilityfoundation/issues/release-namespace
Rename the base namespace as volatility3
2 parents 5235f43 + 22620ce commit f63f690

File tree

250 files changed

+911
-909
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

250 files changed

+911
-909
lines changed

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ __pycache__
44

55
# Sphinx generated files
66
doc/build
7-
doc/source/volatility.*
7+
doc/source/volatility3.*
88

99
# Pycharm/PyDev development files
1010
workspace.xml
@@ -14,14 +14,14 @@ workspace.xml
1414
# Manually generated files
1515
.mypy_cache
1616
stubs
17-
volatility/symbols/linux*
18-
volatility/symbols/windows*
19-
volatility/symbols/mac*
17+
volatility3/symbols/linux*
18+
volatility3/symbols/windows*
19+
volatility3/symbols/mac*
2020

2121
# Mac metadata files
2222
.DS_Store
2323

24-
# Volatility's config
24+
# Volatility's config
2525
config*.json
2626

2727
# Pyinstaller files

development/schema_validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
logger.addHandler(console)
1818
logger.setLevel(logging.DEBUG)
1919

20-
from volatility import schemas
20+
from volatility3 import schemas
2121

2222
if __name__ == '__main__':
2323
parser = argparse.ArgumentParser("Validates ")

doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ help:
1515

1616
# Ensure we clean the autodoc files when we clean
1717
clean:
18-
-rm source/volatility.*.rst
18+
-rm source/volatility3.*.rst
1919
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2020

2121
# Catch-all target: route all unknown targets to Sphinx using the new

doc/source/conf.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@
2121

2222

2323
def setup(app):
24-
volatility_directory = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'volatility'))
24+
volatility_directory = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'volatility3'))
2525

2626
source_dir = os.path.abspath(os.path.dirname(__file__))
2727
sphinx.ext.apidoc.main(argv = ['-e', '-M', '-f', '-T', '-o', source_dir, volatility_directory])
2828

29-
# Go through the volatility.framework.plugins files and change them to volatility.plugins
29+
# Go through the volatility3.framework.plugins files and change them to volatility3.plugins
3030
for dir, _, files in os.walk(os.path.dirname(__file__)):
3131
for filename in files:
32-
if filename.startswith('volatility.framework.plugins') and filename != 'volatility.framework.plugins.rst':
33-
# Change all volatility.framework.plugins to volatility.plugins in the file
32+
if filename.startswith('volatility3.framework.plugins') and filename != 'volatility3.framework.plugins.rst':
33+
# Change all volatility3.framework.plugins to volatility3.plugins in the file
3434
# Rename the file
35-
new_filename = filename.replace('volatility.framework.plugins', 'volatility.plugins')
35+
new_filename = filename.replace('volatility3.framework.plugins', 'volatility3.plugins')
3636

3737
replace_string = b"Submodules\n----------\n\n.. toctree::\n\n"
3838
submodules = replace_string
@@ -48,25 +48,25 @@ def setup(app):
4848
with open(os.path.join(dir, new_filename), 'wb') as newfile:
4949
with open(os.path.join(dir, filename), "rb") as oldfile:
5050
line = oldfile.read()
51-
correct_plugins = line.replace(b'volatility.framework.plugins', b'volatility.plugins')
51+
correct_plugins = line.replace(b'volatility3.framework.plugins', b'volatility3.plugins')
5252
correct_submodules = correct_plugins.replace(replace_string, submodules)
5353
newfile.write(correct_submodules)
5454
os.remove(os.path.join(dir, filename))
55-
elif filename == 'volatility.framework.rst':
55+
elif filename == 'volatility3.framework.rst':
5656
with open(os.path.join(dir, filename), "rb") as contents:
5757
lines = contents.readlines()
5858
plugins_seen = False
5959
with open(os.path.join(dir, filename), "wb") as contents:
6060
for line in lines:
61-
if b'volatility.framework.plugins' in line:
61+
if b'volatility3.framework.plugins' in line:
6262
plugins_seen = True
6363
if plugins_seen and line == b'':
64-
contents.write(b' volatility.plugins')
64+
contents.write(b' volatility3.plugins')
6565
contents.write(line)
66-
elif filename == 'volatility.plugins.rst':
66+
elif filename == 'volatility3.plugins.rst':
6767
with open(os.path.join(dir, filename), "rb") as contents:
6868
lines = contents.readlines()
69-
with open(os.path.join(dir, 'volatility.framework.plugins.rst'), "rb") as contents:
69+
with open(os.path.join(dir, 'volatility3.framework.plugins.rst'), "rb") as contents:
7070
real_lines = contents.readlines()
7171

7272
# Process real_lines
@@ -82,15 +82,15 @@ def setup(app):
8282
for line in lines:
8383
contents.write(line)
8484
for line in submodule_lines:
85-
contents.write(line.replace(b'volatility.framework.plugins', b'volatility.plugins'))
85+
contents.write(line.replace(b'volatility3.framework.plugins', b'volatility3.plugins'))
8686

8787

8888
# If extensions (or modules to document with autodoc) are in another directory,
8989
# add these directories to sys.path here. If the directory is relative to the
9090
# documentation root, use os.path.abspath to make it absolute, like shown here.
9191
sys.path.insert(0, os.path.abspath('../..'))
9292

93-
from volatility.framework import constants
93+
from volatility3.framework import constants
9494

9595
# -- General configuration ------------------------------------------------
9696

doc/source/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This is the documentation for Volatility 3, the most advanced memory forensics
55
framework in the world. Like previous versions of the Volatility framework,
66
Volatility 3 is Open Source.
77

8-
:doc:`List of plugins <volatility.plugins>`
8+
:doc:`List of plugins <volatility3.plugins>`
99

1010
Here are some guidelines for using Volatility 3 effectively:
1111

@@ -22,7 +22,7 @@ Python Packages
2222
===============
2323

2424
.. toctree::
25-
volatility
25+
volatility3
2626

2727
Indices and tables
2828
==================

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
import setuptools
66

7-
from volatility.framework import constants
7+
from volatility3.framework import constants
88

9-
setuptools.setup(name = "volatility",
9+
setuptools.setup(name = "volatility3",
1010
description = "Memory forensics framework",
1111
version = constants.PACKAGE_VERSION,
1212
license = "VSL",
@@ -27,8 +27,8 @@
2727
packages = setuptools.find_packages(exclude = ["development", "development.*"]),
2828
entry_points = {
2929
'console_scripts': [
30-
'vol = volatility.cli:main',
31-
'volshell = volatility.cli.volshell:main',
30+
'vol = volatility3.cli:main',
31+
'volshell = volatility3.cli.volshell:main',
3232
],
3333
},
3434
install_requires = ["pefile"],

vol.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
55
#
66

7-
import volatility.cli
7+
import volatility3.cli
88

99
if __name__ == '__main__':
10-
volatility.cli.main()
10+
volatility3.cli.main()

vol.spec

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ sys.path.append(os.getcwd())
3131
vol_analysis = Analysis(['vol.py'],
3232
pathex = [],
3333
binaries = binaries,
34-
datas = collect_data_files('volatility.framework') + \
35-
collect_data_files('volatility.framework.automagic', include_py_files = True) + \
36-
collect_data_files('volatility.framework.plugins', include_py_files = True) + \
37-
collect_data_files('volatility.framework.layers', include_py_files = True) + \
38-
collect_data_files('volatility.schemas') + \
39-
collect_data_files('volatility.plugins', include_py_files = True),
40-
hiddenimports = collect_submodules('volatility.framework.automagic') + \
41-
collect_submodules('volatility.framework.plugins') + \
42-
collect_submodules('volatility.framework.symbols'),
34+
datas = collect_data_files('volatility3.framework') + \
35+
collect_data_files('volatility3.framework.automagic', include_py_files = True) + \
36+
collect_data_files('volatility3.framework.plugins', include_py_files = True) + \
37+
collect_data_files('volatility3.framework.layers', include_py_files = True) + \
38+
collect_data_files('volatility3.schemas') + \
39+
collect_data_files('volatility3.plugins', include_py_files = True),
40+
hiddenimports = collect_submodules('volatility3.framework.automagic') + \
41+
collect_submodules('volatility3.framework.plugins') + \
42+
collect_submodules('volatility3.framework.symbols'),
4343
hookspath = [],
4444
runtime_hooks = [],
4545
excludes = [],
@@ -55,16 +55,16 @@ vol_analysis = Analysis(['vol.py'],
5555
# volshell_analysis = Analysis(['volshell.py'],
5656
# pathex = [],
5757
# binaries = [],
58-
# datas = collect_data_files('volatility.framework') + \
59-
# collect_data_files('volatility.framework.automagic', include_py_files = True) + \
60-
# collect_data_files('volatility.framework.plugins', include_py_files = True) + \
61-
# collect_data_files('volatility.framework.layers', include_py_files = True) + \
62-
# collect_data_files('volatility.cli', include_py_files = True) + \
63-
# collect_data_files('volatility.schemas') + \
64-
# collect_data_files('volatility.plugins', include_py_files = True),
65-
# hiddenimports = collect_submodules('volatility.framework.automagic') + \
66-
# collect_submodules('volatility.framework.plugins') + \
67-
# collect_submodules('volatility.framework.symbols'),
58+
# datas = collect_data_files('volatility3.framework') + \
59+
# collect_data_files('volatility3.framework.automagic', include_py_files = True) + \
60+
# collect_data_files('volatility3.framework.plugins', include_py_files = True) + \
61+
# collect_data_files('volatility3.framework.layers', include_py_files = True) + \
62+
# collect_data_files('volatility3.cli', include_py_files = True) + \
63+
# collect_data_files('volatility3.schemas') + \
64+
# collect_data_files('volatility3.plugins', include_py_files = True),
65+
# hiddenimports = collect_submodules('volatility3.framework.automagic') + \
66+
# collect_submodules('volatility3.framework.plugins') + \
67+
# collect_submodules('volatility3.framework.symbols'),
6868
# hookspath = [],
6969
# runtime_hooks = [],
7070
# excludes = [],
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ class WarningFindSpec(abc.MetaPathFinder):
3535
def find_spec(fullname: str, path: Optional[List[str]], target: None = None, **kwargs) -> None:
3636
"""Mock find_spec method that just checks the name, this must go
3737
first."""
38-
if fullname.startswith("volatility.framework.plugins."):
39-
warning = "Please do not use the volatility.framework.plugins namespace directly, only use volatility.plugins"
38+
if fullname.startswith("volatility3.framework.plugins."):
39+
warning = "Please do not use the volatility3.framework.plugins namespace directly, only use volatility3.plugins"
4040
# Pyinstaller uses walk_packages to import, but needs to read the modules to figure out dependencies
4141
# As such, we only print the warning when directly imported rather than from within walk_packages
4242
if inspect.stack()[-2].function != 'walk_packages':
@@ -46,17 +46,17 @@ def find_spec(fullname: str, path: Optional[List[str]], target: None = None, **k
4646
warning_find_spec = [WarningFindSpec()] # type: List[abc.MetaPathFinder]
4747
sys.meta_path = warning_find_spec + sys.meta_path
4848

49-
# We point the volatility.plugins __path__ variable at BOTH
50-
# volatility/plugins
51-
# volatility/framework/plugins
49+
# We point the volatility3.plugins __path__ variable at BOTH
50+
# volatility3/plugins
51+
# volatility3/framework/plugins
5252
# in that order.
5353
#
5454
# This will allow our users to override any component of any plugin without monkey patching,
5555
# but it also allows us to clear out the plugins directory to get back to proper functionality.
5656
# This offered the greatest flexibility for users whilst allowing us to keep the core separate and clean.
5757
#
58-
# This means that all plugins should be imported as volatility.plugins (otherwise they'll be imported twice,
59-
# once as volatility.plugins.NAME and once as volatility.framework.plugins.NAME). We therefore throw an error
60-
# if anyone tries to import anything under the volatility.framework.plugins.* namespace
58+
# This means that all plugins should be imported as volatility3.plugins (otherwise they'll be imported twice,
59+
# once as volatility3.plugins.NAME and once as volatility3.framework.plugins.NAME). We therefore throw an error
60+
# if anyone tries to import anything under the volatility3.framework.plugins.* namespace
6161
#
62-
# The remediation is to only ever import form volatility.plugins instead.
62+
# The remediation is to only ever import form volatility3.plugins instead.

0 commit comments

Comments
 (0)