Monday, September 17, 2007

A program that uses execuv to print out the current date and time

//exe.c
#include
main()
{
char * argv[ ]={“bash”,”-c”,”/etc/passwd”,(char *)0};
char * envp[ ]={“PATH=/bin”,0}
execve(“/bin/bash”,argv,envp);
}

gcc -static -o exe exe.c
./exe