OverTheWire.org
Hacker Community
Want to help out OverTheWire ?
Volunteer ? Donate ?
Click here!
Discuss this level on the forum

Level 2

Level Goal:
Create a special tar file
Helpful Reading Material
GNU tar manual
Code listing (level2.c)
 1 #include <stdlib.h>
 2 #include <stdio.h>
 3 #include <sys/types.h>
 4 
 5 
 6 int main(int argc, char **argv)
 7 {
 8         char *args[] = { "/bin/tar", "cf", "/tmp/ownership.$$.tar", argv[1], argv[2], argv[3] };
 9         execv(args[0], args);
10 }