CS107 assignment
Due 11:10AM Wednesday, 6/5/02

This assignment asks about topics that have been discussed in class since mid-May. If you missed class and need assistance, first try to get class notes from a classmate, and then check with me.

  1. In my authors.php file, I included my MySQL password in the mysql_connect statement. Since authors.php is a public web page, it can be viewed from anywhere on the Internet. Can a person with an Internet connection in, say, Brazil obtain my MySQL password? If so, describe the steps the person would follow to get my password. If not, explain why not.

  2. Suppose I want to greet visitors to mypage.php with a sentence saying "You have visited this page N times," where N is the number of times the visitor's web browser has loaded mypage.php. Describe in detail a cookie-based method for doing this. In particular, show the PHP code that would maintain the cookie and display the message.

  3. When an e-mail message arrives at your SMTP server (for example, the SMTP server at carleton.edu), the message gets appended to a text file that is only accessible by people who know your password. This text file is known as your "in-box."

    At the beginning of each message in your in-box is a line that begins with the characters "From " (that's a space character after the m). E-mail processing software, including POP and IMAP servers, looks for "From " lines to tell where one message ends and the next begins. But this could cause trouble if your message text contains a "From " line.

    Try sending yourself an e-mail message that contains a "From " line. How does the e-mail system resolve the problem that the "From " line in your message should not mark the beginning of a new message?

  4. Regarding avian carriers and the Internet.

  5. Suppose my RSA public key is (e,n) = (29,91), and any message sent to me must consist of a string of characters with ASCII value less than 91, encrypted one character at a time. Suppose you intercept the following message addressed to me:

    68 11 53 2 17 78 62 68 2 28 11 62 2 17 50 87 50 7

    What is my decryption key (d,n)? Use it to decrypt the intercepted message. Show your work.

    Note that the calculator that comes standard with Windows (under the Start/Programs/Accessories menu) can do exponentiation and modular arithmetic with very large numbers.

  6. What MIME content type and subtype are used to transmit:

    This is most easily answered by experimentation, sending yourself messages with attachments.

  7. A few questions about Internet history.

  8. How does Google make money?