[OverTheWire] bandit 5 -> 6

2025. 11. 22. 17:02·bandit

The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties:

  • human-readable
  • 1033 bytes in size (byte는 c로 변경하여 입력)
  • not executable

find 사용법

 

find [옵션] [경로] [표현식]

 

find . -size 1033c

  • find : 찾기 명령어
  • . : 현재 위치에서
  • -size :  옵션
  • 1033c : 1033byte를 찾기위한 표현식
name : 해당 이름의 파일 찾기
type : 지정된 파일 타입에 해당하는 파일 검색
user : 해당 유저에게 속한 파일 검색
empty : 빈 디렉토리 혹은 크기가 0인 파일 검색
delete : 검색된 파일 혹은 디렉토리 삭제
exec : 검색된 파일에 대해 추가 옵션을 사용하여 명령 실행
path : 지정된 문자열 패턴에 해당하는 경로에서 검색
print : 검색 결과를 출력
print0 : 검색 결과를 출력, 검색 항목은 
null로 구분
size : 파일 크기를 사용하여 파일 검색
mindepth : 검색을 시작할 하위 디렉토리 최소 깊이 지정
maxdepth : 검색할 하위 디렉토리의 최대 깊이 지정
atime : n일 이내에 액세스된 파일 찾기
ctime : n일 이내에 만들어진 파일 찾기
mtime : n일 이내에 수정된 파일 찾기
cnewer file : 해당 파일보다 최근에 수정된 파일 찾기
더보기
더보기
더보기

bandit5@bandit:~$ ls
inhere
bandit5@bandit:~$ cd inhere
bandit5@bandit:~/inhere$ ls
maybehere00  maybehere02  maybehere04  maybehere06  maybehere08  maybehere10  maybehere12  

maybehere14  maybehere16  maybehere18 maybehere01  maybehere03  maybehere05  maybehere07  

maybehere09  maybehere11  maybehere13  maybehere15  maybehere17  maybehere19
bandit5@bandit:~/inhere$ find . -size 1033
bandit5@bandit:~/inhere$ find . -size 1033c      (<-- 1033byte의 사이즈를 찾고 싶을 때 byte = c 로 입력)
./maybehere07/.file2                                             (<-- 여기에 있다네요)
bandit5@bandit:~/inhere$ cd ./maybehere07
bandit5@bandit:~/inhere/maybehere07$ ls
-file1  -file2  -file3  spaces file1  spaces file2  spaces file3
bandit5@bandit:~/inhere/maybehere07$ ls -a
.  ..  -file1  .file1  -file2  .file2  -file3  .file3  spaces file1  spaces file2  spaces file3
bandit5@bandit:~/inhere/maybehere07$ cat .file2
HWasnPhtq9AVKe0dmk45nxy20cvUa6EG

 

'bandit' 카테고리의 다른 글

[OverTheWire] bandit 7 -> 8  (0) 2025.11.22
[OverTheWire] bandit 6 -> 7  (0) 2025.11.22
[OverTheWire] bandit 4 -> 5  (0) 2025.11.22
[OverTheWire] bandit 3 -> 4  (0) 2025.11.22
[OverTheWire] bandit 2 -> 3  (0) 2025.11.22
'bandit' 카테고리의 다른 글
  • [OverTheWire] bandit 7 -> 8
  • [OverTheWire] bandit 6 -> 7
  • [OverTheWire] bandit 4 -> 5
  • [OverTheWire] bandit 3 -> 4
jokkams
jokkams
jokkams 님의 블로그 입니다.
  • jokkams
    jokkams 님의 블로그
    jokkams
  • 전체
    오늘
    어제
    • 분류 전체보기 (56)
      • 코드업 (8)
      • bandit (32)
      • 학교 (2)
      • 드림핵 (5)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    코드업
    100제
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.5
jokkams
[OverTheWire] bandit 5 -> 6
상단으로

티스토리툴바