uiucd - 300
RE: cdkey_server - Copy of the server code that checks the flag. The actual flag is replaced with \"Success! Please enter your CD Key on the server to retrieve the flag!\". If you see that message pop up, then enter in your correct CD key to our server, on port 6543 to get the flag. To run, type \"./cdkey_server \"
\ncdkey_client - Run this to submit your flag to the server. To run, type \"./cdkey_client \". It will then prompt you to enter your CD key in.
Solution:
Checks:
Length of 29
Key is in the format of 5 blocks of 5 alphanumeric characters, with each block separated by a dash. XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
First block is "DAVID"
Second block has to be in the format: number-number-letter-number-letter
Third block is XOR first and second block modulo 36 (index into array)
Fourth block is to use a 5 bit mask (AND) for the LSB of the elements in the third block to index into array
Fifth block is sum of first four blocks, multiply sum by 1234 modulo 89989 and add 10000 if sum is less than 90000