socket.gethostbyname('example.com')
and time.time()
are your friends and so is Google. Use the script to test the DNS response time for the website hostnames of a mix organizations. Try major brands vs small ones, large research universities vs regional community colleges, US versus foreign organizations. Write a bries discussion of your findings.
Important: Don't forget that DNS queries are cached so you have just one shot at each place unless you want to wait for the cached entry to expire which can take a day or more for some sites. If you see sub-millisecond resolution time, you are talking to a cache. Also think of all other network traffic that originates from the host. Having www.unh.edu open in a browser most likely means that an IP address for it is in the cache. Use different hostnames for testing and for the final experiment. The more obscure place you pick the less likely it is cached.
All students:
From a computer with a UNH IP address (this is
important), connect to the mail server running at berlioz.cs.unh.edu
on port 25 using nc (or a telnet client, note that telnet is not
installed on agate to discourage people from using it for remote
access) and pretend to be an MTA delivering a message addressed to
cs725 AT cs.unh.edu. Use subject "SMTP test" and make sure that you are identified
in the body of the message. Capture the session and turn it in as a part of the assignment
paper. Technically, you can use any mail server for the assignment,
however, I would like to ask you to use the one specified above.
While there is nothing technically wrong with connecting to any
mail server, typos-filled hand-typed sessions tend to trigger various
security alarms. I have learned this the hard way when the course
was offered in the past and would like to avoid such problems this
time around.
All students: using berlioz.cs.unh.edu
as the mail server,
send an email with a fake "From" address to yourself and analyze
its full header. Point out all the information that may indicate that
the message did not originate from a legitimate source.
CS students: write as-short-as-possible program that
delivers an email message by (partially) implementing the SMTP
conversation. You are not allowed to use any library for sending
email (e.g., javax.mail
). Take a look at the quick intro to
Python network programming in the textbook - that might be the
quickest way to get this part done.
IT students: write as-short-as-possible script that
delivers an email message by (partially) implementing the SMTP
conversation. You are not allowed to use any command or utility
for direct sending of email (e.g., the mail
command in
Unix/Linux). Basic shell, nc
and expect
are probably
good starting points in your search for the right tools.
Other majors: you can pick either the CS or the IT option.
Follow the standard assignment submission instructions.
Make sure that you read, understand, and follow the instructions. If you have any doubts, ask. Scans of handwritten submissions will no longer be accepted.