Featured image of post OverTheWire - Bandit - Level 2

OverTheWire - Bandit - Level 2

The solution to OverTheWires Bandit, Level 2

Hello, hello, hello, and welcome to solving Bandit level 2. As I’ve brought up before, I did these back in July 2021, so i remember parts of the solutions typically. Most will be quite fast to solve.

Todays challenge is again, about how to understand files, and their names. This one is not that tricky.

Challenge

1
2
3
4
5
ssh bandit2@bandit.labs.overthewire.org -p 2220

bandit2@bandit:~$ ls -l
total 4
-rw-r----- 1 bandit3 bandit2 33 Feb 21 22:03 spaces in this filename

Potential Solutions

I’m just going to say that I use tab completion in bash, so this was as simple for me as starting the name and pressing tab. Here are some solutions anyway:

  • wrap the filename in quotes - cat "spaces in this filename"
  • escape the spaces - cat spaces\ in\ this\ filename

There are probably more, but both work quite well, and given this isn’t too big of a challenge, I’ll just leave it there, and call it a day.

Built with Hugo
Theme Stack designed by Jimmy