Skip to content

Commit

Permalink
Fix dependancies (#55)
Browse files Browse the repository at this point in the history
* add test for volatility (#49)

Co-authored-by: Br4guette <Br4guette@pm.me>

* back to pydfirram packages

* BAck to stable version

---------

Co-authored-by: Br4guette <Br4guette@pm.me>
Co-authored-by: St0n14 <alexis.debrito@lgm.fr>
  • Loading branch information
3 people authored Aug 19, 2024
1 parent 66fa530 commit 7225b35
Show file tree
Hide file tree
Showing 8 changed files with 724 additions and 521 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ jobs:
echo "::set-output name=package_version::`poetry version --short`"
shell: bash

# - name: test with tox
# run: tox
- name: test with tox
run: tox

publish_dev_build:
# if test failed, we should not publish
Expand Down Expand Up @@ -84,4 +84,4 @@ jobs:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
skip-existing: true
skip-existing: true
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

10 changes: 0 additions & 10 deletions build_submodules.py

This file was deleted.

1,152 changes: 687 additions & 465 deletions poetry.lock

Large diffs are not rendered by default.

23 changes: 9 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = [
"Braguette <alexis.debrito@ecole2600.com>",
"std3 <67806187+standard3@users.noreply.github.com>",
]
classifiers = [
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
Expand All @@ -18,19 +18,13 @@ readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"
volatility3 = { path = "./volatility3" }
volatility3 = "^2.5.2"
pandas = "^2.2.2"
regex = "^2024.4.28"
graphviz = "^0.20.3"
loguru = "^0.7.2"
jupyter = "^1.0.0"
mike = { version = "^1.1.2", optional = true }

[tool.poetry.scripts]
build-submodules = "build_submodules:build_submodule"

[tool.poetry.plugins."poetry.plugins.application.pre_install"]
build-submodules = "build_submodules:build_submodule"
mike = { version="^1.1.2", optional=true}

[tool.poetry.extras]
test = [
Expand All @@ -40,10 +34,11 @@ test = [
"flake8",
"flake8-docstrings",
"pytest-cov"
]
]

dev = [
"tox", "pre-commit", "virtualenv", "pip", "twine", "toml","pandas-stubs",
"tox", "pre-commit", "virtualenv", "pip", "twine", "toml",
"pandas-stubs",
]

doc = [
Expand All @@ -55,10 +50,10 @@ doc = [
"mkdocs-autorefs",
"mike",
"setuptools"
]
]

[tool.poetry.dev-dependencies]
pytest = "^7.0"
pytest = "^6.2"

[tool.poetry.group.docs.dependencies]
mkdocs = "^1.6"
Expand All @@ -69,4 +64,4 @@ mkdocstrings = "^0.25"

[build-system]
requires = ["poetry-core>=1.2.0"]
build-backend = "poetry.core.masonry.api"
build-backend = "poetry.core.masonry.api"
2 changes: 1 addition & 1 deletion tests/config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from pathlib import Path

DUMP_FILE = Path("./data/dump.raw")
DUMP_FILE = Path("../ch2.dmp")
48 changes: 24 additions & 24 deletions tests/test_volatility_windows_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,30 +270,30 @@ def test_dumpfile_with_args_physaddr(windows_instance : Windows):
print(f"Failed to delete {new_file}: {cleanup_error}")

#Not able to test virtaddr locally
@pytest.mark.dumpfiles
@pytest.mark.dumpfile_virtaddr
def test_dumpfile_with_args_virtaddr(windows_instance : Windows):
current_directory = Path.cwd()
initial_files = set(current_directory.glob("file.*"))
new_files = set()
value = 2274855800
try:
result = windows_instance.dumpfiles(virtaddr=value)
# Check if new files starting with 'file.' with the value in hex are created
file_created = "file." + hex(value)
new_files = set(current_directory.glob(file_created)) - initial_files
assert len(new_files) == 1, f"Expected exactly one new file starting with 'file.', but found {len(new_files)}"

except Exception as e:
pytest.fail(f"An exception should not be raised: {e}")

finally:
# Clean up any new files created# windows.crashinfo.Crashinfo during the test
for new_file in new_files:
try:
new_file.unlink()
except Exception as cleanup_error:
print(f"Failed to delete {new_file}: {cleanup_error}")
#@pytest.mark.dumpfiles
#@pytest.mark.dumpfile_virtaddr
#def test_dumpfile_with_args_virtaddr(windows_instance : Windows):
# current_directory = Path.cwd()
# initial_files = set(current_directory.glob("file.*"))
# new_files = set()
# value = 2274855800
# try:
# result = windows_instance.dumpfiles(virtaddr=value)
# # Check if new files starting with 'file.' with the value in hex are created
# file_created = "file." + hex(value)
# new_files = set(current_directory.glob(file_created)) - initial_files
# assert len(new_files) == 1, f"Expected exactly one new file starting with 'file.', but found {len(new_files)}"
#
# except Exception as e:
# pytest.fail(f"An exception should not be raised: {e}")
#
# finally:
# # Clean up any new files created# windows.crashinfo.Crashinfo during the test
# for new_file in new_files:
# try:
# new_file.unlink()
# except Exception as cleanup_error:
# print(f"Failed to delete {new_file}: {cleanup_error}")

# windows.filescan.FileScan
@pytest.mark.filescan
Expand Down
1 change: 0 additions & 1 deletion volatility3
Submodule volatility3 deleted from 05aa81

0 comments on commit 7225b35

Please sign in to comment.