Takehome exam
Upload via Moodle as: final.tar, including a writeup (final.txt or final.md or final.pdf, for example) and your code for problem 3 (server.py).
This is a take-home exam. Do your own work, and do not discuss the contents of the exam with any person other than Jeff or your prefect. Do not use LLMs for this exam. If Google or another search engine gives you AI summaries, it's OK to read them, but you need to check up on the validity of their answers if you use those answers in your submission.
1. Buffer overflow (15 points)
This has been a homework assignment in past terms, so instead of importing its description into this page, I'll just direct you to the buffer overflow homework page.
3. Moving bits around with base64 (6 points)
The base64 encoding scheme converts any arbitrary sequence of bytes into a corresponding sequence of printable ASCII characters (letters, digits, and a few punctuation marks).
Read up on base64 encoding and answer the following questions.
- Why would we bother encoding data in this way instead of just leaving the data as it was to begin with? (One well-explained application would be a sufficient answer for this question.)
- Suppose you have a base64-encoded string in a file named
message.base64. Show me the command you would use on mantis or similar systems to covert the contents of the file back to its original form. - What original sequence of bytes would have the base64 encoding
of
R3JlYXQhCg==? Show how the bits of the original bytes are reassembled when you decodeR3JlYXQhCg==(for example, via some sort of diagram showing which bits come fromRand3etc., and where those bits go to reconstruct the original bytes).
2. Implementing a tiny HTTP-like protocol (8 points)
For this exercise, you're going to modify the sample server.py. Your modified code will implement the server side of the protocol described below.
Hand in:
- Your modified version of
server.py - A brief explanation of how to use
ncas a rudimentary client to test your server, including the specific command(s) plus anything else you would type while testing.
4. Educating and/or entertaining Jeff (2 points)
I just finished a book. What should I read next? Or watch? Or waste time with over the summer? Or whatever?
Thanks for a great term
Enjoy your summer, everyone. Seniors, congratulations and good luck out there!