Trainerbase Injector (forked Pyinjector)
Forked from kmaork's Pyinjector to support modern Python versions. The current release requires Python 3.13 or newer.
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.
Trainerbase Injector has no external python dependencies. It is implemented as a python wrapper for kubo/injector.
Installation
uv add trainerbase-injector
Usage
CLI
uv run inject <pid> <path/to/shared/library>
API
from trainerbase_injector import inject
inject(pid, path_to_so_file)
How it works
We build kubo/injector as a CPython C extension.
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).
Development
Use Python 3.15, uv, and a C compiler: Visual Studio Build Tools with the C++ workload and Windows SDK on Windows, GCC or Clang on Linux, or Xcode Command Line Tools on macOS. uv installs Meson and Ninja.
git submodule update --init --recursive
uv sync --locked
uv run poe run --help
uv run poe lint # Format, fix lint issues, and check types
uv run poe build # Build an sdist and a wheel in dist/
uv run poe test # Prepare the build and run the original tests
The default build dependency group supplies the tools needed by editable
installs, including with uv sync --no-dev.
The original tests use tests/injection/injection.c as an injection payload.
poe test rebuilds it with Meson and runs pytest from the test group.
The payload is never included in the release wheel.
Meson archives the last committed revision, including the pinned submodule.
Commit release changes before running poe build.
Metadata
Release files for trainerbase-injector 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| trainerbase_injector-1.0.2.tar.gz | 113.8 kB | Without provenance | Details for trainerbase_injector-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trainerbase_injector-1.0.2-cp315-cp315-win_amd64.whl | CPython 3.15 | CPython 3.15 | Windows x86-64 | Details for trainerbase_injector-1.0.2-cp315-cp315-win_amd64.whl |
Total release size: 146.2 kB
Release files / trainerbase_injector-1.0.2.tar.gz
| Download URL | trainerbase_injector-1.0.2.tar.gz |
|---|---|
| Size | 113.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72c826ed8909b1084c31e99ec9393c32c9b07cb8faa6b60ed0b702aaed0d2e55
|
|
BLAKE2b-256 checksum How to use checksums |
2ca96db9ad889d329a632856daa32e86923afbe4d0542d25f52b8dd916b3bc9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / trainerbase_injector-1.0.2-cp315-cp315-win_amd64.whl
| Download URL | trainerbase_injector-1.0.2-cp315-cp315-win_amd64.whl |
|---|---|
| Size | 32.5 kB |
| Tags | CPython 3.15 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
82087d78e1e1593a5d10c4a283c9dee5cb1a1872674d18bf58abc4ba24d3e468
|
|
BLAKE2b-256 checksum How to use checksums |
7f51f23d6b2baf23b58b1741fe1e24750a78ea63dd0cb2265fb1166e42170548
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for trainerbase-injector 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.