Skip to content

Instantly share code, notes, and snippets.

@toomanybananas
toomanybananas / hook.c
Created Apr 24, 2018
Shared library injection with the Witchcraft Compiler Collection
View hook.c
#define _GNU_SOURCE
#include <dlfcn.h>
int puts(const char* s)
{
int (*oputs)(const char*) = dlsym(RTLD_NEXT, "puts");
oputs("HOOKED!");
return oputs(s);
}
View keybase.md

Keybase proof

I hereby claim:

  • I am toomanybananas on github.
  • I am toomanybananas (https://keybase.io/toomanybananas) on keybase.
  • I have a public key ASAmNh_boOZDiPPO8I1vX9zW-90eaJaCBYG10LLPYyvsjQo

To claim this, I am signing this object: