Bandit Level 8 → 9
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
- sort: Sorts lines of text files. This is necessary because
uniqonly detects duplicate lines if they are adjacent (one after another). - uniq -u: The
uniqcommand filters out repeated lines. The-uflag specifically tells it to only print lines that are unique (lines that appear exactly once in the input). - The Pipe (|): Used to send the sorted output of the file directly into the
uniqcommand for filtering.
solution
bandit8@bandit:~$ ls
data.txt
bandit8@bandit:~$ sort data.txt | uniq -u
4CKMh1JI91bUIZZPXDqGanal4xvAg0JM
<!-- truncate -->
