Skip to main content

Physical memory introspection framework

Project description

memflow-py

Python support for Memflow, a physical memory introspection framework written in Rust.

Installation

  1. Install python package: pip install memflow
  2. Install appropriate memflow components (see memflowup).

Building from source

Prerequisites

Advisory warning

It is advised to build in a python virtual environment, so that you do not accidentally break anything that depends on this package.

Steps

  1. Fetch repository: git clone https://github.com/memflow/memflow-py
  2. Install maturin package: pip install maturin
  3. Install dev packages: pip install '.[dev]'
  4. Build wheels and install package: maturin develop
  5. Repeat step 4 when you make changes to source.
  6. Test your changes: python -m pytest

For more information on building please see Maturin.

Example

from memflow import *
from ctypes import *

class COFFHeader(Structure):
    _fields_ = [
        ("_pad0x0", c_byte * 6),
        ("sections", c_short),
        ("timestamp", c_uint32),
    ]

    def __str__(self):
        return f"{self.sections}, {self.timestamp}"

inventory = Inventory()
os = inventory.os("native")
process = os.process_from_name("CalculatorApp.exe")
module = process.module_from_name("CalculatorApp.dll")
header = process.read(module.base + 0x40, COFFHeader)
print(header)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

memflow-0.1.3-cp37-abi3-win_amd64.whl (575.2 kB view hashes)

Uploaded CPython 3.7+ Windows x86-64

memflow-0.1.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

memflow-0.1.3-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (1.5 MB view hashes)

Uploaded CPython 3.7+ macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page