A little brain issue prevented me from remembering how to connect to a HTTPS service on the command line. NetCat doesnt seems to work, it just hangs.
Fortunately after wasting sometime i recalled how to do it in not one but 2 ways:
Option 1 : ncat (part of the nmap tool kit)

1
2
3
4
5
6
7
8
9
10
11
12
13
root@bt:~# ncat --ssl www.phillips321.co.uk 443
OPTIONS / HTTP/1.1
Host:www.phillips321.co.uk

HTTP/1.1 200 OK
Date: Tue, 17 Jan 2012 15:24:24 GMT
Server: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/1.0.0d PHP/5.3.6
X-Powered-By: PHP/5.3.6
Vary: Accept-Encoding,Cookie
Cache-Control: max-age=3, must-revalidate
WP-Super-Cache: Served supercache file from PHP
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

Option 2 : openssl (part of the openssl tools)

1
openssl s_client -connect www.phillips321.co.uk:443

Be warned though, using the openssl was will echo out all the certificate details….

Leave a Reply