A tool/library allowing to inject python code into a running python process.
Project description
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()
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file hypno-1.1.0.tar.gz
.
File metadata
- Download URL: hypno-1.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5da06d02b49b27fe0b7513677d33c010939b9af94ecbe6cf4add9efc94882dd5 |
|
MD5 | c3518e2e79e9f0121b980a4367e4fa06 |
|
BLAKE2b-256 | f8cc3ed4187e37240cfd25558469956a44d3c664aeac791b3677bc49d1766fb9 |
File details
Details for the file hypno-1.1.0-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: hypno-1.1.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 10.0 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c0c6b4c24a6c4f961970003ff4436dc56dd2978cfc2df5724ab7e406197666e |
|
MD5 | 6eca2bf53320923da4be3f9cc03dc2e3 |
|
BLAKE2b-256 | 5ca9dd89d2c514c9b4788b539256087d62925b7f65439fb01335e9805e8d53b3 |
File details
Details for the file hypno-1.1.0-cp311-cp311-win32.whl
.
File metadata
- Download URL: hypno-1.1.0-cp311-cp311-win32.whl
- Upload date:
- Size: 9.5 kB
- Tags: CPython 3.11, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 563f0a5025ef7c1d9a690b6057c1707eb2244286de19731dbde50594f032a30d |
|
MD5 | 489e59a29d41ef01eae3425058fcfe3a |
|
BLAKE2b-256 | d5cb6f0eeb227c9aaa7a4b79641a5456d41b03a060411f6a8eed494a2c6494ba |
File details
Details for the file hypno-1.1.0-cp311-cp311-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: hypno-1.1.0-cp311-cp311-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 12.5 kB
- Tags: CPython 3.11, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f76745bb6af0eef540c680d5183216bcca850e52abf88f9de13a4405a69d1d36 |
|
MD5 | 75193427462bf6be04b0948c1b5e1cd1 |
|
BLAKE2b-256 | 69a64861f7385999cd2d0255fd8d1b6bfc39c6dec25c7546df37064fd380a5c6 |
File details
Details for the file hypno-1.1.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- 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
- Upload date:
- Size: 12.6 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5d2bd446d474bbe4b6e159b6b6ecc1b4bacc7938e807118b6f35dea0aba75db |
|
MD5 | c55c6104c356325683b878b2ab62f89e |
|
BLAKE2b-256 | 882fea1db76ccd403f3800c27e34fad5631cc85db9c6022a9d4044ef5b1e5d7a |
File details
Details for the file hypno-1.1.0-cp311-cp311-macosx_10_9_universal2.whl
.
File metadata
- Download URL: hypno-1.1.0-cp311-cp311-macosx_10_9_universal2.whl
- Upload date:
- Size: 8.1 kB
- Tags: CPython 3.11, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ad439d21bc9bfee72512a12cacde8ca54463834db91d5ba2defe4ffe49e6794 |
|
MD5 | 544fe04f6d1fc7fbbbaad0ee3f992c5b |
|
BLAKE2b-256 | cfeaf7f40707beee221a3b7bf94e62091e19c0e6d8427890a5dff755ae23b7fa |
File details
Details for the file hypno-1.1.0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: hypno-1.1.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 10.0 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91c705f552766daa14778411cfa4d382e502a4db32604a570de726de3fa7fa92 |
|
MD5 | f4d5d6fcf61f16e0791cb63f3f8af28c |
|
BLAKE2b-256 | d0a8976972ad7aeeef71111acb2a40a07d7f75fadfca2adc26122cffcc29dc68 |
File details
Details for the file hypno-1.1.0-cp310-cp310-win32.whl
.
File metadata
- Download URL: hypno-1.1.0-cp310-cp310-win32.whl
- Upload date:
- Size: 9.5 kB
- Tags: CPython 3.10, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ec149ba075777f850c288b11d56ab8c04906d6d7d6a3e28e4c1fcdb748195c3 |
|
MD5 | 34026a49f3d17b4cb95e9cd7b795f47c |
|
BLAKE2b-256 | 3cd23745973660139e3214dcaceb1730f025348fc5fd9efd0bad8e4aaaab3f01 |
File details
Details for the file hypno-1.1.0-cp310-cp310-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: hypno-1.1.0-cp310-cp310-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 12.5 kB
- Tags: CPython 3.10, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5f928f97bfbcee7512a062d283b638d16a143d95739b3f92a54de36eb8591ad |
|
MD5 | 7f3988b70524581796b118c62ec22f12 |
|
BLAKE2b-256 | dc6fa39c94ac8f49a7bafb8386687807fdbdf1466b871e5c340c81a4d5d17dee |
File details
Details for the file hypno-1.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- 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
- Upload date:
- Size: 12.6 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 848fe93e0d0a50a8cfbcb7a0c3327d4096d6b756eeb6f7a73468369e09622c3f |
|
MD5 | 6e733d55b13a6cbb64ef21d6309bf5d5 |
|
BLAKE2b-256 | 34cc38e939c4d607c77f9ec887e6d5c937e22b22e27c66bd9922ee168ba6ccb6 |
File details
Details for the file hypno-1.1.0-cp310-cp310-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: hypno-1.1.0-cp310-cp310-macosx_11_0_x86_64.whl
- Upload date:
- Size: 6.5 kB
- Tags: CPython 3.10, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65ee6b9a0e99144b6cdd52896738ff9b1c39276b46df66dacad3bf3a2a0ae93d |
|
MD5 | 0c86d83974695dc97313af23b9b48bd7 |
|
BLAKE2b-256 | 52dabf8e72dfa00efa55731f33e646f59fa92e50e82106dcedd88c60ec848c9b |
File details
Details for the file hypno-1.1.0-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: hypno-1.1.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 10.0 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea3a42feb3f72b2176030d5350bcacff2062c250706ac3eb43346c0b6e7b2ea8 |
|
MD5 | 82081ea601680c718508e8dd50c9dd6a |
|
BLAKE2b-256 | 4f449e9114a3492139ee933a765edd88c8d6be0f6b6f2e01fee6bc4436245227 |
File details
Details for the file hypno-1.1.0-cp39-cp39-win32.whl
.
File metadata
- Download URL: hypno-1.1.0-cp39-cp39-win32.whl
- Upload date:
- Size: 9.5 kB
- Tags: CPython 3.9, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ddc9c2ffc7452ed1c225196c4ce8df8de1e37f8948e768d2a2b380f9ff9912d |
|
MD5 | 806b0c35f6e2814dfc1e7a1aa1c61f5f |
|
BLAKE2b-256 | 37e1dac06598cb5f433589eccf1d935631322c6b28fa11ce487e264b8effa463 |
File details
Details for the file hypno-1.1.0-cp39-cp39-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: hypno-1.1.0-cp39-cp39-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 12.4 kB
- Tags: CPython 3.9, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb6b8ebf5addd4be0ce9009ea5bee0634124511019c5de4d09ace61cd3abbfc9 |
|
MD5 | 223847272ce09fe7020b32180bf98996 |
|
BLAKE2b-256 | a5255169de030ec283d4bc3e960bff888c73273e7ec88396f33dc9dbd0ab9cec |
File details
Details for the file hypno-1.1.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- 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
- Upload date:
- Size: 12.4 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3245aeaf4781eda3ecb779e1774037731b993ad08f02a31b712d06173398f2ff |
|
MD5 | 1044955719daba4503b2d6bd44da897f |
|
BLAKE2b-256 | 8871ad4fdc1c79ed5493e5bef481c476e26cfdb90de8828ea50a4bbda0f7f570 |
File details
Details for the file hypno-1.1.0-cp39-cp39-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: hypno-1.1.0-cp39-cp39-macosx_11_0_x86_64.whl
- Upload date:
- Size: 6.5 kB
- Tags: CPython 3.9, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d8ee043eccae4e0ff6c629f47093485fb0b0684ab66c7bb6f32fe7dce5b848f |
|
MD5 | ddd1e9e87418f587a19d0af69fb347c9 |
|
BLAKE2b-256 | 73610286ae405985c9bba5c659801cbb3379c62dd8e94fbcc928868efa673606 |
File details
Details for the file hypno-1.1.0-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: hypno-1.1.0-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 9.9 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df62eab7a2e56f6213da12f76e34b2b349be7f640ca8774c209492d51e882468 |
|
MD5 | ece93dd1084ea23ec5a109f8f4690b87 |
|
BLAKE2b-256 | e6420cb9066a688f2830947108d17426b43dfbe82c30a1775beda6537b26dab8 |
File details
Details for the file hypno-1.1.0-cp38-cp38-win32.whl
.
File metadata
- Download URL: hypno-1.1.0-cp38-cp38-win32.whl
- Upload date:
- Size: 9.5 kB
- Tags: CPython 3.8, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6922c69c4a7cae9716a766feabc6ce6752cb61d2913f74134505151784fb834 |
|
MD5 | cc737caae9f9a337152efa9189bff163 |
|
BLAKE2b-256 | 35b58d376e81df3a264e8cf0f85ee6d065aa873f85cbfb77d78228cc1805e060 |
File details
Details for the file hypno-1.1.0-cp38-cp38-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: hypno-1.1.0-cp38-cp38-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 12.4 kB
- Tags: CPython 3.8, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbd7027d89f2455f602feb04eb3aa896efe47e6dee77a72d2a3ae9d1bb9e0daf |
|
MD5 | 619fd7c28468b8e9db2d3ea4184fc922 |
|
BLAKE2b-256 | 8248d4b59219d46e63fd201f20979b1fdd38fcb53fa683ed3ac535af8c7dba0b |
File details
Details for the file hypno-1.1.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- 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
- Upload date:
- Size: 13.0 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb7caee8c566391e4b1c695672fb61789d86df68676f3f275582a4ca93eaddba |
|
MD5 | a9ca54cac3c1e4eb4b3a0f758c1ffb99 |
|
BLAKE2b-256 | a5249ab559d6c3c9d5573b0b6ac059b6fa189ce3d232accf5c3f33d7e0744188 |
File details
Details for the file hypno-1.1.0-cp38-cp38-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: hypno-1.1.0-cp38-cp38-macosx_11_0_x86_64.whl
- Upload date:
- Size: 6.5 kB
- Tags: CPython 3.8, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a99292e9234afd8597821dc913e9d1ea08a5c7377a07a1a7e14ae3cf739eb75 |
|
MD5 | 14abcdf0151bb2018583ba7bc4a135d7 |
|
BLAKE2b-256 | af8e0323b2795d2a9027e832444ebbf4efe7eda193bbb2e27831af60869b3a78 |