OverTheWire Level 5 -> Level 6解题过程
级别:Bandit Level 5 → Level 6
目标:Level Goal
The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties:
- human-readable
- 1033 bytes in size
- not executable
下一级密码保存在inhere目录的某个文件,该文件有三个属性
允许命令:Commands you may need to solve this level
ls, cd, cat, file, du, find
解题过程:
看来是需要运用find命令的各种选项组合查找出该文件。
这里的 -size 由于是字节,需要在后面加上c.
并且条件里是非可执行文件,就是对选项 -executable取反, 即: ! -executable,最后利用-exec并结合file命令查找出人类可读的文件。
bandit5@bandit:~$ ls inhere bandit5@bandit:~$ cd inhere/ bandit5@bandit:~/inhere$ ls maybehere00 maybehere02 maybehere04 maybehere06 maybehere08 maybehere10 maybehere12 maybehere14 maybehere16 maybehere18 maybehere01 maybehere03 maybehere05 maybehere07 maybehere09 maybehere11 maybehere13 maybehere15 maybehere17 maybehere19 bandit5@bandit:~/inhere$ find . -type f -size 1033c ! -executable -exec file {} \; ./maybehere07/.file2: ASCII text, with very long lines bandit5@bandit:~/inhere$ cat ./maybehere07/.file2 DXjZPULLxYr17uwoI01bNLQbtFemEgo7
STRIVE FOR PROGRESS,NOT FOR PERFECTION