Last active
December 24, 2022 13:19
-
-
Save Silva97/1737e46bbd2f74802c6558f702b1c1ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _GNU_SOURCE | |
#include <dlfcn.h> | |
typedef int (*puts_t)(const char *); | |
int puts(const char *string) | |
{ | |
puts_t original_puts = dlsym(RTLD_NEXT, "puts"); | |
original_puts("-- Hookado --"); | |
return original_puts(string); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment