Manipulation of HTTPS method in telnet

0

I have a problem properly creating a GET request and send in telnet. Generally I want to send something like this:

telent www.example.com 443(Press enter)

Then:

GET / HTTP/1.1 (here i try to go to new line)
Host:www.example.com

But I do not know how to change new line. When I press enter after the GET line the connection is closed. How can I go to the new line from Linux command-line?

tawariszDrug123

Posted 2015-06-05T12:04:41.390

Reputation:

Are you sure you're actually connecting to a web server? The command line you've specified will take you to port 23, the telnet port, by default. Try telnet www.example.com 80<enter> instead. – gowenfawr – 2015-06-05T12:09:54.250

Also, when doing basic testing, try a 1.0 request first which won't require multiple headers - just GET / HTTP/1.0<enter><enter> is a valid request, because 1.0 doesn't require a Host header. – gowenfawr – 2015-06-05T12:14:20.033

3You cannot talk plain text to a SSL connection (port 443 is usually HTTPS). Use openssl s_client for this. – Steffen Ullrich – 2015-06-05T12:27:05.650

OK, you are right. When I change port on 80 it's works. So to use GET command with ssl i chould use openssl c_cilent? – None – 2015-06-05T12:30:06.957

I asked about it beacuse my scanner return sth like this (checking appache chunked vulnerability): telnet <site> 443POST /x.html HTTP/1.1Host: <site>Transfer-Encoding: chunkedc00000000 – None – 2015-06-05T12:39:04.123

I don't think this is a good question for Security. Superuser will be the place for it. – ThoriumBR – 2015-06-05T12:40:15.840

What are you really trying to do? Are you executing some exploit against some server? What scanner are you using? Give details please. – ρss – 2015-06-05T14:25:55.380

"...So to use GET command with ssl i chould use openssl c_cilent?..." - Yes, that's what I said and what you should do. – Steffen Ullrich – 2015-06-05T15:18:53.560

Answers

0

I noticed you're trying to connect to port 443.

This won't work with telnet as you need to set up TLS (443 is HTTPS, not HTTP), which you can't do with telnet.

For testing, while it won't be interactive like telnet, you can use openssl or gnutls.

LawrenceC

Posted 2015-06-05T12:04:41.390

Reputation: 63 487