karasu is a user on bsd.network. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
karasu @karasu

TIL: The s_client treats any line starting with a capital R as a special "connected command" for renegotiating the session. Took us a while to understand why the installation we were testing renegotiated every time I entered the RCPT TO:<...> line... 😑

· Web · 7 · 8

@mulander In this case the port required the use of STARTTLS, which I think isn't supported by nc(1), but otherwise 's netcat is an awesome tool for this purpose.
Come to think of it, it would probably be nice to have something like the '-s' option in gnutls-cli for this purpose.

@karasu @mulander
btw. isn't socat an even more awesome tool?

@Wolf480pl socat is for sure nice and has some extremely useful features, but - at least for me - netcat is sufficient most of the time and doesn't require any manpage lookups. ;-)
Both netcat and libre/openssl are installed as part of the default images of most systems. Finding socat preinstalled is pretty rare in comparison.

@karasu dunno, I only remember netcat's -l option, and often need man to tell if it's `-p port` or just `port` (gnu vs bsd netcat).

Also, on most (GNU+)Linux distros I use, there's no concept of "base system" or "preinstalled software". And even if there is a similar concept, it usually doesn't contain netcat (or even dig).