MayADevBe Blog

A Blog about Computer Science

OverTheWire Bandit Level 7 -> 8 - Walkthrough

Previous Level: Level 7


SSH: ssh -p 2220

Password: HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs


Get the password from a file, next to the word millionth

A little bit of Theory

I already gave a small introduction to grep in Level 6. grep can be used to search lines that contain a specific pattern like follow grep <pattern>.

With the pipe (|), we can pipe the output of cat to grep as input to look through a text file.


Checking the file size of data.txt, we can see it is huge:

bandit7@bandit:~$ du -b data.txt 
4184396 data.txt

So simply looking through the file, would take too long and be too much effort.

Instead, we can try using grep, since the password is in the same line as the word ‘millionth’

bandit7@bandit:~$ cat data.txt | grep millionth
millionth       cvX2JJa4CFALtqS87jk27qwqGhBM9plV

Next Level: Level 9

Share on: