cyminhook


Namecyminhook JSON
Version 0.1.5 PyPI version JSON
download
home_pagehttps://github.com/segevfiner/cyminhook
SummaryHook functions on Windows using MinHook
upload_time2024-11-02 10:56:35
maintainerNone
docs_urlNone
authorSegev Finer
requires_python>=3.6
licenseMIT
keywords minhook
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "MinHook",
    "author": "Segev Finer",
    "author_email": "segev208@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3d/78/3d8f1505964f448c19bf0fc238a536d04e7dbcd28c050f464fb4d0e8f7db/cyminhook-0.1.5.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.5",
    "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": "696bfab4e01bf1f5423977f7a894dd5af652e77f04dd302474c788c6b9169df4",
                "md5": "f685a3539eb05d9f30bb169add675ea9",
                "sha256": "6f17444ecd5e5890af0a29ded6b4fa27e51b725564e22df59e2d21efdbd2f069"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5-cp310-cp310-win32.whl",
            "has_sig": false,
            "md5_digest": "f685a3539eb05d9f30bb169add675ea9",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.6",
            "size": 58287,
            "upload_time": "2024-11-02T10:56:13",
            "upload_time_iso_8601": "2024-11-02T10:56:13.844075Z",
            "url": "https://files.pythonhosted.org/packages/69/6b/fab4e01bf1f5423977f7a894dd5af652e77f04dd302474c788c6b9169df4/cyminhook-0.1.5-cp310-cp310-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e8de5f94d21cae2273d403ab511bbe14335adedae632aeff49a9fbdeba9bdb59",
                "md5": "2c9111aeae447260fa41770fd774d20f",
                "sha256": "8e70a29b0d7ad896c1b3443c99a8c5f6f3d6e4f56af42f3a509c931c106dd6b1"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "2c9111aeae447260fa41770fd774d20f",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.6",
            "size": 68782,
            "upload_time": "2024-11-02T10:56:15",
            "upload_time_iso_8601": "2024-11-02T10:56:15.532154Z",
            "url": "https://files.pythonhosted.org/packages/e8/de/5f94d21cae2273d403ab511bbe14335adedae632aeff49a9fbdeba9bdb59/cyminhook-0.1.5-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f4c692fe41988faff66cca437cd13a2efc2de318653ea2ec1cbbc02a2f2221bb",
                "md5": "058da609c1845f9cb6da5708c7eb7858",
                "sha256": "681888e3266374b19ad4fb5ffcd86d904035dfa827fd689c423b5c72b7c05ad8"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5-cp311-cp311-win32.whl",
            "has_sig": false,
            "md5_digest": "058da609c1845f9cb6da5708c7eb7858",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.6",
            "size": 58189,
            "upload_time": "2024-11-02T10:56:17",
            "upload_time_iso_8601": "2024-11-02T10:56:17.023803Z",
            "url": "https://files.pythonhosted.org/packages/f4/c6/92fe41988faff66cca437cd13a2efc2de318653ea2ec1cbbc02a2f2221bb/cyminhook-0.1.5-cp311-cp311-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9117808a0f1fc446a0f2f4d158e54cf6c8a725492b49eb409e77680f3f91d795",
                "md5": "9faf2ef6543fd7fab415ed4377aa3199",
                "sha256": "f82a7e4a36071ea09967ccec7a8f37a30aa709fee19e3c5bb6f0dd66be2ea06d"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "9faf2ef6543fd7fab415ed4377aa3199",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.6",
            "size": 68905,
            "upload_time": "2024-11-02T10:56:18",
            "upload_time_iso_8601": "2024-11-02T10:56:18.128537Z",
            "url": "https://files.pythonhosted.org/packages/91/17/808a0f1fc446a0f2f4d158e54cf6c8a725492b49eb409e77680f3f91d795/cyminhook-0.1.5-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1c5c6ca47c22aa5853c60f71c7b3f9b389732646d7aea853fb3dc46fa40b4056",
                "md5": "846524bd242da342d8f27e4b5f107ad9",
                "sha256": "a1fd7e30e072a2501ca5837f301ab7c0c1a9b176dd067c7c02c7883b676f5899"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5-cp312-cp312-win32.whl",
            "has_sig": false,
            "md5_digest": "846524bd242da342d8f27e4b5f107ad9",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.6",
            "size": 57216,
            "upload_time": "2024-11-02T10:56:19",
            "upload_time_iso_8601": "2024-11-02T10:56:19.590955Z",
            "url": "https://files.pythonhosted.org/packages/1c/5c/6ca47c22aa5853c60f71c7b3f9b389732646d7aea853fb3dc46fa40b4056/cyminhook-0.1.5-cp312-cp312-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b179362fdf90ad968fd6d7c79c19160996d47f06741f44e8dcb9ac8887fcab0c",
                "md5": "fd21a65cd24ae425eb3d3124f5c133e7",
                "sha256": "e5a1ec2a3c4455416f46b1e691e01d17b986c8c2ebc8ded3f24fd7abe5ae0ca4"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "fd21a65cd24ae425eb3d3124f5c133e7",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.6",
            "size": 67731,
            "upload_time": "2024-11-02T10:56:20",
            "upload_time_iso_8601": "2024-11-02T10:56:20.544456Z",
            "url": "https://files.pythonhosted.org/packages/b1/79/362fdf90ad968fd6d7c79c19160996d47f06741f44e8dcb9ac8887fcab0c/cyminhook-0.1.5-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7f94614701eff1cfdad106aa1ce6ce21aebb18dba1b486088ee5cbc1162b5254",
                "md5": "7458508c664788cafb87d1c866233617",
                "sha256": "a3fea767936e162d670b7068f76a339304b6a22c6e1e1776176defa427af0c31"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5-cp313-cp313-win32.whl",
            "has_sig": false,
            "md5_digest": "7458508c664788cafb87d1c866233617",
            "packagetype": "bdist_wheel",
            "python_version": "cp313",
            "requires_python": ">=3.6",
            "size": 56466,
            "upload_time": "2024-11-02T10:56:21",
            "upload_time_iso_8601": "2024-11-02T10:56:21.537386Z",
            "url": "https://files.pythonhosted.org/packages/7f/94/614701eff1cfdad106aa1ce6ce21aebb18dba1b486088ee5cbc1162b5254/cyminhook-0.1.5-cp313-cp313-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "28f39ef7f482a31f7eb6cba83f5e1c91165edb1f10ef229b13b79bbdfddc6e01",
                "md5": "11e964e3bf43840057865591fd37ade2",
                "sha256": "e270ee9fa94f35da6232bca625762b7ce3c9c18a431af8519f5fa151bdf29e52"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5-cp313-cp313-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "11e964e3bf43840057865591fd37ade2",
            "packagetype": "bdist_wheel",
            "python_version": "cp313",
            "requires_python": ">=3.6",
            "size": 67001,
            "upload_time": "2024-11-02T10:56:23",
            "upload_time_iso_8601": "2024-11-02T10:56:23.487945Z",
            "url": "https://files.pythonhosted.org/packages/28/f3/9ef7f482a31f7eb6cba83f5e1c91165edb1f10ef229b13b79bbdfddc6e01/cyminhook-0.1.5-cp313-cp313-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2e06694d0c9233e642e1d6337a04ce559addd347c91eb15095b2718e3deabc70",
                "md5": "61f1ef66d05881fc32ae3afedce76213",
                "sha256": "e6bfc9b009912bfee5bee20cd2fcc7fb4a3d659151a60f93f7405df3e55995b5"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5-cp36-cp36m-win32.whl",
            "has_sig": false,
            "md5_digest": "61f1ef66d05881fc32ae3afedce76213",
            "packagetype": "bdist_wheel",
            "python_version": "cp36",
            "requires_python": ">=3.6",
            "size": 57664,
            "upload_time": "2024-11-02T10:56:24",
            "upload_time_iso_8601": "2024-11-02T10:56:24.862088Z",
            "url": "https://files.pythonhosted.org/packages/2e/06/694d0c9233e642e1d6337a04ce559addd347c91eb15095b2718e3deabc70/cyminhook-0.1.5-cp36-cp36m-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7d44b6def63f0ba95d3d8133a609438e17795e6e39d3602f13899530f7fd1d7e",
                "md5": "c5aa6ac8a3d94b6296a76b7946565a4f",
                "sha256": "08c9f8027cb73257c8730a85aae6fef98fed689e9497842ace2f1d8df340a94d"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5-cp36-cp36m-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "c5aa6ac8a3d94b6296a76b7946565a4f",
            "packagetype": "bdist_wheel",
            "python_version": "cp36",
            "requires_python": ">=3.6",
            "size": 69126,
            "upload_time": "2024-11-02T10:56:26",
            "upload_time_iso_8601": "2024-11-02T10:56:26.337896Z",
            "url": "https://files.pythonhosted.org/packages/7d/44/b6def63f0ba95d3d8133a609438e17795e6e39d3602f13899530f7fd1d7e/cyminhook-0.1.5-cp36-cp36m-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ce0e77cb4bc35adf0b0161c8d2c691726fb3c626d40c55919098dbf5d586b18f",
                "md5": "2e737ea29065d5f2addadbfcf60a6f0d",
                "sha256": "4a19452fd2a22ac0631534bf7815a114b34e302e003084ce64be7ba1b569b49a"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5-cp37-cp37m-win32.whl",
            "has_sig": false,
            "md5_digest": "2e737ea29065d5f2addadbfcf60a6f0d",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.6",
            "size": 58965,
            "upload_time": "2024-11-02T10:56:27",
            "upload_time_iso_8601": "2024-11-02T10:56:27.354132Z",
            "url": "https://files.pythonhosted.org/packages/ce/0e/77cb4bc35adf0b0161c8d2c691726fb3c626d40c55919098dbf5d586b18f/cyminhook-0.1.5-cp37-cp37m-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d9a5b014d78e2619e47d4761f643f80b57260dbf2b793f40e05ae3bccde19cbb",
                "md5": "02fc8b67898b4fb22e1cc82571662888",
                "sha256": "105cb0ae8d2b51c888529ee590d1e86f7bdb013aa87844d8f60a3c9221e21929"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5-cp37-cp37m-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "02fc8b67898b4fb22e1cc82571662888",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.6",
            "size": 70386,
            "upload_time": "2024-11-02T10:56:28",
            "upload_time_iso_8601": "2024-11-02T10:56:28.546238Z",
            "url": "https://files.pythonhosted.org/packages/d9/a5/b014d78e2619e47d4761f643f80b57260dbf2b793f40e05ae3bccde19cbb/cyminhook-0.1.5-cp37-cp37m-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a7049f02924b503c92bb19fb064b88d5a903bf3f6a241dd46b84e49c772f8377",
                "md5": "4c7f73bc84d875eba27fed89f87f5395",
                "sha256": "16008e09eeb311a0518ae01ededd7671be26ce8fbf4c7f66ec09ee7b727450fd"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5-cp38-cp38-win32.whl",
            "has_sig": false,
            "md5_digest": "4c7f73bc84d875eba27fed89f87f5395",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.6",
            "size": 58688,
            "upload_time": "2024-11-02T10:56:30",
            "upload_time_iso_8601": "2024-11-02T10:56:30.290710Z",
            "url": "https://files.pythonhosted.org/packages/a7/04/9f02924b503c92bb19fb064b88d5a903bf3f6a241dd46b84e49c772f8377/cyminhook-0.1.5-cp38-cp38-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7e0f3d6e6c5876178288dad535208cf90b17bb101e7ce50f9e214c44e21dd1a9",
                "md5": "c3fc0b89b2067c642537155f93ef1ef2",
                "sha256": "4ce7d3bbb66101f9cca22c6f33b10d9abe58e38bf2339406207741cfd924c54a"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5-cp38-cp38-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "c3fc0b89b2067c642537155f93ef1ef2",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.6",
            "size": 69613,
            "upload_time": "2024-11-02T10:56:31",
            "upload_time_iso_8601": "2024-11-02T10:56:31.724641Z",
            "url": "https://files.pythonhosted.org/packages/7e/0f/3d6e6c5876178288dad535208cf90b17bb101e7ce50f9e214c44e21dd1a9/cyminhook-0.1.5-cp38-cp38-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8a4741d3b6c7fa97cf36ae9f6a560b321cc4787b39e393d031179840f79eca34",
                "md5": "215faedac6cd192d5c56c1adeafd1915",
                "sha256": "331e95b6e630d79d66ef6cac36c30165806e6b084657fa4646336b53b0a5eb27"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5-cp39-cp39-win32.whl",
            "has_sig": false,
            "md5_digest": "215faedac6cd192d5c56c1adeafd1915",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.6",
            "size": 58795,
            "upload_time": "2024-11-02T10:56:33",
            "upload_time_iso_8601": "2024-11-02T10:56:33.176867Z",
            "url": "https://files.pythonhosted.org/packages/8a/47/41d3b6c7fa97cf36ae9f6a560b321cc4787b39e393d031179840f79eca34/cyminhook-0.1.5-cp39-cp39-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0c68636540403f4ef340df74edd1b5457c82a7fa227f531b67388661d1116589",
                "md5": "f73791e30bdbe75289f3d1e820899121",
                "sha256": "52799fbd020e60b53444c098c79682d779f2f8e473daba5e8e08b06bd42be33a"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5-cp39-cp39-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "f73791e30bdbe75289f3d1e820899121",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.6",
            "size": 69402,
            "upload_time": "2024-11-02T10:56:34",
            "upload_time_iso_8601": "2024-11-02T10:56:34.408440Z",
            "url": "https://files.pythonhosted.org/packages/0c/68/636540403f4ef340df74edd1b5457c82a7fa227f531b67388661d1116589/cyminhook-0.1.5-cp39-cp39-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3d783d8f1505964f448c19bf0fc238a536d04e7dbcd28c050f464fb4d0e8f7db",
                "md5": "8a106cb6f2965a86d446c449f024465b",
                "sha256": "3764af8a1a256d0359d175324099c239b7783a75b8ec40da3264f26a7b59167f"
            },
            "downloads": -1,
            "filename": "cyminhook-0.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "8a106cb6f2965a86d446c449f024465b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 46835,
            "upload_time": "2024-11-02T10:56:35",
            "upload_time_iso_8601": "2024-11-02T10:56:35.465108Z",
            "url": "https://files.pythonhosted.org/packages/3d/78/3d8f1505964f448c19bf0fc238a536d04e7dbcd28c050f464fb4d0e8f7db/cyminhook-0.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-02 10:56:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "segevfiner",
    "github_project": "cyminhook",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cyminhook"
}
        
Elapsed time: 2.41482s