Comment 4 for bug 566377

Revision history for this message
Eri Ramos Bastos (bastos-eri) wrote :

I think you may be looking at the wrong version of Netcat:

$ which nc
/bin/nc
$ ls -ld /bin/nc
lrwxrwxrwx 1 root root 20 2010-05-17 21:34 /bin/nc -> /etc/alternatives/nc
$ ls -ld /etc/alternatives/nc
lrwxrwxrwx 1 root root 15 2010-05-17 21:34 /etc/alternatives/nc -> /bin/nc.openbsd

But you are actually looking for /bin/nc.traditional :

$ /bin/nc.openbsd -l -p 9999 -e /bin/bash
/bin/nc.openbsd: invalid option -- 'e'
usage: nc [-46DdhklnrStUuvzC] [-i interval] [-P proxy_username] [-p source_port]
   [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_protocol]
   [-x proxy_address[:port]] [hostname] [port[s]]
$ /bin/nc.traditional -l -p 9999 -e /bin/bash
^C
$

You can fix that by:

$ sudo rm /etc/alternatives/nc && sudo ln -s /bin/nc.traditional /etc/alternatives/nc