Bandit Level 8-9@overthewire.org
Description
The password for the next level is stored in the file data.txt and is the only line of text that occurs only once
Current level credentials
Key | Value |
---|---|
Server-name: | bandit.labs.overthewire.org |
Port: | 2220 |
User: | bandit8 |
Password: | TESKZC0XvTetK0S9xNwm25STk5iWrBvP |
Current level login
Log in
1 |
|
sshpass
before using it. The ssh
command can also be used on its own. If so, copy-paste the password when requested.
Hints And Solution
Hint(s)
In the manpage for uniq
, look up what options you need display only unique lines.
Does uniq
need anything in order to function? Does it matter whether duplicate lines are adjacent or not?
Solution
1 2 3 4 5 6 7 8 9 10 |
|
- In order to make all duplicate lines adjacent, pipe the output from
cat
tosort
. Finally, rununiq -u
on that output to view just unique lines.
ls -al
shows that the file data.txt
is in the home directory. To only display unique lines, we can use the command uniq
with the option -u
. If we look at the man page for uniq
, we can see that it filters adjacent matching lines. Because the lines in the file are not all adjacent, we must sort
them before passing them to uniq
.
Resources
Resources
Comments
Any feedback and suggestions are welcome. This website was created using mkdocs and the material plugin. If you want, you can make a pull request. The repository is https://github.com/dabonzo/itsec_hp