Level9

Level Goal

The password for the next level is stored in the file data.txt in one of the few human-readable strings, preceded by several ‘=’ characters.

Solution

root@0xCAB: /writeups/overthewire/bandit/level9/

$ strings data.txt | grep '==='
========== the
bu========== password
4iu========== is
========== G7w8LIi6J3kTb8A7j9LgrywtEUlyyp6s

$

The strings utility is used to print the sequences of printable characters in a file. The level goal states that the password will be on a line containing sever ‘=’ characters, so we can pipe the output of strings into grep to search for lines containing multiple ‘=’ characters. See the strings man page for further reading.