From Hive Helsinki for all the 42 Network
Turn-in directory: chall02/
Files to turn in: <xlogin>.py
Language: Python 3.x
Deadline: 07.04.2020 - 10:42am
For the purpose of this challenge, Morse code represents every letter as a sequence of 1-4 characters, each of which is either .
(dot) or -
(dash). The code for the letter a
is .-
, for b
is -...
, etc.
The codes for each letter from a through z are:
.-
-...
-.-.
-..
.
..-.
--.
....
..
.---
-.-
.-..
--
-.
---
.--.
--.-
.-.
...
-
..-
...-
.--
-..-
-.--
--..
You have to submit a python3 executable script to encode a string to morse.
[titus@pentest-lab ~ ]$ ./xlogin.py
usage: ./xlogin.py <a-zA-Z string>
[titus@pentest-lab ~ ]$ ./xlogin.py ""
usage: ./xlogin.py <a-zA-Z string>
[titus@pentest-lab ~ ]$ ./xlogin.py "firstArg" "secondArg"
usage: ./xlogin.py <a-zA-Z string>
[titus@pentest-lab ~ ]$ ./xlogin.py "sos daily##@"
usage: ./xlogin.py <a-zA-Z string>
[titus@pentest-lab ~ ]$ ./xlogin.py "soS"
...---...
[titus@pentest-lab ~ ]$ ./xlogin.py "daily"
-...-...-..-.--
[titus@pentest-lab ~ ]$ ./xlogin.py "proGRammer"
.--..-.-----..-..-----..-.
[titus@pentest-lab ~ ]$ ./xlogin.py "bits"
-.....-...
[titus@pentest-lab ~ ]$ ./xlogin.py "sos daily" | cat -e
...---... -...-...-..-.--$
- The first one to submit a working solution will earn
420
points for their coalition. - Everyone else submitting a working solution (not yet submitted) will earn
126
points for their coalition. - Every participant that tried to solve the challenge and pushed a solution will earn
84
points for their coalition.
Good luck!
About the title: Constelación Serpens