On the occasion of the April Fool's Day of 2023, the 42 staff devised a fun challenge for its global student body. The project had to be completed in three days and there were 18 exercises to be done. Each exercise was worth 5 points and the last one 15 points. Project grades spanned from 0 to 100. If the final grade after evaluation was 50, 75 or 100, the student received cumulative rewards on the intranet.
The early demo of ChatGPT on November 30, 2022, took the world by a storm. Catastrophic predictions started to the made. Regarding the software development world, it was said that artificial intelligence (AI) would soon eliminate the need for developers. It remains evident that developers will continue to play crucial roles in the future of software development.
Through a series of exercises, the event gave its opinion about the matter. The exercises made the students explore contemporary problems and API updates beyond ChatGPT's training scope, which ended in September, 2021. Thus, the exercises encouraged the students to try different programming languages. I myself had to write solutions in Shell Script, C, Python, Perl and PHP.
This experience underscored the importance of robust programming skills alongside AI assistance. It emphasized that while AI enhances technical problem-solving capabilities, our human creativity and analytical skills remain indispensable. Last but not least, human jokes are far better than AI generated ones.
This exercise asked the student to join the official Slack channel of the event.
Create a bash script that writes an infinite number of times the word "yes". The use of echo
, cat
and printf
was not allowed.
Here, the students had to create a file containing only "42" and its name was _\\!\@#$%\^\&\*\(\)_......txt
. There are some possible solutions here: 1) escape the characters or 2) use single and double quotes.
In a file named joke.txt
, the student had to write its best joke using 256 characters or less.
At their own risk, the students had to read a QR Code redirecting to this video: https://www.youtube.com/watch?v=dQw4w9WgXcQ. A file containing the lyrics of "Rick Astley - Never Gonna Give You Up" had to be turned in.
This exercise asked the students to write a Perl script that prompts the user for input and checks whether the input is a palindrome.
Here, the language requested was PHP. The task was to write a script that challenges the user to a game of rock-paper-scissors against the computer.
This exercise introduced me to code golfing, which is a type of recreational computer programming competition in which participants strive to achieve the shortest possible source code that solves a certain problem.
The task was to write a C program with the smallest number of characters possible. The program had to accept two parameters and print them with a \n
(newline) character and the end. Thus, it had to return the number of parameters printed. If the number of arguments provided wasn't equal to two, the program should do nothing.
The task here was to write a C program that calculates the value of a blackjack hand following some specified constraints.
This exercise asked the students to write a C program that accepts strings as argument and prints them in a rectangular frame, one string per line. If no strings are provided (argc
is 1), then nothing should be displayed.
This is the one I had the most fun doing it! This exercise gave the student a bunch of encrypted messages, totalizing 7 of them. The following encryptions were used:
- rot42
- Base64
- Atbash
- Javascript Keycode
- Nato phonetic
- leet
- Playfair with the key PLAYFAIR
To find the solution, I used the websites listed in the next section to employ a trial-and-error approach. I also collaborated with my colleagues on Slack to tackle the challenging problems and find the solutions together.
If you want to try it yourself, here are the 7 encrypted messages:
Veh jxyi unuhsysu oek mybb xqlu je mhyju jxu fqiimeht yd q iocrebkc.jnj vybu.
Q29uZ3JhdHVsYXRpb25zIG9uIGRlY29kaW5nIHRoaXMgbGluZSwgdGhlIGZpcnN
0IGxldHRlciBpczogaw==
Xlmtizgfozgrlmh lm wvxlwrmt gsrh ormv, gsv gsriw ovggvi rh: s
67 79 78 71 82 65 84 85 76 65 84 73 79 78 83 79 78 68 69 67 79 68 73 78 71 84 72
73 83 76 73 78 69 84 72 69 78 69 88 84 67 72 65 82 65 67 84 69 82 73 83 50
Charlie Oscar November Golf Romeo Alpha Tango Uniform Lima Alpha Tango
India Oscar November Sierra ... Oscar November ... Delta Echo Charlie Oscar
Delta India November Golf ... Tango Hotel India Sierra ... Lima India November
Echo ... Tango Hotel Echo ... November Echo X-Ray Tango ... Lima Echo Tango
Tango Echo Romeo ... India Sierra ... Juliett
C0N6r47U14710N5 0N D3C0D1N6 7H15 11N3 7H3 N3X7 13773r 15 F
RSOEBLNZAYNDQOT QT IKITREUM OEBO YEUM, NKG AYTN PGSZNMB RT: K
The task at hand was to write a Python program that incorporated the open source PokeAPI, retrieved information on various PokΓ©mon and displayed them once the user entered the name of a PokΓ©mon.
This exercise is about writing a program that uses SMTP to send email with an attachment. The use of Bash wasn't allowed. I solved this challenge in Python and used "smtp.office365.com"
as a host.
This exercise was about analyzing an executable program. At first, it's a playable game and the task was to retrieve its password. I used strings
command to look for printable strings in a file, objdump -s
to print the complete content of all sections of the file to look for potential password clues and Ghidra, a software reverse engineering (SRE) suite of tools developed by NSA. This was a fun exercise because I mutually shared a lot information with my colleagues in order to discover the solution.
By far the hardest exercise of the list! The task was to write a program that generates the Sastantua's pyramids. The program accepts an integer that determines the size of the pyramid and draw it according the provided size parameter. I solved it in Python.
Here's an example of a Sastantua's pyramid when size argument is 5:
This exercise introduced me to the fantastic world of stenography! It's like writing in code, except the only people who can decipher it are other stenographers (and maybe Sherlock Holmes), Are you?
Given an image, the student had to find the flag. The whole idea of stenography is that a message is embedded into an image by altering the values of some pixels, which are chosen by an encryption algorithm. The websites used to find the flag are listed in the next section.
Using ChatGPT, generate his best joke. The file cannot exceed 512 characters!
Warning
I assure you, it's a terrible joke...
This fun exercise introduced me to zero-width character stenography (ZWSP). The idea is to convert a private message into binary data. Then the binary characters space, zero and one are mapped to three different zero-width characters. This will be appended to a public message. The result is that only the public message will be visible.
This exercise asked the students to analyze a tweet print screen image that had a hidden message to be retrieved. Looking closely at the tweet image, it's possible to notice some weird characters formatting. Thus, a series of hexadecimal values were given as a tip to tackle the problem.
To find the hidden message, I had to first convert the given hexadecimal characters to UTF-8 characters. These were the characters used to embed the hidden message. The next step was to write the public tweet message with normal characters and rebuild the weird formatting tweet by looking at the image and attempting insert the special UTF-8 characters on the correct order. To do that, the VSCode editor has an option for rendering whitespaces, which allows users to visually differentiate normal and special characters.
The image below shows the tweet rebuild process using VSCode and https://holloway.nz/steg/ to find a hidden message that made sense:
-
For exercise 01:
-
For exercise 05:
- Taking Input in Perl by CodesDope
- Case insensitive comparison in Perl by Well House Consultants
- Perl | my keyword by GeeksforGeeks
- What are the use strict and use warnings pragmas in Perl? by educative
- Remove a space from a Perl variable by Stack Overflow
-
For exercise 06:
-
For exercise 07:
- Tips for golfing in C by Stack Exchange
-
For exercise 10:
- Amazing website with many modern cryptography tools: https://www.dcode.fr/tools-list#cryptography
- Another good one: https://dencode.com/en/
-
For exercise 11:
-
For exercise 12:
- O que Γ© SMTP? by Brevo
- Office365 smtp server does not respond to ehlo() in python by Stack Overflow
- How to send email attachments? by Stack Overflow
-
For exercise 13:
-
For exercise 15:
-
For exercise 17:
- About Zero-width Characters Steganography: https://mayadevbe.me/posts/projects/zw_steg/
- To convert Hex code to UTF-8 chars: https://www.browserling.com/tools/hex-to-utf8
- To rebuild the tweet and find the hidden message: https://holloway.nz/steg/
- Unicode Character (U+200B)