3 ms·
Indeed. Nor any mention of the busybox netcat. busybox, a great program, but something about it's netcat will hang at the end of sending data, rather than clo
by linsomniac 5y ago
Indeed. Nor any mention of the busybox netcat.
busybox, a great program, but something about it's netcat will hang at the end of sending data, rather than closing the socket and exiting. Because of that I have to ^C it, and then wonder if it fully sent the last block of data.
For decades now I've used minimal rescue environments and "netcat" to copy data around. A lot of these rescue environments, especially 20 years ago, were pretty minimal. I liked being able to use the RedHat or Fedora install media as rescue, because I always had it handy.
So I fell back to this habit of, I know Python is on this system (RedHat installer), so I made a few versions of a python "netcat" program. A bigger one with more features, in case I was able to "wget" a file. Or smaller "in" and "out" programs that I could comfortably type in by hand.
But I really need to get into the habit of using socat now. I had it in mind that it's hard to remember how to use, so I'd just wget my python version and be done with it. But I need to get in the habit. socat is SO powerful.
Beware, Ubuntu 20.04 has version with a bug in TLS-based "file copy" socat usage. https://bugs.launchpad.net/ubuntu/+source/socat/+bug/1936407 https://bugs.launchpad.net/ubuntu/+source/socat/+bug/1936407
Simple fix is to just "dpkg -i" the 18.04 or 21.04 .deb file, there don't seem to be any strange dependencies.