๐Ÿ“ฆ woodruffw / procmaps.py

Python bindings for procmaps.rs

โ˜… 35 stars โ‘‚ 0 forks ๐Ÿ‘ 35 watching โš–๏ธ MIT License
hacktoberfestprocfspythonrust
๐Ÿ“ฅ Clone https://github.com/woodruffw/procmaps.py.git
HTTPS git clone https://github.com/woodruffw/procmaps.py.git
SSH git clone git@github.com:woodruffw/procmaps.py.git
CLI gh repo clone woodruffw/procmaps.py
dependabot[bot] dependabot[bot] build(deps): bump actions/upload-artifact from 5 to 6 (#68) f3c6390 1 months ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ src
๐Ÿ“ test
๐Ÿ“„ .gitignore
๐Ÿ“„ Cargo.toml
๐Ÿ“„ LICENSE
๐Ÿ“„ Makefile
๐Ÿ“„ pyproject.toml
๐Ÿ“„ README.md
๐Ÿ“„ README.md

procmaps.py ===========

CI Downloads

Python bindings for procmaps.rs.

Installation

procmaps.py is available for Python 3.7+ via pip:

$ pip install procmaps

Usage

import procmaps

# also: from_path, from_str
maps = procmaps.from_pid(9001)
for map_ in maps:
    # `in` can be used to check address inclusion
    if 0xfeedface in map_:
        print("this map contains some address!")

    # see dict(map_) for all attributes
    print(f"{map_.begin_address}: {map_.pathname}")

Development

procmaps.py uses PyO3 for binding Rust to Python. It uses Maturin to coerce the Rust build into a pip and PyPI-compatible wheel.

Assuming that you have Rust and a relatively recent Python 3 installed, the following should just work:

$ make develop
$ source env/bin/activate

A local build of procmaps.py will be created and installed in your virtual environment.