You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xerox
2013335c63
|
5 years ago | |
---|---|---|
Hook.cpp | 5 years ago | |
Hook.hpp | 5 years ago | |
README.md | 5 years ago | |
main.cpp | 5 years ago |
README.md
shithook
An inline hooking library for windows. I had issues with other public hooking libraries so I made my own stinker.
usage
Installing the hook/Init.
Hook::Install(
(uintptr_t) &WriteFile, //address to put inline hook at.
(uintptr_t) &HookWriteFile //address to jmp too.
);
Disabling the hook so you can call the original function.
Hook::Disable((uintptr_t)&WriteFile);
WriteFile(.....)
Enabling the hook.
Hook::Enable((uintptr_t)&WriteFile);
info
All hooks are stored inside of a std::map<uintptr_t, std::unique_ptr<Detour>>
for quick and easy access to each object. All functions
interacting with this vector will use the address of the inline hook as the key so mak sure the address is easy to access in your code!