diff -urN netcat/netcat.c netcat-new/netcat.c --- netcat/netcat.c 2016-05-08 15:18:22.142672910 +0800 +++ netcat-new/netcat.c 2016-05-08 15:26:40.255993073 +0800 @@ -2314,8 +2314,11 @@ holler ("%s [%s] %d (%s) open", whereto->name, whereto->addrs[0], curport, portpoop->name); #ifdef GAPING_SECURITY_HOLE - if (pr00gie) /* exec is valid for outbound, too */ - doexec (netfd); + if (pr00gie) /* -c or -e given? */ + if (doexec_use_sh) /* -c */ + doexec_new (netfd); + else /* -e */ + doexec (netfd); #endif /* GAPING_SECURITY_HOLE */ if (! o_zero) x = readwrite (netfd); /* go shovel shit */