보안/Bandit

[OverTheWire: Bandit] Level2->Level3

ghghdlt 2024. 5. 3. 18:43

#문제

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

홈 디렉토리에 spaces in this filename 이라는 파일에 비밀번호가 저장된다고 한다.

 

 

 

 

 

#풀이

 

1.cat ./* 이용

 

file ./* 으로 spaces in this filename은 아스키 코드라는 걸 알 수 있다

cat ./*으로 읽어주면 비번이 나온다.

 

2./ 로 띄어쓰기 표현

 

3." "으로 표현

 

 

 

-------------------

<사용한 명령어>

ls- 디렉토리 안의 파일 읽기

cat- 파일 안 모든 내용 확인

cat ./파일명 -현재 위치의 파일 내용 확인

cat ./* -아스키 코드로 된 파일 확인

/로 파일 띄어쓰기

"로 파일명 감싸기