Skip to main content

A tool/library allowing dynamic library injection into running processes

Project description

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

pip install pyinjector

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

Usage

CLI

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

API

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).

Project details


Download files

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

Source Distribution

pyinjector-1.3.0.tar.gz (39.1 kB view hashes)

Uploaded Source

Built Distributions

pyinjector-1.3.0-cp311-cp311-win_amd64.whl (15.5 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

pyinjector-1.3.0-cp311-cp311-win32.whl (13.2 kB view hashes)

Uploaded CPython 3.11 Windows x86

pyinjector-1.3.0-cp311-cp311-musllinux_1_2_x86_64.whl (43.6 kB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.2+ x86-64

pyinjector-1.3.0-cp311-cp311-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (48.7 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.17+ x86-64

pyinjector-1.3.0-cp311-cp311-macosx_10_9_universal2.whl (27.2 kB view hashes)

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

pyinjector-1.3.0-cp310-cp310-win_amd64.whl (15.5 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

pyinjector-1.3.0-cp310-cp310-win32.whl (13.2 kB view hashes)

Uploaded CPython 3.10 Windows x86

pyinjector-1.3.0-cp310-cp310-musllinux_1_2_x86_64.whl (43.6 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.2+ x86-64

pyinjector-1.3.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (48.7 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.17+ x86-64

pyinjector-1.3.0-cp39-cp39-win_amd64.whl (15.5 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

pyinjector-1.3.0-cp39-cp39-win32.whl (13.2 kB view hashes)

Uploaded CPython 3.9 Windows x86

pyinjector-1.3.0-cp39-cp39-musllinux_1_2_x86_64.whl (43.3 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.2+ x86-64

pyinjector-1.3.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (48.5 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.17+ x86-64

pyinjector-1.3.0-cp38-cp38-win_amd64.whl (15.5 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

pyinjector-1.3.0-cp38-cp38-win32.whl (13.2 kB view hashes)

Uploaded CPython 3.8 Windows x86

pyinjector-1.3.0-cp38-cp38-musllinux_1_2_x86_64.whl (43.6 kB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.2+ x86-64

pyinjector-1.3.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (49.1 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.17+ x86-64

pyinjector-1.3.0-cp37-cp37m-win_amd64.whl (15.5 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

pyinjector-1.3.0-cp37-cp37m-win32.whl (13.1 kB view hashes)

Uploaded CPython 3.7m Windows x86

pyinjector-1.3.0-cp37-cp37m-musllinux_1_2_x86_64.whl (43.1 kB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.2+ x86-64

pyinjector-1.3.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (48.5 kB view hashes)

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

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