Level 8 → 9

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

Write-Up

  1. List the content of the current directory:

ls
ls

This confirms the presence of the data.txt file.

  1. Display the content of the data.txt file:

cat data.txt
cat data.txt
  1. Search for the line of text that occurs only once:

sort data.txt | uniq -u
sort data.txt | uniq -u
  • sort data.txt: Sorts the lines alphabetically

  • |: Pipes the output to the next command

  • uniq -u: Filters for unique lines

The password retrieved: 4CKMh1JI91bUIZZPXDqGanal4xvAg0JM

  1. Access the next level:

ssh [email protected] -p 2220

Enter the password when prompted.

Lessons Learned

  • The sort command is useful for organizing data for further processing

  • uniq -u filters for lines that appear only once in the input

  • Piping commands together can create powerful data processing workflows

  • Sometimes finding unique information requires multiple steps of data manipulation

-- Othmane

Last updated

Was this helpful?