cyminhook
=========
.. image:: https://img.shields.io/pypi/v/cyminhook.svg
:target: https://pypi.org/project/cyminhook/
:alt: PyPI
.. image:: https://github.com/segevfiner/cyminhook/actions/workflows/docs.yml/badge.svg
:target: https://segevfiner.github.io/cyminhook/
:alt: Docs
Hook functions on Windows using `MinHook <https://github.com/TsudaKageyu/minhook>`_.
Quick Start:
.. code-block:: python
import ctypes
import ctypes.wintypes
import cyminhook
import win32api
import win32con
class MessageBoxExWHook(cyminhook.MinHook):
signature = ctypes.WINFUNCTYPE(
ctypes.c_int,
ctypes.wintypes.HWND,
ctypes.wintypes.LPCWSTR,
ctypes.wintypes.LPCWSTR,
ctypes.wintypes.UINT,
ctypes.wintypes.WORD,
use_last_error=True,
)
target = ctypes.windll.user32.MessageBoxExW
def detour(self, hWnd, lpText, lpCaption, uType, langId):
return self.original(hWnd, "Hooked", "Hooked", uType, langId)
with MessageBoxExWHook() as hook:
hook.enable()
win32api.MessageBox(None, "Hello, World!", "Python", win32con.MB_OK)
Raw data
{
"_id": null,
"home_page": "https://github.com/segevfiner/cyminhook",
"name": "cyminhook",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "MinHook",
"author": "Segev Finer",
"author_email": "segev208@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/4f/e5/7e9bc8d453c228b6c8214c6fbdf515026c96616ec7c27d6e79e806ea094d/cyminhook-0.1.4.tar.gz",
"platform": null,
"description": "cyminhook\r\n=========\r\n.. image:: https://img.shields.io/pypi/v/cyminhook.svg\r\n :target: https://pypi.org/project/cyminhook/\r\n :alt: PyPI\r\n\r\n.. image:: https://github.com/segevfiner/cyminhook/actions/workflows/docs.yml/badge.svg\r\n :target: https://segevfiner.github.io/cyminhook/\r\n :alt: Docs\r\n\r\nHook functions on Windows using `MinHook <https://github.com/TsudaKageyu/minhook>`_.\r\n\r\nQuick Start:\r\n\r\n.. code-block:: python\r\n\r\n import ctypes\r\n import ctypes.wintypes\r\n import cyminhook\r\n import win32api\r\n import win32con\r\n\r\n\r\n class MessageBoxExWHook(cyminhook.MinHook):\r\n signature = ctypes.WINFUNCTYPE(\r\n ctypes.c_int,\r\n ctypes.wintypes.HWND,\r\n ctypes.wintypes.LPCWSTR,\r\n ctypes.wintypes.LPCWSTR,\r\n ctypes.wintypes.UINT,\r\n ctypes.wintypes.WORD,\r\n use_last_error=True,\r\n )\r\n\r\n target = ctypes.windll.user32.MessageBoxExW\r\n\r\n def detour(self, hWnd, lpText, lpCaption, uType, langId):\r\n return self.original(hWnd, \"Hooked\", \"Hooked\", uType, langId)\r\n\r\n\r\n with MessageBoxExWHook() as hook:\r\n hook.enable()\r\n\r\n win32api.MessageBox(None, \"Hello, World!\", \"Python\", win32con.MB_OK)\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Hook functions on Windows using MinHook",
"version": "0.1.4",
"project_urls": {
"Documentation": "https://segevfiner.github.io/cyminhook/",
"Homepage": "https://github.com/segevfiner/cyminhook",
"Issue Tracker": "https://github.com/segevfiner/cyminhook/issues"
},
"split_keywords": [
"minhook"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "872cf032d443a935e27b590ade2113b1286f96152a94eb70f5fe4f200e35e737",
"md5": "40e760f7a49d0cb0634a3345fda0ed24",
"sha256": "c3f575f34910d1d1b0ade4b9b16de7333f3f7299e0f465acdba608d15b3e806f"
},
"downloads": -1,
"filename": "cyminhook-0.1.4-cp310-cp310-win32.whl",
"has_sig": false,
"md5_digest": "40e760f7a49d0cb0634a3345fda0ed24",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.6",
"size": 58235,
"upload_time": "2024-01-03T23:26:51",
"upload_time_iso_8601": "2024-01-03T23:26:51.177449Z",
"url": "https://files.pythonhosted.org/packages/87/2c/f032d443a935e27b590ade2113b1286f96152a94eb70f5fe4f200e35e737/cyminhook-0.1.4-cp310-cp310-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5c35c298c2cc2d53c81c159c0438afcabf6ca71d7d84624ab352e28535cbe377",
"md5": "217b1511053b9eaed45c1d24d219418c",
"sha256": "5e21804630f9579d0817181450f0ba75d5b47218935626a09ef205a8de5401a4"
},
"downloads": -1,
"filename": "cyminhook-0.1.4-cp310-cp310-win_amd64.whl",
"has_sig": false,
"md5_digest": "217b1511053b9eaed45c1d24d219418c",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.6",
"size": 68748,
"upload_time": "2024-01-03T23:26:53",
"upload_time_iso_8601": "2024-01-03T23:26:53.309360Z",
"url": "https://files.pythonhosted.org/packages/5c/35/c298c2cc2d53c81c159c0438afcabf6ca71d7d84624ab352e28535cbe377/cyminhook-0.1.4-cp310-cp310-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "98f84464c6ead4a0ce0d20cfe6ee124ca29bc9d49bf9f653a4267c23bd2d7186",
"md5": "c373ff31ce1450594334ef62fe51e43d",
"sha256": "c5df1e9b41acd186dc0ada00752ac7a79e9a4428290fa8e38ed2b7031126f4f6"
},
"downloads": -1,
"filename": "cyminhook-0.1.4-cp311-cp311-win32.whl",
"has_sig": false,
"md5_digest": "c373ff31ce1450594334ef62fe51e43d",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.6",
"size": 58124,
"upload_time": "2024-01-03T23:26:54",
"upload_time_iso_8601": "2024-01-03T23:26:54.756419Z",
"url": "https://files.pythonhosted.org/packages/98/f8/4464c6ead4a0ce0d20cfe6ee124ca29bc9d49bf9f653a4267c23bd2d7186/cyminhook-0.1.4-cp311-cp311-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6243ec26a683dd0e510705902128d9773aeb38af5bbe99a1030064bfbd9e0cac",
"md5": "78a6b99a7a5fa61bd8777d0f25e207d8",
"sha256": "1090ec15ee60dd66605ce8ea33cf788d0548670190c8c0ff0b2587e1e430b592"
},
"downloads": -1,
"filename": "cyminhook-0.1.4-cp311-cp311-win_amd64.whl",
"has_sig": false,
"md5_digest": "78a6b99a7a5fa61bd8777d0f25e207d8",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.6",
"size": 68897,
"upload_time": "2024-01-03T23:26:56",
"upload_time_iso_8601": "2024-01-03T23:26:56.678738Z",
"url": "https://files.pythonhosted.org/packages/62/43/ec26a683dd0e510705902128d9773aeb38af5bbe99a1030064bfbd9e0cac/cyminhook-0.1.4-cp311-cp311-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b4e1c412cdd4c6d8bdafa18e34860faf08f934fabcbfe2820a0a3571bbb40c35",
"md5": "86c29f3481d75142af1c33a648ab4013",
"sha256": "325bad01c5e5f1bf6e417281afdfba1af037d63353bae162f44c61f8f6c5c21c"
},
"downloads": -1,
"filename": "cyminhook-0.1.4-cp312-cp312-win32.whl",
"has_sig": false,
"md5_digest": "86c29f3481d75142af1c33a648ab4013",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.6",
"size": 57157,
"upload_time": "2024-01-03T23:26:57",
"upload_time_iso_8601": "2024-01-03T23:26:57.957752Z",
"url": "https://files.pythonhosted.org/packages/b4/e1/c412cdd4c6d8bdafa18e34860faf08f934fabcbfe2820a0a3571bbb40c35/cyminhook-0.1.4-cp312-cp312-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "44c1e21b023c27c945973a4a039b672baca65aa43581a46105a0f87e46f55088",
"md5": "a995906561298b9763a5d35e920d4792",
"sha256": "6fd1c9ed0aa85367732430bd61faeeb3331468327202767069a9bf7ffbf46342"
},
"downloads": -1,
"filename": "cyminhook-0.1.4-cp312-cp312-win_amd64.whl",
"has_sig": false,
"md5_digest": "a995906561298b9763a5d35e920d4792",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.6",
"size": 67713,
"upload_time": "2024-01-03T23:26:59",
"upload_time_iso_8601": "2024-01-03T23:26:59.798548Z",
"url": "https://files.pythonhosted.org/packages/44/c1/e21b023c27c945973a4a039b672baca65aa43581a46105a0f87e46f55088/cyminhook-0.1.4-cp312-cp312-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5ced4c0f8d0697cf499019e43cb781105259c4ed5c603cb6ea7bd9ba065dafc0",
"md5": "6249409d1a239ada06ffa2bb4332bbd2",
"sha256": "7ce5831026db4b8f9ab4bef90e7157022ffdcb8fc2e92a25c83e5f2e154ce237"
},
"downloads": -1,
"filename": "cyminhook-0.1.4-cp36-cp36m-win32.whl",
"has_sig": false,
"md5_digest": "6249409d1a239ada06ffa2bb4332bbd2",
"packagetype": "bdist_wheel",
"python_version": "cp36",
"requires_python": ">=3.6",
"size": 57654,
"upload_time": "2024-01-03T23:27:00",
"upload_time_iso_8601": "2024-01-03T23:27:00.978445Z",
"url": "https://files.pythonhosted.org/packages/5c/ed/4c0f8d0697cf499019e43cb781105259c4ed5c603cb6ea7bd9ba065dafc0/cyminhook-0.1.4-cp36-cp36m-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d938b0aed8713c22357b5e306f52e42e0972c6a36f649b38805c10e59372210a",
"md5": "df5e70545d4606a759e1e5fb8272a28e",
"sha256": "c6164829f67304440ebaf74b0aa4575c29aa9a6049c14f29c4b70e1196d7b13f"
},
"downloads": -1,
"filename": "cyminhook-0.1.4-cp36-cp36m-win_amd64.whl",
"has_sig": false,
"md5_digest": "df5e70545d4606a759e1e5fb8272a28e",
"packagetype": "bdist_wheel",
"python_version": "cp36",
"requires_python": ">=3.6",
"size": 69108,
"upload_time": "2024-01-03T23:27:02",
"upload_time_iso_8601": "2024-01-03T23:27:02.295307Z",
"url": "https://files.pythonhosted.org/packages/d9/38/b0aed8713c22357b5e306f52e42e0972c6a36f649b38805c10e59372210a/cyminhook-0.1.4-cp36-cp36m-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4fc9cb1ad5928e02fbc76e2184d5852be3bcccc4b6d63d157cda1d9236385579",
"md5": "d3741c8d1fbfff3ad54b09e8614cf191",
"sha256": "d9b065fc2a6308d15037b3b384469bfa1b3533485ff9adec95f897c68126b5e4"
},
"downloads": -1,
"filename": "cyminhook-0.1.4-cp37-cp37m-win32.whl",
"has_sig": false,
"md5_digest": "d3741c8d1fbfff3ad54b09e8614cf191",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.6",
"size": 58898,
"upload_time": "2024-01-03T23:27:04",
"upload_time_iso_8601": "2024-01-03T23:27:04.128076Z",
"url": "https://files.pythonhosted.org/packages/4f/c9/cb1ad5928e02fbc76e2184d5852be3bcccc4b6d63d157cda1d9236385579/cyminhook-0.1.4-cp37-cp37m-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ae752d377e85c766c3d25e1c5ed880b19f6bbe70301b908a2088efe422ab8cbf",
"md5": "7b67a7792a6917399f3b80703f1269cb",
"sha256": "b03e1272bcf63b12d76a0ac8633a663125cb0276291f20ddf25480bec57dc7a0"
},
"downloads": -1,
"filename": "cyminhook-0.1.4-cp37-cp37m-win_amd64.whl",
"has_sig": false,
"md5_digest": "7b67a7792a6917399f3b80703f1269cb",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.6",
"size": 70319,
"upload_time": "2024-01-03T23:27:05",
"upload_time_iso_8601": "2024-01-03T23:27:05.369262Z",
"url": "https://files.pythonhosted.org/packages/ae/75/2d377e85c766c3d25e1c5ed880b19f6bbe70301b908a2088efe422ab8cbf/cyminhook-0.1.4-cp37-cp37m-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6368f3145659ebb8bf7d0929e829c2cdf1aa28b0e34a094e99433154437403a1",
"md5": "108b753f3e569aec0e4531409951804e",
"sha256": "ff5380a767a2ed371fb4d038adf5f6f78f47845f4c4542a5cbe74ecc85ae1041"
},
"downloads": -1,
"filename": "cyminhook-0.1.4-cp38-cp38-win32.whl",
"has_sig": false,
"md5_digest": "108b753f3e569aec0e4531409951804e",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": ">=3.6",
"size": 58633,
"upload_time": "2024-01-03T23:27:06",
"upload_time_iso_8601": "2024-01-03T23:27:06.515501Z",
"url": "https://files.pythonhosted.org/packages/63/68/f3145659ebb8bf7d0929e829c2cdf1aa28b0e34a094e99433154437403a1/cyminhook-0.1.4-cp38-cp38-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "723ec6ff6c403a6e62c534844543faa12146bfcc1ade410032ca56aba971c17c",
"md5": "22117cbf0465d8497bb67d147344490d",
"sha256": "0d4be4ce4ed836aaf9fd0dbd13ca578d7a952cbbf775769aac0945f5894dd65a"
},
"downloads": -1,
"filename": "cyminhook-0.1.4-cp38-cp38-win_amd64.whl",
"has_sig": false,
"md5_digest": "22117cbf0465d8497bb67d147344490d",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": ">=3.6",
"size": 69570,
"upload_time": "2024-01-03T23:27:08",
"upload_time_iso_8601": "2024-01-03T23:27:08.318581Z",
"url": "https://files.pythonhosted.org/packages/72/3e/c6ff6c403a6e62c534844543faa12146bfcc1ade410032ca56aba971c17c/cyminhook-0.1.4-cp38-cp38-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0a9dfc7001ac9d5466b41ecb1ce5445415f9b19d41ea259639addfaabd2278d4",
"md5": "42fff314bcecb86c2710e87540f8d7f2",
"sha256": "4ed44395c6674f010434df5dedc43dfc6991cbcb0d4b0d79114f55366cb5c06a"
},
"downloads": -1,
"filename": "cyminhook-0.1.4-cp39-cp39-win32.whl",
"has_sig": false,
"md5_digest": "42fff314bcecb86c2710e87540f8d7f2",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.6",
"size": 58732,
"upload_time": "2024-01-03T23:27:09",
"upload_time_iso_8601": "2024-01-03T23:27:09.919773Z",
"url": "https://files.pythonhosted.org/packages/0a/9d/fc7001ac9d5466b41ecb1ce5445415f9b19d41ea259639addfaabd2278d4/cyminhook-0.1.4-cp39-cp39-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6acb7574bc460a7081743c156cff8c3faa0edb60698e69390770dac78a13c466",
"md5": "549f6e39435de934f73e372fa8ed620c",
"sha256": "11d5a697e51222bb06bf42c35109e492dbe348a33364c1b8030b462e52b8a468"
},
"downloads": -1,
"filename": "cyminhook-0.1.4-cp39-cp39-win_amd64.whl",
"has_sig": false,
"md5_digest": "549f6e39435de934f73e372fa8ed620c",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.6",
"size": 69355,
"upload_time": "2024-01-03T23:27:11",
"upload_time_iso_8601": "2024-01-03T23:27:11.763474Z",
"url": "https://files.pythonhosted.org/packages/6a/cb/7574bc460a7081743c156cff8c3faa0edb60698e69390770dac78a13c466/cyminhook-0.1.4-cp39-cp39-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4fe57e9bc8d453c228b6c8214c6fbdf515026c96616ec7c27d6e79e806ea094d",
"md5": "19fb5f44f420204cc6f6a60c6d661c8b",
"sha256": "216c0f865644d8e6706d6996b70420034abc0174b96b41c0037e8bb152e3e7db"
},
"downloads": -1,
"filename": "cyminhook-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "19fb5f44f420204cc6f6a60c6d661c8b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 46702,
"upload_time": "2024-01-03T23:27:12",
"upload_time_iso_8601": "2024-01-03T23:27:12.900527Z",
"url": "https://files.pythonhosted.org/packages/4f/e5/7e9bc8d453c228b6c8214c6fbdf515026c96616ec7c27d6e79e806ea094d/cyminhook-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-03 23:27:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "segevfiner",
"github_project": "cyminhook",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "cyminhook"
}