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.

29 lines
736 B

5 years ago
# shithook
5 years ago
5 years ago
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.
```cpp
5 years ago
hook::install(
&WriteFile, //address to put inline hook at.
&HookWriteFile //address to jmp too.
5 years ago
);
```
Disabling the hook so you can call the original function.
```cpp
5 years ago
hook::disable(&WriteFile);
5 years ago
WriteFile(.....)
5 years ago
```
Enabling the hook.
```
5 years ago
hook::enable(&WriteFile);
5 years ago
```
# info
5 years ago
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
5 years ago
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!