/ Published in: C
To execute external programs you should avoid functions like system() or popen() since they can be affected by the shell environment variables which issues serious security concerns. Instead, use execve().
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#include <unistd.h> int main(int argc,char **argv){ execve("/bin/ls", &argv[0], NULL); return 0; }