Level 4 → 5
Last updated
Last updated
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.
Navigate to the inhere directory:
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 directory
do
: Starts the loop body
file -i
: Runs the file
command to each file, using ./
to handle filenames starting with -
done
: Ends the loop
Overall: 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.
Scripting with loops can efficiently process multiple files
The file
command helps identify file types regardless of extension
Using ./
is crucial when dealing with files that start with -
-- Othmane