Task

The password for the next level is stored in a file called spaces in this filename located in the home directory.

Username: bandit2

Password: string provided in the - file in the previous level

Theory

This task threw me off a bit because I literally thought that the filename was just a space. Then I realised it’s not possible for filenames to just have spaces.

Since the file spaces in this filename has spaces in its filename (trippy), I cannot type the filename in the command.

Doing so will make the command look for four separate files: “spaces”, “in”, “this”, and “filename”.

As a result, having spaces in filenames go against best practices. The recommended is to use an underscore (_) or a dash (-) as separators.

For this task, in order to locate this uniquely name file, I will be putting quotation marks about the filename, i.e., “spaces in this filename”, to indicate that the words belong to one filename.

Solution

Step 1: Log in using the username and password in the task.

Step 2: List out directory’s contents using ls.

Step 3: Type in the command cat "spaces in this filename" to read the contents in the file.

level3completed

Level 3 completed.

Footnote: The password string for this level was confusing because on the command “1” and “l” (lowercase L) look deceptively similiar. It took some pattern recognition on my part to deduce the correct password.