PyDFIRRam is a Python library leveraging Volatility 3 to simplify and enhance memory forensics. It streamlines the research, parsing, and analysis of memory dumps, allowing users to focus on data rather than commands.
To be fully compliant with CPython recent PEP, I took a quick look at the code base and fix all typing (and semantics if needed) mistake I have found using pylint and mypy --strict on all of the source code (except for unit tests file)
Also note that I was not able to do the tests through pytest since most of them use absolute paths like /home/braguette/dataset_memory/ch2.dmp. So, be careful with this merge request.
However, here is a list with all the modifications I made to the project:
fix : add missing py.typed to allow the package to be fully compliant with the PEP561
fix : remove all deprecated types like Dict, List, Tuple, …
fix : missing typing information
fix : missing close method in CLIFileHandler
update : use a better (?) naming convention for Volatility3 import by aliasing all classes with V3 (e.g V3Context) and function with v3_ (e.g v3_construct_plugin)
update : properly declare classes using explicit empty inheritance when needed (e.g class Context: -> class Context():)
update : raw string or path in Windows
update : add pandas typing information as an extra package for poetry
update : add package quick description through all __init__.py files
To be fully compliant with CPython recent PEP, I took a quick look at the code base and fix all typing (and semantics if needed) mistake I have found using
pylint
andmypy --strict
on all of the source code (except for unit tests file)Also note that I was not able to do the tests through
pytest
since most of them use absolute paths like/home/braguette/dataset_memory/ch2.dmp
. So, be careful with this merge request.However, here is a list with all the modifications I made to the project:
py.typed
to allow the package to be fully compliant with thePEP561
Dict
,List
,Tuple
, …close
method inCLIFileHandler
v3_
(e.gv3_construct_plugin
)class Context:
->class Context():
)Windows
pandas
typing information as an extra package forpoetry
__init__.py
filesI also found potential critical issues:
add_arguments()
mismatchclose
method when inherit fromFileHandlerInterface
CLIRenderer
That's it, I hope this can help a bit. Maybe adding a
pylint
andmypy
pass in CI can be useful for posterity ?