Skip to content

Commit 06d70eb

Browse files
authored
Merge branch 'volatilityfoundation:develop' into develop
2 parents 27ac31d + e67bac4 commit 06d70eb

File tree

192 files changed

+16757
-8428
lines changed

Some content is hidden

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

192 files changed

+16757
-8428
lines changed

.github/workflows/black.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Black python linter
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: psf/black@stable
11+
with:
12+
options: "--check --diff --verbose"
13+
src: "./volatility3"

.github/workflows/build-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ on:
1515
jobs:
1616

1717
build:
18-
runs-on: ubuntu-20.04
18+
runs-on: ubuntu-22.04
1919
strategy:
2020
matrix:
21-
python-version: ["3.6"]
21+
python-version: ["3.7"]
2222
steps:
2323
- uses: actions/checkout@v3
2424
- name: Set up Python ${{ matrix.python-version }}

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-20.04
77
strategy:
88
matrix:
9-
python-version: ["3.6"]
9+
python-version: ["3.7"]
1010
steps:
1111
- uses: actions/checkout@v3
1212
- name: Set up Python ${{ matrix.python-version }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ more details.
2020

2121
## Requirements
2222

23-
Volatility 3 requires Python 3.6.0 or later. To install the most minimal set of dependencies (some plugins will not work) use a command such as:
23+
Volatility 3 requires Python 3.7.0 or later. To install the most minimal set of dependencies (some plugins will not work) use a command such as:
2424

2525
```shell
2626
pip3 install -r requirements-minimal.txt

setup.py

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,47 @@
66

77
from volatility3.framework import constants
88

9-
with open("README.md", "r", encoding = "utf-8") as fh:
9+
with open("README.md", "r", encoding="utf-8") as fh:
1010
long_description = fh.read()
1111

12+
1213
def get_install_requires():
1314
requirements = []
14-
with open("requirements-minimal.txt", "r", encoding="utf-8") as fh:
15+
with open("requirements-minimal.txt", "r", encoding = "utf-8") as fh:
1516
for line in fh.readlines():
1617
stripped_line = line.strip()
1718
if stripped_line == "" or stripped_line.startswith("#"):
1819
continue
1920
requirements.append(stripped_line)
2021
return requirements
2122

22-
setuptools.setup(name = "volatility3",
23-
description = "Memory forensics framework",
24-
version = constants.PACKAGE_VERSION,
25-
license = "VSL",
26-
keywords = "volatility memory forensics framework windows linux volshell",
27-
author = "Volatility Foundation",
28-
long_description = long_description,
29-
long_description_content_type = "text/markdown",
30-
author_email = "[email protected]",
31-
url = "https://github.com/volatilityfoundation/volatility3/",
32-
project_urls = {
33-
"Bug Tracker": "https://github.com/volatilityfoundation/volatility3/issues",
34-
"Documentation": "https://volatility3.readthedocs.io/",
35-
"Source Code": "https://github.com/volatilityfoundation/volatility3",
36-
},
37-
python_requires = '>=3.6.0',
38-
include_package_data = True,
39-
exclude_package_data = {
40-
'': ['development', 'development.*'],
41-
'development': ['*']
42-
},
43-
packages = setuptools.find_namespace_packages(exclude = ["development", "development.*"]),
44-
entry_points = {
45-
'console_scripts': [
46-
'vol = volatility3.cli:main',
47-
'volshell = volatility3.cli.volshell:main',
48-
],
49-
},
50-
install_requires = get_install_requires())
23+
setuptools.setup(
24+
name="volatility3",
25+
description="Memory forensics framework",
26+
version=constants.PACKAGE_VERSION,
27+
license="VSL",
28+
keywords="volatility memory forensics framework windows linux volshell",
29+
author="Volatility Foundation",
30+
long_description=long_description,
31+
long_description_content_type="text/markdown",
32+
author_email="[email protected]",
33+
url="https://github.com/volatilityfoundation/volatility3/",
34+
project_urls={
35+
"Bug Tracker": "https://github.com/volatilityfoundation/volatility3/issues",
36+
"Documentation": "https://volatility3.readthedocs.io/",
37+
"Source Code": "https://github.com/volatilityfoundation/volatility3",
38+
},
39+
python_requires=">=3.7.0",
40+
include_package_data=True,
41+
exclude_package_data={"": ["development", "development.*"], "development": ["*"]},
42+
packages=setuptools.find_namespace_packages(
43+
exclude=["development", "development.*"]
44+
),
45+
entry_points={
46+
"console_scripts": [
47+
"vol = volatility3.cli:main",
48+
"volshell = volatility3.cli.volshell:main",
49+
],
50+
},
51+
install_requires=get_install_requires(),
52+
)

test/conftest.py

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,57 @@
33
import os
44
import pytest
55

6+
67
def pytest_addoption(parser):
7-
parser.addoption("--volatility", action="store", default=None,
8+
parser.addoption(
9+
"--volatility",
10+
action="store",
11+
default=None,
812
required=True,
9-
help="path to the volatility script")
13+
help="path to the volatility script",
14+
)
15+
16+
parser.addoption(
17+
"--python",
18+
action="store",
19+
default="python3",
20+
help="The name of the interpreter to use when running the volatility script",
21+
)
1022

11-
parser.addoption("--python", action="store", default="python3",
12-
help="The name of the interpreter to use when running the volatility script")
23+
parser.addoption(
24+
"--image", action="append", default=[], help="path to an image to test"
25+
)
1326

14-
parser.addoption("--image", action="append", default=[],
15-
help="path to an image to test")
27+
parser.addoption(
28+
"--image-dir",
29+
action="append",
30+
default=[],
31+
help="path to a directory containing images to test",
32+
)
1633

17-
parser.addoption("--image-dir", action="append", default=[],
18-
help="path to a directory containing images to test")
1934

2035
def pytest_generate_tests(metafunc):
2136
"""Parameterize tests based on image names"""
2237

23-
images = metafunc.config.getoption('image')
24-
for image_dir in metafunc.config.getoption('image_dir'):
25-
images = images + [os.path.join(image_dir, dir) for dir in os.listdir(image_dir)]
38+
images = metafunc.config.getoption("image")
39+
for image_dir in metafunc.config.getoption("image_dir"):
40+
images = images + [
41+
os.path.join(image_dir, dir) for dir in os.listdir(image_dir)
42+
]
2643

2744
# tests with "image" parameter are run against images
28-
if 'image' in metafunc.fixturenames:
29-
metafunc.parametrize("image",
30-
images,
31-
ids=[os.path.basename(image) for image in images])
45+
if "image" in metafunc.fixturenames:
46+
metafunc.parametrize(
47+
"image", images, ids=[os.path.basename(image) for image in images]
48+
)
49+
3250

3351
# Fixtures
3452
@pytest.fixture
3553
def volatility(request):
3654
return request.config.getoption("--volatility")
3755

56+
3857
@pytest.fixture
3958
def python(request):
40-
return request.config.getoption("--python")
59+
return request.config.getoption("--python")

0 commit comments

Comments
 (0)