author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
Thu, 22 Oct 2015 20:19:27 +0100 | |
changeset 420 | c527a5142f2f |
parent 221 | ae6074cc446a |
permissions | -rw-r--r-- |
221
ae6074cc446a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1 |
#include <stdio.h> |
ae6074cc446a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
2 |
|
ae6074cc446a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3 |
int main() |
ae6074cc446a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
4 |
{ char *name[2]; |
ae6074cc446a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
5 |
name[0] = "/bin/sh"; |
ae6074cc446a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
6 |
name[1] = NULL; |
ae6074cc446a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
7 |
execve(name[0], name, NULL); |
ae6074cc446a
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
8 |
} |