{"id":18826430,"url":"https://github.com/segevfiner/cyminhook","last_synced_at":"2025-04-14T01:31:49.869Z","repository":{"id":61128816,"uuid":"448562478","full_name":"segevfiner/cyminhook","owner":"segevfiner","description":"Hook functions using Python on Windows with MinHook","archived":false,"fork":false,"pushed_at":"2024-11-02T10:40:26.000Z","size":249,"stargazers_count":19,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T00:45:36.235Z","etag":null,"topics":["cython","minhook","python","python3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/cyminhook/","language":"Cython","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/segevfiner.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-01-16T13:29:26.000Z","updated_at":"2025-03-29T13:57:44.000Z","dependencies_parsed_at":"2024-01-02T00:47:26.039Z","dependency_job_id":"af6caa6a-72f9-4b26-a261-149236f3edb7","html_url":"https://github.com/segevfiner/cyminhook","commit_stats":{"total_commits":34,"total_committers":1,"mean_commits":34.0,"dds":0.0,"last_synced_commit":"0a2048b06c938c50258d3a4c8fd952c6e6e2b16f"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segevfiner%2Fcyminhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segevfiner%2Fcyminhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segevfiner%2Fcyminhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segevfiner%2Fcyminhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/segevfiner","download_url":"https://codeload.github.com/segevfiner/cyminhook/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248807643,"owners_count":21164723,"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":["cython","minhook","python","python3"],"created_at":"2024-11-08T01:05:39.660Z","updated_at":"2025-04-14T01:31:49.528Z","avatar_url":"https://github.com/segevfiner.png","language":"Cython","funding_links":[],"categories":[],"sub_categories":[],"readme":"cyminhook\n=========\n.. image:: https://img.shields.io/pypi/v/cyminhook.svg\n   :target: https://pypi.org/project/cyminhook/\n   :alt: PyPI\n\n.. image:: https://github.com/segevfiner/cyminhook/actions/workflows/docs.yml/badge.svg\n   :target: https://segevfiner.github.io/cyminhook/\n   :alt: Docs\n\nHook functions on Windows using `MinHook \u003chttps://github.com/TsudaKageyu/minhook\u003e`_.\n\nQuick Start:\n\n.. code-block:: python\n\n    import ctypes\n    import ctypes.wintypes\n    import cyminhook\n    import win32api\n    import win32con\n\n\n    class MessageBoxExWHook(cyminhook.MinHook):\n        signature = ctypes.WINFUNCTYPE(\n            ctypes.c_int,\n            ctypes.wintypes.HWND,\n            ctypes.wintypes.LPCWSTR,\n            ctypes.wintypes.LPCWSTR,\n            ctypes.wintypes.UINT,\n            ctypes.wintypes.WORD,\n            use_last_error=True,\n        )\n\n        target = ctypes.windll.user32.MessageBoxExW\n\n        def detour(self, hWnd, lpText, lpCaption, uType, langId):\n            return self.original(hWnd, \"Hooked\", \"Hooked\", uType, langId)\n\n\n    with MessageBoxExWHook() as hook:\n        hook.enable()\n\n        win32api.MessageBox(None, \"Hello, World!\", \"Python\", win32con.MB_OK)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsegevfiner%2Fcyminhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsegevfiner%2Fcyminhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsegevfiner%2Fcyminhook/lists"}