Level 4 → 5
Level Goal
The password for the next level is stored in the only human-readable file in the inhere directory. Tip: if your terminal is messed up, try the reset command.
Write-Up
Navigate to the inhere directory:
ls
cd inhere
Identify the human-readable file:

This reveals ./-file07 as the only text/plain file.
for i in $(ls): Loops through each file in the current directorydo: Starts the loop bodyfile -i: Runs thefilecommand to each file, using./to handle filenames starting with-done: Ends the loopOverall: Identifies the file type of every file in the directory.
Display the content of the identified file:

The retrieved password: 4oQYVPkxZOOEOO5pTW81FB8j8lxXGUQw
Access the next level:
Enter the password when prompted.
Lessons Learned
Scripting with loops can efficiently process multiple files
The
filecommand helps identify file types regardless of extensionUsing
./is crucial when dealing with files that start with-
-- Othmane
Last updated
Was this helpful?