Hook functions on Windows using MinHook
Project description
Hook functions on Windows using MinHook.
Quick Start:
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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cyminhook-0.1.2.tar.gz
(45.2 kB
view hashes)
Built Distributions
Close
Hashes for cyminhook-0.1.2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f9c013145d17584000b2a8c103db59cd7dd93e92a77a81b87e20e999f8fb0ce |
|
MD5 | 3cac55ced2cf72e5e1e842e61462e356 |
|
BLAKE2b-256 | 984fd6fd70898f44578b2edb4ee32f8d75a00d36dcbcca8b9a9dfe63dce28fd0 |
Close
Hashes for cyminhook-0.1.2-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d56b8e7958ae058be4727a5b07c248501dac08eb874ba9d8808419954ee30489 |
|
MD5 | 359dcfad53cebda23cc0a5339802bc3c |
|
BLAKE2b-256 | 8025f9befd4b015084d18702d0e04f3bbdddbc166298d6ec7f512a6adca711b7 |
Close
Hashes for cyminhook-0.1.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9aed6f043de1b077c7feb5893ca63e3a0a90ead28214a4360ebc9fddeea5f68b |
|
MD5 | afbf9f4e38f42340829395e3b307d277 |
|
BLAKE2b-256 | 13d0b22964d295b2b4ccd319383decefd5549009c17ff33448a75c578d80088a |
Close
Hashes for cyminhook-0.1.2-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbc3bc35b6ad29b5a8d5da0ebe5308b0050d3512f26b0932816d0f4edd3fa68c |
|
MD5 | ec4e0551bbf9cf5c2ace1ca793bc01d4 |
|
BLAKE2b-256 | cfc160e3a3b10d12e1543b3862f0327395015e318343fe3c0fc47a62b66edf8e |
Close
Hashes for cyminhook-0.1.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9de992754a1620e687422fe95f949fbb78eb4f23f0f46a73845e812577e5483a |
|
MD5 | feec2b85a1dea3b7afd0bbd6d495c9b8 |
|
BLAKE2b-256 | 48d7b31193e11f574d0455a5c2e927ff30c20de7b84b959560277a7a81ab0150 |
Close
Hashes for cyminhook-0.1.2-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f153d6ce7d40f282893d45ce7502b6e9dea0bb48292d5437d473e803c2b5ed4c |
|
MD5 | 943b00085a69c38660a84736ef89b28e |
|
BLAKE2b-256 | 6224d75fd51ade23c2da61449470b05eda336231e2eb22e45ab847fc9b5c9830 |
Close
Hashes for cyminhook-0.1.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 657f81fe5daa22d43b785c156d16468e4e5a2b7c53722809503a01129234fa31 |
|
MD5 | e83f322e7506d3e85ccc0168a28edb75 |
|
BLAKE2b-256 | 40dbc6785edb61b7fa32082c0e314fef0b66e51927e13c31dc64a8137f0e8d5a |
Close
Hashes for cyminhook-0.1.2-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b414a157c687db7417d45e0cb0f1cbcfaabe0e409d26e361d4a3f6d6b407e327 |
|
MD5 | 8c260fc725fc73b0900e5070cf7c28d2 |
|
BLAKE2b-256 | e3b5f85055e771549eba690325d857a9fe1c89020bfa14323bba51ffc26622fc |
Close
Hashes for cyminhook-0.1.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de5e46595c7fa114ae6c7df5ca202e385f6d2df4f7f5793b8984844e9b1d24d4 |
|
MD5 | 6f535705b79bba1d32f245a7755cfffe |
|
BLAKE2b-256 | 7f7fd6eb5e4ed7753aeee0d102f1fe132bd5e36b1e10108dfaddec2962bc4a8a |
Close
Hashes for cyminhook-0.1.2-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 034842ecdfd4c14bef484f8f13e80d4d48b2d0b762af9df1d046883c2ddd7665 |
|
MD5 | ab9e1a6606a491aeb22a4c4d1ce4f25a |
|
BLAKE2b-256 | f60c91bc27feb1b80ca08d7dc38c9bba05e1a6a003e2cfad229753494b84826e |
Close
Hashes for cyminhook-0.1.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c86654863dbc492796402127a6d0d1a7d8becc5bf4ca008cc8fe2e3a40354ae1 |
|
MD5 | b98a090f3ceacf173203f9889d0ea5c5 |
|
BLAKE2b-256 | c8b93a672c3f588e6676410cd83954a5fbc80bd826aa7d2091d9b8cba3c8514e |
Close
Hashes for cyminhook-0.1.2-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4353259a549dbdcf303ac832b1169753190405feb5e339c1bea581ae63342a35 |
|
MD5 | ca6619a8f5e7123a6193159358cd7728 |
|
BLAKE2b-256 | fd2d9ed90c9e9b6e09c5b3451b4b0b2bf64b8300418137dbdf11cf363b83f884 |