Bandit Level 7 → 8
Login : ssh bandit6@bandit.labs.overthewire.org -p 2220
password : morbNTDkSW6jIlUc0ymOdMaLnOlFVAaj
task
Get the password from a file, next to the word millionth
theory lil bit
grep <pattern>prints lines that match<pattern>.- Use the pipe
|to send output from one command into another (e.g. cat data.txt | grep millionth), though grep can read files directly:grep millionth data.txt. - For very large files,
grepis much faster than manually inspecting with less or cat.
solution
bandit7@bandit:~$ ls
data.txt
bandit7@bandit:~$ du -b data.txt
4184396 data.txt
bandit7@bandit:~$ cat data.txt | grep millionth
millionth dfwvzFQi4mU0wfNbFOe9RoWskMLg7eEc
bandit7@bandit:~$
<!-- truncate -->
