티스토리 뷰

Wargame/OverTheWire

[Bandit] Level 2

do9dark 2016. 2. 2. 01:25

Level Goal

다음 레벨로 넘어갈 수 있는 패스워드가 들어있는 파일의 이름에 spaces가 들어가 있을 경우에 접근하는 방법


ls 명령어를 이용해보면 파일 이름이 spaces in this filename인 파일이 있는 것을 볼 수 있다.

$ ls -l

앞에서 했던 것과 동일하게 cat 명령어를 이용해서 파일명을 그대로 입력해주면 공백에 의해서 각각 하나의 파일로 인식하게 되어 해당 파일을 정상적으로 처리할 수가 없게된다.

$ cat spaces in this filename

따라서, 공백을 구분자가 아니라 일반 문자의 공백으로 처리하기 위해서 \를 앞에 붙여주면 간단하게 처리할 수 있다.

$ cat spaces\ in\ this\ filename


다른방법:

$ cat s*


bandit3:UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK

'Wargame > OverTheWire' 카테고리의 다른 글

[Bandit] Level 9  (0) 2016.02.02
[Bandit] Level 8  (0) 2016.02.02
[Bandit] Level 7  (0) 2016.02.02
[Bandit] Level 6  (0) 2016.02.02
[Bandit] Level 5  (0) 2016.02.02
[Bandit] Level 4  (0) 2016.02.02
[Bandit] Level 3  (0) 2016.02.02
[Bandit] Level 1  (0) 2016.02.01
[Bandit] Level 0  (0) 2016.01.31
[Bandit] Index  (0) 2016.01.29
댓글
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
링크
공지사항
Total
Today
Yesterday