GitPedia

Pyinjector

Inject shared libraries into running processes

From kmaork·Updated May 6, 2026·View on GitHub·

A cross-platform tool/library allowing dynamic library injection into running processes. If you are looking for a way to inject *python* code into a running process, try the [hypno](https://github.com/kmaork/hypno) library. The project is written primarily in Python, distributed under the MIT License license, first published in 2020. Key topics include: dll-injector, linux, python, shared-library, windows.

Latest release: 1.3.0
July 18, 2023View Changelog →

Pyinjector

Tests (GitHub Actions)
PyPI Supported Python Versions
PyPI version
Downloads
GitHub license

A cross-platform tool/library allowing dynamic library injection into running processes.
If you are looking for a way to inject python code into a running process, try the hypno library.

Pyinjector has no external python dependencies.
It is implemented as a python wrapper for kubo/injector.

Installation

shell
pip install pyinjector

Both source distributions, manylinux2010 wheels and windows wheels are uploaded to Pypi for every release.

Usage

CLI

shell
inject <pid> <path/to/shared/library>

API

python
from pyinjector import inject inject(pid, path_to_so_file)

How it works

We build kubo/injector as a C-extension and use its interface using ctypes.
kubo/injector is an awesome repo allowing to inject shared libraries into running
processes both on Windows (CreateRemoteThread), Linux (ptrace), and Mac (task_for_pid).

Contributors

Showing top 3 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from kmaork/pyinjector via the GitHub API.Last fetched: 6/23/2026