sclient: a cross-platform tool to unwrap TLS as plain text.
https://github.com/therootcompany/sclient| Installer Source| Releases (json) (tab)
sclient: a cross-platform tool to unwrap TLS as plain text.
https://github.com/therootcompany/sclient| Installer Source| Releases (json) (tab)
To update or switch versions, run webi sclient@stable
.
These are the files / directories that are created and/or modified with this install:
~/.config/envman/PATH.env
~/.local/bin/sclient
sclient unwraps encrypted connections (HTTPS/TLS/SSL) so that you can work with them as as plain text (or binary). Great for debugging web services, and security research.
Think of it like netcat (or socat) + openssl s_client.
You can literally use this on example.com:
sclient example.com:443 localhost:3000
To use it with an http client, just set the Host header to the original domain:
curl -H "Host: example.com" http://localhost:3000
<!doctype html>
<html>
<body>
<h1>Example Domain</h1>
This domain is for use in illustrative examples in documents. You may use
this domain in literature without prior coordination or asking for
permission.
<a href="https://www.iana.org/domains/example">More information...</a>
</body>
</html>
SSH can be tunneled within HTTPS, TLS, SSL, WebSockets, etc.
ssh -o ProxyCommand="sclient --alpn ssh %h" jon.telebit.io
This is useful to be able to connect to SSH even from behind a corporate packet-inspection firewall. It can also be used to multiplex and relay multiple ssh connections through a single host.
sclient example.com:443 localhost:3000
telnet localhost 3000
sclient --alpn smtp smtp.gmail.com:465 localhost:2525
telnet localhost 2525
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 smtp.gmail.com ESMTP c79-v6sm37968282pfb.147 - gsmtp
sclient whatever.com -
Use just like netcat or telnet. A manual HTTP request, for example:
> GET / HTTP/1.1
> Host: whatever.com
> Connection: close
>
printf "GET / HTTP/1.1\r\nHost: telebit.cloud\r\n\r\n" | sclient telebit.cloud
Sometimes you want to check to see if your site is vulnerable to SNI-spoofing attacks, such as Domain Fronting.
The literal domains example.net
and example.com
are actually vulnerable to
SNI spoofing:
sclient --servername example.net example.com:443 localhost:3000
curl -H "example.com" http://localhost:3000
Most domains, however, are not:
sclient --servername google.net google.com:443 localhost:3000
curl -H "google.com" http://localhost:3000