Bandit Level 8 Level 9

christianpaez

Christian Paez

Posted on August 1, 2023

Bandit Level 8 Level 9

Introduction

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.

Steps

  1. Open your terminal application.
  2. Enter the following command to ssh into the remote server:
ssh bandit8@bandit.labs.overthewire.org -p 2220
Enter fullscreen mode Exit fullscreen mode
  1. Enter the password for Bandit8: z7WtoNQU2XfjmMtWA8u5rN4vzqu4v99S
  2. Now, you are logged in as Bandit8 and can start solving the level.
  3. Use the cat command to read the contents of the data.txt file:
cat data.txt
Enter fullscreen mode Exit fullscreen mode
  1. We need to find the line that occurs only once in the file. To do this, we can use the sort command to sort the lines of the file, and then the uniq -u command to show only the lines that occur once:
cat data.txt | sort | uniq -u
Enter fullscreen mode Exit fullscreen mode

Congratulations! You have successfully solved Bandit9 and obtained the password for the next level EN632PlfYiZbn3PhVK3XOGSlNInNE00t.

Conclusion

In this level, we learned how to use the sort and 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.

💖 💪 🙅 🚩
christianpaez
Christian Paez

Posted on August 1, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Bandit Level 11 Level 12
bandit Bandit Level 11 Level 12

October 4, 2023

Bandit Level 12 Level 13
bandit Bandit Level 12 Level 13

October 21, 2023

Bandit Level 10 Level 11
bandit Bandit Level 10 Level 11

August 9, 2023

Bandit Level 6 Level 7
bandit Bandit Level 6 Level 7

July 26, 2023

Bandit Level 9 Level 10
bandit Bandit Level 9 Level 10

August 3, 2023