2 <!-- ***** BEGIN LICENSE BLOCK *****
3 - Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 - The contents of this file are subject to the Mozilla Public License Version
6 - 1.1 (the "License"); you may not use this file except in compliance with
7 - the License. You may obtain a copy of the License at
8 - http://www.mozilla.org/MPL/
10 - Software distributed under the License is distributed on an "AS IS" basis,
11 - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 - for the specific language governing rights and limitations under the
15 - The Original Code is the Netscape security libraries.
17 - The Initial Developer of the Original Code is
18 - Netscape Communications Corporation.
19 - Portions created by the Initial Developer are Copyright (C) 1994-2000
20 - the Initial Developer. All Rights Reserved.
24 - Alternatively, the contents of this file may be used under the terms of
25 - either the GNU General Public License Version 2 or later (the "GPL"), or
26 - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 - in which case the provisions of the GPL or the LGPL are applicable instead
28 - of those above. If you wish to allow use of your version of this file only
29 - under the terms of either the GPL or the LGPL, and not to allow others to
30 - use your version of this file under the terms of the MPL, indicate your
31 - decision by deleting the provisions above and replace them with the notice
32 - and other provisions required by the GPL or the LGPL. If you do not delete
33 - the provisions above, a recipient may use your version of this file under
34 - the terms of any one of the MPL, the GPL or the LGPL.
36 - ***** END LICENSE BLOCK ***** -->
38 <META HTTP-EQUIV=
"Content-Type" CONTENT=
"text/html; charset=iso-8859-1">
39 <META NAME=
"GENERATOR" CONTENT=
"Mozilla/4.05 [en] (WinNT; U) [Netscape]">
40 <META NAME=
"Author" CONTENT=
"Steve Parkinson">
41 <TITLE>SSLTap - manual
</TITLE>
46 SSLTap Manual page
</H1>
50 A command-line proxy which is SSL-aware. It snoops on TCP connections,
51 and displays the data going by, including SSL records and handshaking
52 if the connection is SSL.
55 <TT>ssltap [-vhfsxl] [-p port] hostname:port
</TT>
57 <P><TT> -v
[prints version string]
</TT>
58 <BR><TT> -h
[outputs hex instead
60 <BR><TT> -f
[turn on Fancy HTML
62 <BR><TT> -s
[turn on SSL decoding]
</TT>
63 <BR><TT> -x
[turn on extra SSL
65 <BR><TT> -p port [specify rendezvous port (default
1924)]
</TT>
66 <BR><TT> -l
[loop - continue
67 to wait for more connections]
</TT>
70 SSLTap opens a socket on a rendezvous port, and waits for an incoming connection
71 (client side). Once this connection arrives, SSLTap makes another connection
72 to hostname:port (server side). It passes any data sent by the client to
73 the server, and vice versa. However, SSLTap will also display the data
74 to the console. It can do this for plain HTTP connections, or any TCP protocol.
75 However, SSLTap can also work with SSL streams, as detailed below.
77 <P>Let's assume your development machine is called 'intercept'. The simplest
78 usage of SSLTap is to run the command
<TT>'ssltap www.netscape.com:
80'
</TT>
79 on intercept. The program will wait for an incoming connection on port
80 1924. Next you would want to go to your browser, and enter the URL http://intercept:
1924.
81 The page retrieved by the browser will actually be gotten from the server
82 at www.netscape.com, but will go via SSLTap.
84 <P>Data sent from the client to the server is surrounded by a '--> [ ]'
85 symbol, and data sent from the server to the client, a '
<---[
88 <P>You'll notice that the page retrieved with this example looks incomplete.
89 This is because SSLTap by default closes down after the first connection
90 is complete, so the browser is not able to load images. To make the SSLTap
91 continue to accept connections, switch on looping mode with the -l option.
93 <P>You can change the default rendezvous port to something else with the
96 <P>The remaining options change the way the output is produced.
98 <P>The -f option prints 'fancy' output - in colored HTML. Data sent from
99 the client to the server is in blue. The server's reply is in red. This
100 is designed so you can load the output up into a browser. When used with
101 looping mode, the different connections are separated with horizontal lines.
103 <P>-x will turn on HEX printing. Instead of being output as ascii, the
104 data is shown as Hex, like this:
105 <UL><TT><-- [
</TT>
106 <BR><TT> 0:
56 d5
16 3e
a1
6b b1
4a
8f
67 c4 d7
107 21 2f
6f dd
| V..
>.k.J.g..!/o.
</TT>
108 <BR><TT> 10: bb
22 c4
75 8c f4 ce
28 16 a6
20 aa
109 fb
9a
59 a1
| .
".u...(.. ...Y.</TT>
110 <BR><TT> 20: 51 91 14 d2 fc 9f a7 ea 4d 9c f7 3a
111 9d 83 62 4a | Q.......M..:..bJ</TT>
117 The following options deal with SSL connections.
118 <UL>-s will turn on SSL parsing. (SSLTap doesn't automatically detect SSL
120 <BR>-x will turn on extra SSL hexdumps. Mostly, if SSL can decode the data,
121 it doesn't display the hex.</UL>
122 The following SSL3 Data structures are parsed: Handshake, ClientHello,
123 ServerHello, CertificateChain, Certificate. In addition, SSL2 ClientHello,
124 ServerHello, ClientMasterKey are also partly parsed. NO DECRYPTION IS PERFORMED
125 ON THE DATA. SSLTAP CANNOT DECRYPT the data.
127 <P>If a certificate chain is detected, DER-encoded certificates will be
128 saved into files in the current directory called 'cert.0x' where x is the
129 sequence number of the certificate.
133 Often, you'll find that the server certificate does not get transferred,
134 or other parts of the handshake do not happen. This is because the browser
135 is taking advantage of session-id-reuse (using the handshake results from
136 a previous session). If you restart the browser, it'll clear the session
139 <P>If you run the ssltap on a different machine that the ssl server you're
140 trying to connect to, the browser will complain that the host name you're
141 trying to connect to is different to the certificate, but it will still
142 let you connect, after showing you a dialog.
145 Please contact <A HREF="mailto:ssltap-support@netscape.com
">ssltap-support@netscape.com</A>
149 2.1 - First public release (March 1998)
153 For reference, here is a table of some well-known port numbers: