System: Emulating an HTTP/1.1 Request using TelnetIt's actually very simple using Telnet to connect to a webserver and download HTML or other files. First you need to connect to the server using an IP address or hostname: $ telnet XXX.XX.XX.XXX 80
Then request the page you want. HEAD and GET are the most common options. HEAD will return information about the requested file/page, but not the content. GET will retrieve both the Header information as well as the content, terminated with 0. Following the HEAD/GET command you need to specify HTTP/1.1. Then on the next line specify the Host domain name. HTTP/1.1 allows for multiple domains to be hosted at a single IP address so this is important. The User-Agent and other options can be specified on subsequent lines. GET / HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)
The command is executed after a blank line is entered. Working ExampleEnter an IP address, Hostname and Request URI in the form below and it will make a HEAD request to the server in question and display the results: Note: For security we've limited the inputs to this script. Only valid IPv4 IP addresses are accepted for the Server IP. The Hostname field accepts letters, numbers, hyphens and periods. The Request field also accepts the forward slash, and must (obviously) start with one. Related ArticlesReferencesSend Feedback |
|
|
© Copyright 2010 Chirp Internet
- Page Last Modified: 22 November 2009
|
|