OverTheWire Bandit Level 2 → 3 Walkthrough
Reading a filename with spaces using quotes or backslash
OverTheWire Bandit Level 2 → 3 Walkthrough
Level goal: The password for the next level is stored in a file called spaces in this filename located in the home directory
Commands you may need: ls, cd, cat, file, du, find
Helpful reading:
Write-up
This was simple enough since Tab completion was enabled. If that would not be the case, I would have escaped the spaces with a backslash(\).
Thus I used cat spaces\ in\ this\ filename to read from the file.
I escaped the spaces with a backslash here, but wrapping the whole name in quotes works just as well — more on that in how quotes change the way the shell reads a command.
Level 3 password:
UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK
