{"id":21810454,"url":"https://github.com/kmaork/hypno","last_synced_at":"2025-04-07T12:08:42.368Z","repository":{"id":46122495,"uuid":"278938403","full_name":"kmaork/hypno","owner":"kmaork","description":"Inject python code into a running python process","archived":false,"fork":false,"pushed_at":"2024-09-04T19:05:41.000Z","size":52,"stargazers_count":90,"open_issues_count":2,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T09:05:51.350Z","etag":null,"topics":["injection","linux","python","windows"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kmaork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"kmaork"}},"created_at":"2020-07-11T20:40:06.000Z","updated_at":"2024-11-23T17:32:44.000Z","dependencies_parsed_at":"2024-09-06T02:25:46.871Z","dependency_job_id":"73e27350-fd38-4ff3-aa52-ea657b62fff5","html_url":"https://github.com/kmaork/hypno","commit_stats":{"total_commits":28,"total_committers":1,"mean_commits":28.0,"dds":0.0,"last_synced_commit":"ce50d5c07fe357164bf5a3287db10bb9dc3bad98"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmaork%2Fhypno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmaork%2Fhypno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmaork%2Fhypno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmaork%2Fhypno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kmaork","download_url":"https://codeload.github.com/kmaork/hypno/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648978,"owners_count":20972945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["injection","linux","python","windows"],"created_at":"2024-11-27T13:35:44.472Z","updated_at":"2025-04-07T12:08:42.350Z","avatar_url":"https://github.com/kmaork.png","language":"Python","readme":"# Hypno\r\n\r\n[![PyPI version](https://badge.fury.io/py/hypno.svg)](https://badge.fury.io/py/hypno)\r\n[![PyPI Supported Python Versions](https://img.shields.io/pypi/pyversions/hypno.svg)](https://pypi.python.org/pypi/hypno/)\r\n[![GitHub license](https://img.shields.io/github/license/kmaork/hypno)](https://github.com/kmaork/hypno/blob/master/LICENSE.txt)\r\n[![Tests (GitHub Actions)](https://github.com/kmaork/hypno/workflows/Tests/badge.svg)](https://github.com/kmaork/hypno)\r\n[![chat](https://img.shields.io/discord/850821971616858192.svg?logo=discord)](https://discord.gg/P3mN92eM2X)\r\n\r\nA cross-platform tool/library allowing to inject python code into a running python process.\r\nBased on [kmaork/pyinjector](https://github.com/kmaork/pyinjector).\r\n\r\nIf you are trying to debug a python process, check out [kmaork/madbg](https://github.com/kmaork/madbg).\r\n\r\n### Installation\r\n```shell script\r\npip install hypno\r\n```\r\nBoth source distributions, manylinux, musslinux, mac and windows wheels are uploaded to pypi for every release.\r\n\r\n### Usage\r\n#### CLI\r\n```shell script\r\nhypno \u003cpid\u003e \u003cpython_code\u003e\r\n```\r\n\r\n#### API\r\n```python\r\nfrom hypno import inject_py\r\n\r\ninject_py(pid, python_code)\r\n```\r\n\r\n#### Example\r\nThis example runs a python program that prints its pid, and then attaches to the newly created process and\r\ninjects it with another print statement using hypno. Mac users will need to use `sudo` for the second command.\r\n```shell script\r\npython -c \"import os, time; print('Hello from', os.getpid()); time.sleep(0.5)\" \u0026\\\r\nhypno $! \"import os; print('Hello again from', os.getpid())\"\r\n```\r\n\r\n### Security\r\nHypno briefly generates a temporary file containing the requested python code.\r\nThis file is given 644 permissions by default, which means all users can read it.\r\nTo use custom permissions, you can pass the `permissions` argument to `inject_py()`.\r\n","funding_links":["https://github.com/sponsors/kmaork"],"categories":["Bytecode"],"sub_categories":["Manual analysis"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmaork%2Fhypno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkmaork%2Fhypno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmaork%2Fhypno/lists"}