ctf.wail.ly Version française

Clean up text

User rung7

ssh -p 2222 rung7@play.ctf.wail.ly

Goal

noisy.txt contains the password for the next level, with punctuation inserted between its characters. Remove everything that is not a lowercase letter or a digit.

Commands that may help

Reading

Prerequisite: not tied to a lecture chapter.

Hints

Hint 1
Print the file with cat to see what you are dealing with. Copying the password by hand is error-prone: tr can drop the unwanted characters for you. Unlike cat, tr does not take a file name; it only reads what is sent to it, for example through a pipe | from cat.
Hint 2
tr -d followed by a set deletes the characters of that set. With -c as well, the set is turned inside out: every character that is not in it gets deleted. A set can be written as ranges, such as a-z for the lowercase letters and 0-9 for the digits; put it between single quotes.
Hint 3
Write tr, then its two options -c and -d, which can be stuck together behind a single dash, then the set of lowercase letters and digits between single quotes. After that, a < followed by the file name gives the file to tr, as a pipe from cat would. The newline at the end of the file goes too, so the password sticks to your next prompt; copy only the password. To end the line, you can add a semicolon ; after the command, then echo: ; runs one command after another, and echo on its own prints an empty line.

After this level

This is the last level for now. The password you find here logs you in as rung8, at the top of the ladder. Log in with the line below: a note there confirms that you reached the top.

ssh -p 2222 rung8@play.ctf.wail.ly