Skip to content

Instantly share code, notes, and snippets.

@dmwit
Created January 23, 2019 18:01
Show Gist options
  • Save dmwit/46258e6238112eb049b3c8f2bb7ae378 to your computer and use it in GitHub Desktop.
Save dmwit/46258e6238112eb049b3c8f2bb7ae378 to your computer and use it in GitHub Desktop.
how to masquerade as somebody else
#include <unistd.h>
int main() {
char *args[3] = {"notsleep", "10", NULL};
return execv("/usr/bin/sleep", args);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment