How to telnet google using command prompt?

前端 未结 2 829
不思量自难忘°
不思量自难忘° 2021-02-14 14:07

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         


        
相关标签:
2条回答
  • 2021-02-14 14:21

    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

    0 讨论(0)
  • 2021-02-14 14:23
    $ 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 ....]
    
    0 讨论(0)
提交回复
热议问题