sherief / spud

just some stuff to do hooking/detour things

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License: MIT GitHub Actions

spud - multi-architecture cross-platform hooking library.

Features

  • x86-64 and arm64 support
  • Windows, Mac and Linux support

Building

With CMake (as a subproject)

Clone repository to subfolder and link spud to your project:

add_subdirectory(path/to/spud)
target_link_libraries(your-project-name PRIVATE spud)

Examples

  • Simple example
void test_function(int n);
decltype(test_function) *o_test_function = nullptr;

SPUD_NO_INLINE void test_function(int n) {
    if (n == 0) {
        condition_intact_for_hook = true;
        return;
    }
}

o_test_function = SPUD_STATIC_DETOUR(test_function, hook);

Build & Install

spud can be easily added to any cmake-based project. Just add a few lines in CMakeLists.txt.

Missing features

  • No documentation (yet)
  • Easy way to patch VTables
  • A lot more stuff

References

License

  • MIT

About

just some stuff to do hooking/detour things


Languages

Language:C++ 91.5%Language:CMake 5.4%Language:Assembly 1.7%Language:C 1.1%Language:Shell 0.2%