-
OverTheWire: Level Goal: Bandit Level 1 → Level 2 풀이2021 SCP Mentoring/OverTheWire: Bandit 2021. 4. 25. 22:49
문제 다음 레벨로 가기위한 password가 home directory의 - 파일 (파일 이름이 "-")안에 저장되어있다고 한다.
ls 명령어를 통해 home directory안에 - 파일이 존재하는 것을 보았다.
cat 명령어를 통해 - 파일 안의 내용을 확인하면 되는데,
cat - 로 입력하게 되면 - 를 인수로 사용하는 것으로 보기 때문에 파일을 열 수 없다.
파일을 열려고한다면 전체 위치를 지정해 파일을 열어야한다.
따라서 cat ./- 로 입력하여야한다.
그렇게 - 파일 안의 내용을 확인해 보면 CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9 이 저장되어 있는것을 확인할 수 있다.
SSH 명령어를 사용하여 bandit2로 연결하고
$ ssh bandit2@bandit.labs.overthewire.org -p 2220
password에 CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9 를 입력하였다.
'2021 SCP Mentoring > OverTheWire: Bandit' 카테고리의 다른 글
OverTheWire: Level Goal: Bandit Level 4 → Level 5 풀이 (0) 2021.04.26 OverTheWire: Level Goal: Bandit Level 3 → Level 4 풀이 (0) 2021.04.25 OverTheWire: Level Goal: Bandit Level 2 → Level 3 풀이 (0) 2021.04.25 OverTheWire: Level Goal: Bandit Level 0 → Level 1 풀이 (0) 2021.04.25 OverTheWire: Level Goal: Bandit Level 0 풀이 (0) 2021.04.25