Imo there’s some very important info missing from the article:
For file transfers, OpenBSD netcat will just keep on running after the transfer completes by default. You need to pass additional arguments to make it exit when done: -N on the sender side (shutdown socket after EOF in stdin) and -d on the receiver side (close stdin immediately).
Considering it rounds up a bunch of different, incompatible netcats (including one from 2004), I was surprised that socat didn’t get a mention.
socat’s system of address types is much more intuitive to me than netcat’s array of unix-style arguments
socat stdio tcp-listen:3000
just makes more sense thannetcat -l -p 3000
Probably because socat is awesome, but it fundamentally isn’t netcat? :)
Imo there’s some very important info missing from the article: For file transfers, OpenBSD netcat will just keep on running after the transfer completes by default. You need to pass additional arguments to make it exit when done: -N on the sender side (shutdown socket after EOF in stdin) and -d on the receiver side (close stdin immediately).
Learning that
ncat
supports TLS was really useful. I’ve wondered how to set that up several times and just decided not to bother in the past.