loading...

OverTheWire Bandit Level 2 → Level 3 walk-through

kkaosninja profile image Krishna Kishore Shetty ・1 min read

Overthewire Bandit Wargames walkthrough (11 Part Series)

1) Shall We Begin? >:-) 2) OverTheWire Bandit Level 0 walk-through 3 ... 9 3) OverTheWire Bandit Level 0 → Level 1 walk-through 4) OverTheWire Bandit Level 1 → Level 2 walk-through 5) OverTheWire Bandit Level 2 → Level 3 walk-through 6) OverTheWire Bandit Level 3 → Level 4 walk-through 7) OverTheWire Bandit Level 4 → Level 5 walk-through 8) OverTheWire Bandit Level 5 → Level 6 walk-through 9) OverTheWire Bandit Level 6 → Level 7 walk-through 10) OverTheWire Bandit Level 7 → Level 8 walk-through 11) OverTheWire Bandit Level 8 → Level 9 walk-through

Challenge page => https://overthewire.org/wargames/bandit/bandit3.html

This challenge is very similar to the previous one, as it also involves reading the password from a file with a tricky file name.

The file name where the password resides contains spaces. Now if you've ever had anything to do with filenames on the command lines, you already know how to do this. Its all right if you don't know. By the end of this, you will!


Hint 1: Just google it! "How to read filenames with spaces". There are multiple ways to do this.


You found it didn't you? Awesome.

There's basically two ways you can read a file whose name contains spaces. Both ways ensure that your shell does not interpret the words in the file name as command arguments.

Solution

The first way is to escape the spaces with a backward slash.

The second way is to place quotes around the filename. Both are shown in the below picture.

bandit3

P.S: You can also get the shell to autocomplete the filename for you, by typing a couple of letters in the first word of the file name, and then pressing TAB

Happy Hacking!

Overthewire Bandit Wargames walkthrough (11 Part Series)

1) Shall We Begin? >:-) 2) OverTheWire Bandit Level 0 walk-through 3 ... 9 3) OverTheWire Bandit Level 0 → Level 1 walk-through 4) OverTheWire Bandit Level 1 → Level 2 walk-through 5) OverTheWire Bandit Level 2 → Level 3 walk-through 6) OverTheWire Bandit Level 3 → Level 4 walk-through 7) OverTheWire Bandit Level 4 → Level 5 walk-through 8) OverTheWire Bandit Level 5 → Level 6 walk-through 9) OverTheWire Bandit Level 6 → Level 7 walk-through 10) OverTheWire Bandit Level 7 → Level 8 walk-through 11) OverTheWire Bandit Level 8 → Level 9 walk-through

Posted on Jul 30 '19 by:

kkaosninja profile

Krishna Kishore Shetty

@kkaosninja

Starting a career in Penetration Testing/Vulnerability Assessment

Discussion

markdown guide