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
비밀번호는 inhere 디렉토리에 사람이 읽을 수 있는 파일에만 저장되어 있다
tip: 터미널이 복잡하면, reset 명령어를 사용하자
Code
bandit4@bandit:~$ cd inhere
bandit4@bandit:~/inhere$ ls
-file00 -file01 -file02 -file03 -file04 -file05 -file06 -file07 -file08 -file09
bandit4@bandit:~/inhere$ cat *
cat: invalid option -- 'f'
Try 'cat --help' for more information.
bandit4@bandit:~/inhere$ cat ./*
#비밀번호
bandit4@bandit:~/inhere$ cat -- *
#비밀번호
파일을 읽기만 하면 될 것 같아서 cat 명령어를 사용하고자 하였다. 첫 번째 시도에서 cat *이 유효한 옵션이 아니라고 메세지가 떠서 경로를 이용하여 출력하였다. 구글링해서 세 번째로 다시 시도해보았더니 출력에 성공하였다. --은 옵션이 끝났다는 의미이다.
'wargame > bandit' 카테고리의 다른 글
Level 6 → Level 7 (0) | 2019.02.14 |
---|---|
Level 5 → Level 6 (0) | 2019.02.14 |
Level 3 → Level 4 (0) | 2019.02.14 |
Level 2 → Level 3 (0) | 2019.02.14 |
Level 1 → Level 2 (0) | 2019.02.14 |