Skip to main content

Bandit Level 8 → 9

Shubham
Cybersecurity Enthusiast

Login: ssh bandit8@bandit.labs.overthewire.org -p 2220
Password: dfwvzFQi4mU0wfNbFOe9RoWskMLg7eEc

task

The password for the next level is stored in the file data.txt and is the only line of text that occurs only once.

theory lil bit

  1. sort: Sorts lines of text files. This is necessary because uniq only detects duplicate lines if they are adjacent (one after another).
  2. uniq -u: The uniq command filters out repeated lines. The -u flag specifically tells it to only print lines that are unique (lines that appear exactly once in the input).
  3. The Pipe (|): Used to send the sorted output of the file directly into the uniq command for filtering.

solution

bandit8@bandit:~$ ls
data.txt
bandit8@bandit:~$ sort data.txt | uniq -u
4CKMh1JI91bUIZZPXDqGanal4xvAg0JM

<!-- truncate -->