Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to telnet google using command prompt?

Tags:

telnet

This is what I tried

telnet www.google.com 80

Get   HTTP/1.1  Host:www.google.com 

This I what I receive back

HTTP/1.0 400 Bad Request
Content-Type: text/html; charset=UTF-8
Content-Length: 925
Date: Sat, 24 Nov 2012 19:37:42 GMT
Server: GFE/2.0

How do I make this work? I trying to use telnet to access www.google.com

like image 584
developer747 Avatar asked Nov 24 '12 19:11

developer747


2 Answers

After issuing the request:

GET / HTTP/1.1

you also need input an empty line to show that your request has ended, otherwise, nothing will be returned.

Reference: http://blog.nullspace.io/day-208.html

like image 125
DiveInto Avatar answered Sep 27 '22 18:09

DiveInto


$ telnet www.google.com 80
Trying 173.194.38.82...
Connected to www.google.com.
Escape character is '^]'.
GET / HTTP/1.1

HTTP/1.1 302 Found
Location: http://www.google.co.jp/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
[.... skipped ....]
like image 45
lenik Avatar answered Sep 27 '22 18:09

lenik