Bandit Level 8 → Level 9
Bandit9 is the tenth level of the OverTheWire Bandit wargame. In this level, we are given a file called
data.txt and we have to find the line that occurs only once in the file.
- Open your terminal application.
- Enter the following command to ssh into the remote server:
ssh firstname.lastname@example.org -p 2220
- Enter the password for Bandit8:
- Now, you are logged in as Bandit8 and can start solving the level.
- Use the
catcommand to read the contents of the
- We need to find the line that occurs only once in the file. To do this, we can use the
sortcommand to sort the lines of the file, and then the
uniq -ucommand to show only the lines that occur once:
cat data.txt | sort | uniq -u
Congratulations! You have successfully solved Bandit9 and obtained the password for the next level
In this level, we learned how to use the
uniq commands to find a unique line in a file. These are powerful commands that can be used to analyze and manipulate large amounts of data.