Hacker News new | ask | show | jobs
by stevewatson301 1332 days ago
Depending on your version of nc, -c is for sending CRLFs or executing sent data as commands. You might be looking for ncat instead.
2 comments

In OpenBSD nc (as GP mentioned), -c is for a TLS connection: https://man.openbsd.org/nc.1
Reminder, there are many different netcats, here are some of the most commons:

- netcat-traditional http://www.stearns.org/nc/

- netcat-openbsd : https://github.com/openbsd/src/blob/master/usr.bin/nc/netcat... (also packaged in Debian)

- ncat https://nmap.org/ncat/

- netcat GNU: https://netcat.sourceforge.net/ (quite rare)

To prevent any confusion, I like to recommend socat: http://www.dest-unreach.org/socat/

My nc has that as -C, no -c option.