Skip to content

A C++ hooking library for functions from Linux DSOs.

License

Notifications You must be signed in to change notification settings

AeroStun/DynDetour

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DynDetour

A C++ hooking library for functions from Linux DSOs.

Usage:

#include <detour.hxx>

int main() {
    using NewHook = Detour<void*(std::size_t), ::operator new>;
    
    // Enables the hook; the default tap is a trap
    NewHook::enable();
    
    // Set a custom tap, which takes the original function and the params
    std::size_t new_count{0U};
    NewHook::tap([&](auto original, const std::size_t arg){
        ++new_count;
        return original(arg);
    });
    
    // Erase the tap and replace it with a trap
    NewHook::trap();
    
    // Disables the hook
    NewHook::disable();
}

About

A C++ hooking library for functions from Linux DSOs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published