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
/* exec-notify, so you can watch your acrobat reader or vim executing "bash -c" | |
* commands ;-) | |
* Requires some 2.6.x Linux kernel with proc connector enabled. | |
* | |
* $ cc -Wall -ansi -pedantic -std=c99 exec-notify.c | |
* | |
* (C) 2007-2010 Sebastian Krahmer <[email protected]> original netlink handling | |
* stolen from an proc-connector example, copyright folows: | |
*/ | |
/* |
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
/* | |
* Hook main() using LD_PRELOAD, because why not? | |
* Obviously, this code is not portable. Use at your own risk. | |
* | |
* Compile using 'gcc hax.c -o hax.so -fPIC -shared -ldl' | |
* Then run your program as 'LD_PRELOAD=$PWD/hax.so ./a.out' | |
*/ | |
#define _GNU_SOURCE | |
#include <stdio.h> |