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
Password: cvX2JJa4CFALtqS87jk27qwqGhBM9plV
1 |
$ ssh [email protected] -p 2220 |
We need to find a unique line, something uniq was unsurprisingly built for. The command removes lines that are repeated. This means if you have two of the same line, but they are separated another line, they are not filtered out.
How do we get around this? Sort the file with sort. We’ll use a pipe to send the sorted file to uniq.
1 2 3 4 5 6 7 8 9 10 11 12 |
[email protected]:~$ sort data.txt | uniq 0OghIfgwMwCAdHU7bJQcnZQ0AJIJW32i 0kIXXRRxkn9zt1QVboXxUGgJTc2icRdm 0xxl0vtwyD0TuZQispVqVKnGaVo9z0c1 1zbIa4c2iej6q6r2h6iU9wS289pPpotu 2J4VxABj9e09n3E9EUmf4jAXdtHZzPck 2KZNnJAnwT6joAhp6eea8L858HAhGBhd 2WcB98YA5OecAwmWNDLx3K8uCtiKge54 5FvnyZFrVEY2G3GerowsrkE6SZgLZdYo 5Ui17aYrH08gXOV1TsUyHJzCtZDZwEf8 6Nm9n4LAW7cbmnJdnuyAFhbi6CGdUrbM ... |
Oof. uniq without any options just removes the extra lines. What we want is a truly unique line. This is found by adding the -u option.
1 2 |
[email protected]:~$ sort data.txt | uniq -u UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR |
Oh baby.