Hypno
A cross-platform tool/library allowing to inject python code into a running python process. Based on kmaork/pyinjector.
If you are trying to debug a python process, check out kmaork/madbg.
Installation
pip install hypno
Both source distributions, manylinux, musslinux, mac and windows wheels are uploaded to pypi for every release.
Usage
CLI
hypno <pid> <python_code>
API
from hypno import inject_py
inject_py(pid, python_code)
Example
This example runs a python program that prints its pid, and then attaches to the newly created process and
injects it with another print statement using hypno. Mac users will need to use sudo for the second command.
python -c "import os, time; print('Hello from', os.getpid()); time.sleep(0.5)" &\
hypno $! "import os; print('Hello again from', os.getpid())"
Security
Hypno briefly generates a temporary file containing the requested python code.
This file is given 644 permissions by default, which means all users can read it.
To use custom permissions, you can pass the permissions argument to inject_py().
Metadata
Release files for hypno 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hypno-1.1.0.tar.gz | 5.8 kB | Details |
Built distributions (wheels)
Total release size: 211.7 kB
Release files / hypno-1.1.0.tar.gz
| Download URL | hypno-1.1.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5da06d02b49b27fe0b7513677d33c010939b9af94ecbe6cf4add9efc94882dd5
|
|
BLAKE2b-256 checksum How to use checksums |
f8cc3ed4187e37240cfd25558469956a44d3c664aeac791b3677bc49d1766fb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp311-cp311-win_amd64.whl
| Download URL | hypno-1.1.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 10.0 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0c0c6b4c24a6c4f961970003ff4436dc56dd2978cfc2df5724ab7e406197666e
|
|
BLAKE2b-256 checksum How to use checksums |
5ca9dd89d2c514c9b4788b539256087d62925b7f65439fb01335e9805e8d53b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp311-cp311-win32.whl
| Download URL | hypno-1.1.0-cp311-cp311-win32.whl |
|---|---|
| Size | 9.5 kB |
| Tags | CPython 3.11 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
563f0a5025ef7c1d9a690b6057c1707eb2244286de19731dbde50594f032a30d
|
|
BLAKE2b-256 checksum How to use checksums |
d5cb6f0eeb227c9aaa7a4b79641a5456d41b03a060411f6a8eed494a2c6494ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | hypno-1.1.0-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 12.5 kB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
f76745bb6af0eef540c680d5183216bcca850e52abf88f9de13a4405a69d1d36
|
|
BLAKE2b-256 checksum How to use checksums |
69a64861f7385999cd2d0255fd8d1b6bfc39c6dec25c7546df37064fd380a5c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | hypno-1.1.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 12.6 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
e5d2bd446d474bbe4b6e159b6b6ecc1b4bacc7938e807118b6f35dea0aba75db
|
|
BLAKE2b-256 checksum How to use checksums |
882fea1db76ccd403f3800c27e34fad5631cc85db9c6022a9d4044ef5b1e5d7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp311-cp311-macosx_10_9_universal2.whl
| Download URL | hypno-1.1.0-cp311-cp311-macosx_10_9_universal2.whl |
|---|---|
| Size | 8.1 kB |
| Tags | CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
7ad439d21bc9bfee72512a12cacde8ca54463834db91d5ba2defe4ffe49e6794
|
|
BLAKE2b-256 checksum How to use checksums |
cfeaf7f40707beee221a3b7bf94e62091e19c0e6d8427890a5dff755ae23b7fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp310-cp310-win_amd64.whl
| Download URL | hypno-1.1.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 10.0 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
91c705f552766daa14778411cfa4d382e502a4db32604a570de726de3fa7fa92
|
|
BLAKE2b-256 checksum How to use checksums |
d0a8976972ad7aeeef71111acb2a40a07d7f75fadfca2adc26122cffcc29dc68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp310-cp310-win32.whl
| Download URL | hypno-1.1.0-cp310-cp310-win32.whl |
|---|---|
| Size | 9.5 kB |
| Tags | CPython 3.10 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
2ec149ba075777f850c288b11d56ab8c04906d6d7d6a3e28e4c1fcdb748195c3
|
|
BLAKE2b-256 checksum How to use checksums |
3cd23745973660139e3214dcaceb1730f025348fc5fd9efd0bad8e4aaaab3f01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp310-cp310-musllinux_1_2_x86_64.whl
| Download URL | hypno-1.1.0-cp310-cp310-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 12.5 kB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
f5f928f97bfbcee7512a062d283b638d16a143d95739b3f92a54de36eb8591ad
|
|
BLAKE2b-256 checksum How to use checksums |
dc6fa39c94ac8f49a7bafb8386687807fdbdf1466b871e5c340c81a4d5d17dee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | hypno-1.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 12.6 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
848fe93e0d0a50a8cfbcb7a0c3327d4096d6b756eeb6f7a73468369e09622c3f
|
|
BLAKE2b-256 checksum How to use checksums |
34cc38e939c4d607c77f9ec887e6d5c937e22b22e27c66bd9922ee168ba6ccb6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp310-cp310-macosx_11_0_x86_64.whl
| Download URL | hypno-1.1.0-cp310-cp310-macosx_11_0_x86_64.whl |
|---|---|
| Size | 6.5 kB |
| Tags | CPython 3.10 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
65ee6b9a0e99144b6cdd52896738ff9b1c39276b46df66dacad3bf3a2a0ae93d
|
|
BLAKE2b-256 checksum How to use checksums |
52dabf8e72dfa00efa55731f33e646f59fa92e50e82106dcedd88c60ec848c9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp39-cp39-win_amd64.whl
| Download URL | hypno-1.1.0-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 10.0 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ea3a42feb3f72b2176030d5350bcacff2062c250706ac3eb43346c0b6e7b2ea8
|
|
BLAKE2b-256 checksum How to use checksums |
4f449e9114a3492139ee933a765edd88c8d6be0f6b6f2e01fee6bc4436245227
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp39-cp39-win32.whl
| Download URL | hypno-1.1.0-cp39-cp39-win32.whl |
|---|---|
| Size | 9.5 kB |
| Tags | CPython 3.9 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
7ddc9c2ffc7452ed1c225196c4ce8df8de1e37f8948e768d2a2b380f9ff9912d
|
|
BLAKE2b-256 checksum How to use checksums |
37e1dac06598cb5f433589eccf1d935631322c6b28fa11ce487e264b8effa463
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp39-cp39-musllinux_1_2_x86_64.whl
| Download URL | hypno-1.1.0-cp39-cp39-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 12.4 kB |
| Tags | CPython 3.9 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
fb6b8ebf5addd4be0ce9009ea5bee0634124511019c5de4d09ace61cd3abbfc9
|
|
BLAKE2b-256 checksum How to use checksums |
a5255169de030ec283d4bc3e960bff888c73273e7ec88396f33dc9dbd0ab9cec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | hypno-1.1.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 12.4 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
3245aeaf4781eda3ecb779e1774037731b993ad08f02a31b712d06173398f2ff
|
|
BLAKE2b-256 checksum How to use checksums |
8871ad4fdc1c79ed5493e5bef481c476e26cfdb90de8828ea50a4bbda0f7f570
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp39-cp39-macosx_11_0_x86_64.whl
| Download URL | hypno-1.1.0-cp39-cp39-macosx_11_0_x86_64.whl |
|---|---|
| Size | 6.5 kB |
| Tags | CPython 3.9 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
4d8ee043eccae4e0ff6c629f47093485fb0b0684ab66c7bb6f32fe7dce5b848f
|
|
BLAKE2b-256 checksum How to use checksums |
73610286ae405985c9bba5c659801cbb3379c62dd8e94fbcc928868efa673606
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp38-cp38-win_amd64.whl
| Download URL | hypno-1.1.0-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 9.9 kB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
df62eab7a2e56f6213da12f76e34b2b349be7f640ca8774c209492d51e882468
|
|
BLAKE2b-256 checksum How to use checksums |
e6420cb9066a688f2830947108d17426b43dfbe82c30a1775beda6537b26dab8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp38-cp38-win32.whl
| Download URL | hypno-1.1.0-cp38-cp38-win32.whl |
|---|---|
| Size | 9.5 kB |
| Tags | CPython 3.8 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
a6922c69c4a7cae9716a766feabc6ce6752cb61d2913f74134505151784fb834
|
|
BLAKE2b-256 checksum How to use checksums |
35b58d376e81df3a264e8cf0f85ee6d065aa873f85cbfb77d78228cc1805e060
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp38-cp38-musllinux_1_2_x86_64.whl
| Download URL | hypno-1.1.0-cp38-cp38-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 12.4 kB |
| Tags | CPython 3.8 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
dbd7027d89f2455f602feb04eb3aa896efe47e6dee77a72d2a3ae9d1bb9e0daf
|
|
BLAKE2b-256 checksum How to use checksums |
8248d4b59219d46e63fd201f20979b1fdd38fcb53fa683ed3ac535af8c7dba0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | hypno-1.1.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 13.0 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
cb7caee8c566391e4b1c695672fb61789d86df68676f3f275582a4ca93eaddba
|
|
BLAKE2b-256 checksum How to use checksums |
a5249ab559d6c3c9d5573b0b6ac059b6fa189ce3d232accf5c3f33d7e0744188
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Release files / hypno-1.1.0-cp38-cp38-macosx_11_0_x86_64.whl
| Download URL | hypno-1.1.0-cp38-cp38-macosx_11_0_x86_64.whl |
|---|---|
| Size | 6.5 kB |
| Tags | CPython 3.8 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
7a99292e9234afd8597821dc913e9d1ea08a5c7377a07a1a7e14ae3cf739eb75
|
|
BLAKE2b-256 checksum How to use checksums |
af8e0323b2795d2a9027e832444ebbf4efe7eda193bbb2e27831af60869b3a78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|