A c++ header only library for inline hooking. Supports x86_64, x86, and arm. Small, simple, and easily detected :)
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 54fc0c6750
Update README.md
4 years ago
README.md Update README.md 4 years ago
hook.cpp made things lower_case to fit in with the rest of the code :) 4 years ago
hook.hpp Update Hook.hpp 4 years ago
main.cpp Update main.cpp 4 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(
    &WriteFile,     //address to put inline hook at.
    &HookWriteFile  //address to jmp too.
);

Disabling the hook so you can call the original function.

 hook::disable(&WriteFile);
 WriteFile(.....)

Enabling the hook.

hook::enable(&WriteFile);

info

All hooks are stored inside of a std::map<std::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 make sure the address is easy to access in your code!

Keep in mind that this is an inline hooking library so you will need to uninstall the hook to call the actual function. Dont forget to reinstall your hooks!