Task #3 - Code Ninja
Task #3 - Code Ninja
The host dallas.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: dallas.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.
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.gz64 and 32-bit version of the codeninja library
- netsec-codeninja32.tar.gz
Questions:
mail to: leder@ cs.uni-bonn.de
Verify Results
You can verify your code by submitting the decrypted string via the form on the self-test page.