Skip to content

Instantly share code, notes, and snippets.

@ajungren
ajungren / toggle-dumpable.c
Created October 29, 2013 15:01
Toggle the PR_GET_DUMPABLE flag
#include <stdio.h>
#include <sys/prctl.h>
int main(int argc, char **argv) {
int dumpable;
while(1) {
dumpable = prctl(PR_GET_DUMPABLE);
printf("The process currently %s dumpable. Press any key to %s dumping.", dumpable ? "is" : "isn't", dumpable ? "disable" : "enable");
getchar();

Keybase proof

I hereby claim:

  • I am ajungren on github.
  • I am ajungren (https://keybase.io/ajungren) on keybase.
  • I have a public key ASAnaVUmOQpqTPZSROPkwH6vRU4sHD1kiuL-JkrtTDaSSAo

To claim this, I am signing this object: