Level8

Level Goal

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

Solution

root@0xCAB: /writeups/overthewire/bandit/level8/

$ sort data.txt | uniq -u
EN632PlfYiZbn3PhVK3XOGSlNInNE00t

$

The sort utility sorts the lines of the given file(s), and the uniq utility is used to report or omit repeated lines. The -u flag for uniq tells it to only print unique lines. A pipe (’|’) is a uniderection data flow channel that uses the output of one process as the input of another. In the command above, the output of the sort utility serves as the input of the uniq utility. See the man pages for sort, uniq, and pipe for further reading.