Quote Originally Posted by jcafaro10 View Post
So passing NULL to execve's environment it's the same thing as passing execv then?

Also how do I correctly send the netcat command with arguments?
See the manpages of execv() and execve() which should it clear and those parenthesis should really be curly brackets.
First argument to execv() should be the full path to netcat command, as in
Code:
char *args[] = {"nc","-l","-p 1234", "-e /bin/sh", (char *) 0};
execv("/full/path/to/nc", args);