3 ms·
no mention of socat?
by sigmonsays 5y ago
no mention of socat?
- cowmix 5y agoYeah, socat is my go-to for tcp socket scripting.
- jaytaylor 5y agoDon't forget the venerable websocat for testing and scripting websockets! https://github.com/vi/websocat https://github.com/vi/websocat Such a useful tool when the need arises, lifesaver.
- linsomniac 5y agoIndeed. 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.
- btschaegg 5y agoThis. So much this. I mean, netcat as a tool still isn't as known as it deserves to be (at least in the circles I frequent), but socat deserves it even more. Along with a few other unix-y tools (sponge, for example), I really cannot understand why it isn't pre-installed everywhere.