What's the difference between the two? I want to execute the netcat command like so:
Code:
nc -l -p 1234 -e /bin/sh
Is it better to use execv or execve and what would the C code look like using it?

I tried this but got an invalid initializer
Code:
char *args[] = ("nc","-l","-p 1234", "-e /bin/sh", (char *) 0);
execv("nc",args);
Thanks