자 오늘은 Level 2 -> 3을 해보도록 하겠다.
(level2 -> 3의 로그인 아이디는 bandit2 이고, 비밀번호는 263JGJPfgU6LtdEvgfWU1XP5yac29mFx 이다.)
1. 문제 내용
https://overthewire.org/wargames/bandit/bandit3.html
OverTheWire: Level Goal
We're hackers, and we are good-looking. We are the 1%. <!-- Please read and accept the Rules! --> Level Goal The password for the next level is stored in a file called spaces in this filename located in the home directory Commands you may need to solve thi
overthewire.org
Home directory 에 있는 space 가 포함된 파일을 열어서 확인하라고 한다.
2. 문제 풀이
-> ls 를 입력하여 파일 이름을 확인해 보니 spaces in this filename 이라고 나온다.
space 가 포함된 파일을 여는 방법은 여러 가지가 있는데, 두 개 정도만 알아보자.
1. 백슬래쉬 (\) 를 이용한 방법 (백슬래쉬는 escape 문자라고 한다.)
cat spaces\ in\ this\ filename
2. 작은 따옴표( ' ) 를 이용하는 방법 (추천)
cat 'spaces in this filename'
백슬래쉬보다는 작은 따옴표가 더 좋은 것 같다. 이걸 이용해라.
3. 요약
-> 스페이스가 포함된 파일을 읽어올 때는 cat '파일명' 을 하면 되겠다!
'해킹&보안' 카테고리의 다른 글
[반딧 워게임 : OvertheWire] Level 5 -> 6 (리눅스/해킹/보안 공부) (0) | 2025.03.13 |
---|---|
[반딧 워게임 : OvertheWire] Level 4->5 (리눅스/해킹/보안 공부) (0) | 2025.03.13 |
[반딧 워게임 : OvertheWire] Level 3->4 (리눅스/해킹/보안 공부) (0) | 2025.03.13 |
[반딧 워게임 : OvertheWire] Level 1 -> 2 (리눅스/해킹/보안 공부) (0) | 2025.03.13 |
반딧 워게임 ( OverTheWire: Bandit ) Level 0 시작하기 (리눅스 공부) (0) | 2025.03.13 |