Skip to main content

Posts

Showing posts with the label Bandit 9

Over the Wire - Bandit 9

Bandit 9 Objectives 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 let's cat the file sort it and find unique lines bandit8@bandit:~$ cat data.txt | sort |uniq -u UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR that was pretty easy now let's python that thing.. ​ with open("data.txt") as f:  orig = list(f)  filtered = [x for x in orig if orig.count(x)==1]  print("".join(filtered)) >>> with open("data.txt") as f: ...  orig = list(f) ...  filtered = [x for x in orig if orig.count(x)==1] ...  print("".join(filtered)) ... UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR