So lets say that you want to get a 200 request from a website such as: Sports.yahoo.com. How would you go about accomplishing that? What about Sports.Yahoo.com/NFL
The structure of the telnet request is:
telnet urlthatyouwanttoaccess.com portnumber (press enter)
GET (space) HTTP/1.1
- telnet is the command, this is separated by a single space.
- Then the URL of the site that you are making the telnet request to.
- Followed by the port number, in most cases a website would be port 80.
- Once you press Enter, you will put the request type.
- In this instance GET (note the caps) then the request protocol HTTP/1.0 or 1.1. Then press Enter.
- To finish the request type | host: URLyouwanttoaccess.com and select Enter.
NOTE: If you want to output the request into a text file, you can use: telnet urlthatyouwanttoaccess.com 80 > telnetoutput.txt | This will place the output of the request into a text file in the current directory.