Level 4 → Level 5

옥영진·2020년 5월 15일
0

Bandit - OverTheWire

목록 보기
5/33

Level 4 → Level 5

목표

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.

Commands you may need to solve this level
ls, cd, cat, file, du, find

다음 레벨로 가는 패스워드는 inhere 디렉토리 내에 사람이 읽을 수 있는 파일 형태로 되어 있다고 한다.

해결

cd ~/inhere
ls -al

inhere 디렉토리로 가서 ls -al 명령어를 통해 inhere 디렉토리 내에 존재하는 파일 목록들을 출력한다. 파일명이 -file00 부터 -file09 까지 총 10개의 파일이 존재한다.

file ./*
cat ./-file07

file 명령어를 통해 모든 파일들의 정보를 출력해 보면 다른 파일들은 data 파일인데, -file07 파일명을 가진 파일이 ASCII text 파일임을 알 수 있다. cat 명령어를 통해 해당 파일 내용을 출력하면 다음 레벨로 가는 패스워드를 얻을 수 있다.

profile
안녕하세요 함께 공부합시다

0개의 댓글