Bandit Level 2 → Level 3

Skills: Reading filenames with spaces

#Login details:

Username - bandit2
Password - CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9

#SSH Command:

ssh bandit2@bandit.labs.overthewire.org -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 
UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK

#OR

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

Last updated