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.3.tar.gz
(46.7 kB
view hashes)
Built Distributions
Close
Hashes for cyminhook-0.1.3-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24f2e1bf9a906b7905b88a8989239c0c3665f80bc457ae795752f54430025115 |
|
MD5 | 546d5021bf7cb433ed23b56a71949739 |
|
BLAKE2b-256 | 9d337654256915b3a1aaa108bd09eed941b3507c1b3e1191553f597e671d3b9d |
Close
Hashes for cyminhook-0.1.3-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18da13775069aff59a6cf93064f737cc80095ab7b001e6643ccf8272be8d0a4e |
|
MD5 | d98ce5075f775811d1f8b6fa7dd6e94f |
|
BLAKE2b-256 | 45e94d74d36d5a2db8991670cc5ea87debcb10233f17c10abfe4763d770429ca |
Close
Hashes for cyminhook-0.1.3-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73b87b1da973f8d55de37b3ed2012639e98860af604cc79dd70bac6d53a9a075 |
|
MD5 | d5414d0cf484e388e8a75e406e760b93 |
|
BLAKE2b-256 | 22689f49bbecc542e59b53847be41dc9d2303ea7a2f8918d3e412024d45abfbe |
Close
Hashes for cyminhook-0.1.3-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85a7431395e5ec2b28a6562a57b0b07a560d41ff4dd53f8882292dc810bc530c |
|
MD5 | d397dd37d571bcf03c7ece9e9fa58d7a |
|
BLAKE2b-256 | 1fe6e0e9318e278611d4891f9a853756bb88c2a918a45ab3190e4e3b92ecd43a |
Close
Hashes for cyminhook-0.1.3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0383a00ddd2d114c7aadbe6795b3986e0886f41b7a25efdd2ccb95803bdebfe0 |
|
MD5 | 527331e106847a38342214685c4cd80a |
|
BLAKE2b-256 | 351ebfe7b2dd52414db80ed03ea85571a6695b3b9c7cde63d31974fe45d0fa28 |
Close
Hashes for cyminhook-0.1.3-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 657bdefe2f01138844c98a4549a3b8ba1d14e66760fdd18a8e90a990d2d0dea8 |
|
MD5 | 86cc11f8f0fd0245219714d9479717da |
|
BLAKE2b-256 | a9d5ccf8a9b49d230a2f75e32652565b387e87d917eb786d6b289ef308d2b0af |
Close
Hashes for cyminhook-0.1.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13b3e727446dd2f6b38f0bdbfacdcb29e32d3ec763fc6c5b88ac83978eb5e530 |
|
MD5 | f1ed0e7e35e8707923baacb911d5d5b2 |
|
BLAKE2b-256 | a3c06df9fe7720d44fc4e25fad584d4151ea9c047951c9e510de0c1947c828d9 |
Close
Hashes for cyminhook-0.1.3-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ffe255924e91a3106ed0d15560c602c8b091ae03f45ba6585136e79df3762d2 |
|
MD5 | 521126028989ceb8c8ec76f06566a478 |
|
BLAKE2b-256 | 14026353c9546c8310491d19db4ca4158b8548aac1d023cd8518b06daec7092c |
Close
Hashes for cyminhook-0.1.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eee4847afdacb87525dc00f8d5550aeba3362da0fed5e188a17950b0112e5f91 |
|
MD5 | 45e6a4ae58cef6af3fe2d78abcce33b3 |
|
BLAKE2b-256 | f0cefbb9230c5830249fcf9b5198812b0ebd80d6efeb7d3dc643caf16cdf817b |
Close
Hashes for cyminhook-0.1.3-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28c042b0a4874aedecd80bb362ef3752f06a09badc0f33c26b45e953e49c4fd2 |
|
MD5 | 29b67fe24a7a1b11056fcabca6921a84 |
|
BLAKE2b-256 | 39f4ae82056b175298a2958a51290852f1ae5b0a6b9648e9ed4a7ce2c80e35d6 |
Close
Hashes for cyminhook-0.1.3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5371f5faa7ccb8d5d6f3694519150644437fdc2945bcd2b071e103e785c1a2a7 |
|
MD5 | 97c3661c371db3b63025d38a8527f987 |
|
BLAKE2b-256 | a63c72edc3b821533f4f17ed7e6edec739c44f2ef6a9dd3e1e9176460a34927b |
Close
Hashes for cyminhook-0.1.3-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ddd4f46013e0553c28afcec18fbb9211fc8281232a8fe31610c3e6f150237e7 |
|
MD5 | 542fdf997929e2813259700e13710802 |
|
BLAKE2b-256 | 342ca901aa9cfec169926e3672b9ca91940bac2f2c7bab20dac7f5d6290f999c |
Close
Hashes for cyminhook-0.1.3-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | baf3de535d1399f0fe70dc85fce2e1d66282c7c0dbff88f2d13513c769c341a9 |
|
MD5 | 2c9cab02174c7d770e87ef7eced6a987 |
|
BLAKE2b-256 | 9d669e39412ecd2c9669593e6ab69c0db18f7b8a4e54d4777ad24f7e6092cd2a |
Close
Hashes for cyminhook-0.1.3-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c670bb058bb9cf3c392677d0283e172ef0770892b590103f3a98720a151cac1a |
|
MD5 | 4722cf532dd91edf7b40ce6646f6b457 |
|
BLAKE2b-256 | 00a5c69363c6052baba0cc584cd16112351aca5ab0e647ff80b8ddfc85bd9be3 |