Would it be possible to use TLS? Instead of `stty raw -echo; (stty size; cat) | nc -lvnp 3001` use `stty raw -echo; (stty size; cat) | openssl s_server -quiet -key key.pem -cert cert.pem -port 3001` on the other side. (You will have to generate a key and a certificate beforehand with `openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes` once.)
I am working on a script, that can catch reverse shells from Linux (plaintext and openssl) and upgrade them automatically. I want to extend it to Windows and found this very nice shell. For `nc` this should be easy for me to adapt. But secure transport would require ConPtyShell to use a TLS connection. Can you implement this?
it would be a nice feature to add as an optional argument.
It should be possible to do with something like in this example https://docs.microsoft.com/en-us/dotnet/api/system.net.security.sslstream?view=netframework-2.0
I will add it in a future release. If you would like to try, PR are welcome :D