NOTE: You can use the Windows (DOS) telnet program for
these, although you can also get and install securecrt from :
http://www.vandyke.com/products/securecrt/.
You need to talk to a web server using only the telnet program.
You will need to be able to compose an HTTP query in order to present the server
with a valid request. A quick example is described below, followed by a number
of specific tasks you must complete.
Start up the telnet program (start menu - select "run" and type in "telnet").
In the telnet program window select the "Connect" menu and click on "remote system". You will get a dialog that allows you to specify a hostname and a port number. Pick any web server you like as the host name (or just use www.cs.rpi.edu) and enter the port number as 80. Now press "connect".
If everything works, you now have a TCP
connection to an HTTP server. The server is waiting for a request in the
form specified above. Type in to the telnet program window the following
request line:
GET / HTTP/1.0followed by the Enter key twice. The first Enter ends the first line and the second Enter sends a blank line that tells the server there are no request header lines coming.
You should get back an HTTP response including a status line and some headers. If the response is too large to fit in to the telnet window you can use the "Terminal" menu to set the buffer size (number of lines saved) in the "Preferences" section. You can also save an entire telnet session to a file by selecting "start logging" from the Terminal menu before you type anything in to the window.
Now that you are an expert - you need to do the following (and make sure the TA knows you've done these):
Find out what an error response looks like by asking for a resource that does not exist. (A "resource" is what is specified by the URI)
Find out what kind of web server you are
talking to by looking for the response header "Server:".
Write down the complete Server: response header.
Find out how large the resource named "/" is on the server running on host www.yahoo.com. This size of the content of a resource is provided by the server as a header (you have to figure out which one).
eiw@cs.rpi.edu
from fox@fbi.org. Establish a TCP connection to an SMTP
server (mail.rpi.edu port 25)
using the telnet program.
Send an email message to your email address, then check your mail and see what it looks like. Check the message headers ! (Can you be traced?)
To receive credit for this exercise you
must now send mail (using telnet) to eiw@cs.rpi.edu from
fox@xfiles.fbi.org (or any obviously fake name).
Put your name and email address in the
message content (so you get credit for the exercise!).
I suggest that you send the mail to both eiw@cs.rpi.edu
and to your email address so you can verify that the message went through.
To specify multiple recipients you
must enter multiple RCPT TO: commands
in the SMTP conversation - one right after the other.
eiw@cs.rpi.edu, you do not need to show Dave or
the TA your telnet session. All emails must be received by the next
class meeting to get credit.