This file contains hidden or 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
/* Simple source code for a library to prevent apps being able to see if they're running under debug | |
* compile as follows: | |
* gcc -shared -fPIC blockdebugdetect.c -o blockdebugdetect.so | |
* then use LD_PRELOAD to override as follows: | |
* LD_PRELOAD=blockdebugdetect.so strace ./testDebug | |
*/ | |
long ptrace(int request, int pid, void *addr, void *data) | |
{ | |
/* Nope - we're definitely not running under a debugger mwaahahahahaa */ |