Difference between revisions of "Socat"

From the Linux and Unix Users Group at Virginia Teck Wiki
Jump to: navigation, search
imported>Cov
imported>Cov
Line 1: Line 1:
 
Socat is a commandline network tool akin to [[netcat]]. It supports SSL, IPv6 and several more protocols. It can come in handy when attempting to sniff traffic that has to speak SSL because setting up a cleartext to SSL proxy is relatively straightforward.
 
Socat is a commandline network tool akin to [[netcat]]. It supports SSL, IPv6 and several more protocols. It can come in handy when attempting to sniff traffic that has to speak SSL because setting up a cleartext to SSL proxy is relatively straightforward.
 +
 +
=TCP to STDIN=
 +
To create a classic TCP listening daemon, similar to <code>netcat -l</code>, use a variation of the following command.
 +
<pre>
 +
$ socat TCP-LISTEN:8080 stdout
 +
</pre>
  
 
=Cleartext to SSL Tunnel for DyKnow=
 
=Cleartext to SSL Tunnel for DyKnow=
To create a plaintext to SSL proxy that [[DyKnow]] can connect to, use the following command.
+
To create a plaintext to SSL proxy that [[DyKnow]] can connect to, use a variant of the following command.
<pre>socat tcp4-listen:1337,fork openssl:dyknow.lt.vt.edu:443,cafile=ThawtePremiumServerCA.pem</pre>
+
<pre>
 +
$ socat tcp4-listen:1337,fork openssl:dyknow.lt.vt.edu:443,cafile=ThawtePremiumServerCA.pem
 +
</pre>
  
 
[[Category:*nix commandline software]]
 
[[Category:*nix commandline software]]
 +
[[Category:Howtos]]

Revision as of 01:50, 24 December 2009

Socat is a commandline network tool akin to netcat. It supports SSL, IPv6 and several more protocols. It can come in handy when attempting to sniff traffic that has to speak SSL because setting up a cleartext to SSL proxy is relatively straightforward.

TCP to STDIN

To create a classic TCP listening daemon, similar to netcat -l, use a variation of the following command.

$ socat TCP-LISTEN:8080 stdout

Cleartext to SSL Tunnel for DyKnow

To create a plaintext to SSL proxy that DyKnow can connect to, use a variant of the following command.

$ socat tcp4-listen:1337,fork openssl:dyknow.lt.vt.edu:443,cafile=ThawtePremiumServerCA.pem