ctf.wail.ly Version française

Find by size

User rung4

ssh -p 2222 rung4@play.ctf.wail.ly

Goal

Under the warehouse directory, the password for the next level is the last line of the only file that is exactly 512 bytes long.

Commands that may help

Reading

Prerequisite: not tied to a lecture chapter.

Hints

Hint 1
You already know find from the previous level. Besides the name, it can select files by other properties, their size among them. Every file here ends with a line that looks like a password, so only the right file will do.
Hint 2
The test is -size followed by a number. Without a unit, find counts in blocks of 512 bytes, so -size 512 looks for files of about 256 KB and finds nothing here; put the letter c right after the number to count in bytes. -type f keeps files and leaves directories out.
Hint 3
Write one find command: first the directory warehouse, then the test that keeps only files, then -size with the number of bytes and its unit letter stuck to it. It prints the path of the file. tail prints the last lines of a file: give it the option -n with the number 1, then that path, and it prints only the last line.