Python support for Memflow, a physical memory introspection framework written in Rust.
- Install python package:
pip install memflow
- Install appropriate memflow components (see memflowup).
from memflow import *
class COFFHeader(Structure):
_fields_ = [
("_pad0x0", c_byte * 6),
("sections", c_short),
("timestamp", c_uint32),
]
inventory = Inventory()
os = inventory.create_os("native")
process = os.process_from_name("CalculatorApp.exe")
module = process.module_by_name("CalculatorApp.dll")
header = process.read(module.base + 0x40, COFFHeader)
print(header)
- Rust (Compilation support)
- Python (3.7 and up)
- python virtual environment
- Fetch repository:
git clone https://github.com/memflow/memflow-py
- Install maturin package:
pip install maturin
- Install dev packages:
pip install '.[dev]'
- Create virtualenv
virtualenv .
- Active virtualenv
source ./bin/activate
- Build wheels and install package:
maturin develop
- Repeat step 4 when you make changes to source.
- Install pytest
pip install pytest
- Test your changes:
python -m pytest
For more information on building please see Maturin.