Bandit level 8

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

An issue not too far from the previous one, we need to find the password hidden somewhere in a file with many lines in it. Our hint is that it is the only line appears once, which should be more than enough to solve this puzzle.

useful commands:

  • cat
  • uniq
  • strings
  • sort

Solution - Spoiler Alert!

To solve this one I utilized two commands, first i just tried uniq -u but that resulted in many lines of output. Then i did a quick read on the uniq and it does not check for uniqueness in the entire file, but it check for uniqueness towards adjacent lines. So then we need to sort the file first. So if we first use the sort command and pipe it, it works.

the command i used: sort | uniq -u

Overview
Bandit level 7
Bandit level 9