Practicum in Trading Systems Development: Lab 7
Due:
Thursday, August 9, 2012,
by
5:00 PM
PURPOSE AND RATIONALE
The purpose of this lab is to let students gain specific experience
with basic message queue manipulation in C (called from C++). The
goal of this lab is to provide students with the
foundations necessary to understand the dynamics of the adding and
removing messages from a Linux Message Queue.
NB: If you are not a CSPP
student and are in need of a CS Cluster login ID (if you don't know
what this is you are in need of one), contact the TAs immediately so
you can get set up with a cluster login ID for the labs. This
course cannot be conducted without a CS Cluster login ID. If you
already have a UofC CNET ID, you can (and should) manually apply for a
CS cluster ID here.
PRIMARY RESOURCES:
You should refer to relevant sections of the man pages for assistance
for
this lab, in addition to materials in the assigned chapters from the
primary texts for
this
week (per the syllabus).
You should ssh into the cluster to perform all lab
activities.
Make sure you have read this week's assigned reading.
README
- If you are not in our course email list, please subscribe to the
cspp51025 email list here: http://mailman.cs.uchicago.edu/mailman/listinfo/cspp51025
- Turn the lab assignment as a tarball in by email to the TA
(cc'ing the instructor) by the due date
above.
- For printing out your documents, you might find the following
commands useful during your year(s) in this department:
- lpr - off line print. Note that this command is
called when you print from acroread (for .pdf files) or
gv (for .ps files)
- lpq - shows the printer queue
- lprm - removes jobs from the printer queue
- enscript - converts text files to PostScript (useful
when you want to print out text files)
- Make sure you have read the Submission Guidelines for
submission.
LAB 7
In this lab we are going to crack passwords. You have been given
an MD5 hash of a 4 character password. The valid characters used
in this password are A-Z, a-z, and 0-9. Four characters
thus yield just under 15 million possibilities. We are going to
use a brute force and ignorance approach to finding this
password. In other words, we are going to try all
possibilities. A main controller thread is responsible for
distributing work to an arbitrary number of worker threads (this value
will be declared on the command line). The main thread will
supply each worker thread with the first two characters that worker
thread is to use. The worker thread will then permute over the
remaining two characters using the available range above.
You must have coordination among these worker threads so that
collisions do not occur. One suggested solution might be to use
an STL queue to store the unused first two-letter combinations.
When a worker thread completes it's work, it simply pops the next range
off the queue. The program ends when the password you hashed
results in a hash that matches the hash provided.
See Mark Weindling's lecture for the text of the MD5 hash.
More information:
Spencer's Socket Site
Beej's Guide to Network
Programming
Developerweb Unix Socket FAQ
Richard Steven's Home Page
BOOST
Sockets
Mark
Shacklette