The next challenge stipulates that there’s a file in the “inhere” directory with the following attributes:

  • human-readable
  • 1033 bytes in size
  • not executable

Honestly, my knowledge of the find command is pretty lacking. I always have to hit the man pages when I need to do anything beyond a simple find / -name somefile.txt. After browsing through the manual for a while I came up with the following. I wasn’t really sure what the exact definition of “human readable” was, and nothing in the man page stuck out to me in terms of identifying that attribute. Decided to use a similar solution to previous problems and used the file command to look for the ASCII string. Perhaps could’ve done that through the exec find switch?

bandit5@bandit:~$ find ./inhere -size 1033c \! -executable | xargs -I fl file fl | grep ASCII
./inhere/maybehere07/.file2: ASCII text, with very long lines
bandit5@bandit:~$ cd ./inhere/maybehere07/
bandit5@bandit:~/inhere/maybehere07$ cat .file2
XXXXXXXXXXXXXXXXXXX (actual password not shown)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        bandit5@bandit:~/inhere/maybehere07$