2012-11-24 24 views
7

這是我試過如何使用命令提示符遠程登錄Google?

telnet www.google.com 80 

Get HTTP/1.1 Host:www.google.com 

這我什麼,我收到回

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 

如何使這項工作?我試圖用Telnet訪問www.google.com

+0

https://stackoverflow.com/questions/13544857/how-to-telnet-google-using-command-prompt – Bitch

回答

9
$ 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

好像它是工作。返回消息在命令提示符下被截斷,我如何查看整個事件? – developer747

+0

@ developer747您應該將'Host:www.google.com'放在單獨的行上。我可以看到整個頁面,從<!doctype html>開始,結束於'',之間有一堆腳本代碼。 – lenik