Task #3 - Code Ninja
Task #3 - Code Ninja
The host uerige.cs.uni-bonn.de has a special service on port 7331. Write a linux C program that connects to that host and port using the socket API. All data received is to be given to the library provided in the following. The library decodes the data and returns a secret. This secret can be verified using the form on the self-test page.
Note: uerige.cs.uni-bonn.de can only be reached from within the network of the computer science department. You can test your program either from a machine in one of the CIP pools or via VPN. If you can ping the host but the port seems closed, please contact Daniel Plohmann under the given mail address in the questions section.
The decryption function you have to use has the following signature:
u_char *decrypt(u_char *ibuf, int ilen, int *olen);
Its arguments are:
- ibuf [in]: a pointer to the input buffer
- ilen [in]: the input buffer size
- olen [out]: a pointer to an integer variable that will contain the size of the returned output buffer
The function returns a pointer to a buffer with the result (don't forget to free() it).
The codeninja library is available for download from here:
- netsec-codeninja.tar 03.gz64-bit version of the codeninja library
- netsec-codeninja32.tar 03.gz32-bit version of the codeninja library
Questions
mail to: lambert@cs.uni-bonn.de
You can verify your code by submitting the decrypted string via the form on the self-test page.