Lessons Learned
how to sort strings, then find the only unique string in a file.
Logging in
On a kali vm/ linux machine
Type:
ssh bandit8@bandit.labs.overthewire.org -p 2220
cvX2JJa4CFALtqS87jk27qwqGhBM9plV
Completing The Challenge
The Goal:
password for next level located in the file data.txt and is the only line of text that occurs only once
The Solution:
bandit8@bandit:~$ ls
data.txt
bandit8@bandit:~$ sort data.txt | uniq -c | grep '1 '
1 UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR
sort sorts lines in a file and groups them together
uniq returns only one of each unique line
-c is a counter
grep searches for a string
'1 ' avoids any string that doesn't end in 1specifically any string that ends with a one followed by a space
Comments
Post a Comment