Bandit Level 2 → Level 3

Skills: Reading filenames with spaces

#Login details:

Username - bandit2
Password - CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9

#SSH Command:

ssh -p 2220

On login, we see following file -

bandit2@bandit:~$ ls
spaces in this filename <---- Output

Spaces in Linux and Windows are considered as a part of command. We can escape it by specifying file name in quotes or escape each space with backslash character.

bandit2@bandit:~$ cat spaces\ in\ this\ filename 


bandit2@bandit:~$ cat "spaces in this filename" 

Last updated