문제
The password for the next level is stored in the file data.txt and is the only line of text that occurs only once
## 문제 요구사항
비밀번호는 data.txt 파일. 한 번만 나타나는 유일한 텍스트 줄.
## 내가 사용한 명령어
ssh bandit8@bandit.labs.overthewire.org -p 2220
sort data.txt | uniq -u
## 왜 이 명령어를 골랐는가
sort 반복된 줄 연속하게 정렬 (기본-오름차순 / sort -r은 내림차순)
uniq -u 중복된 줄 하나로 압축 1번 나온 줄만 출력
## 어떤 시행착오를 겪었는가
sort data.txt | uniq → 중복된 줄 하나로 압축해서 출력
sort data.txt | uniq -u → 딱 1번 나온 줄만 출력(유일한 줄)

'Security > OverTheWire' 카테고리의 다른 글
| Bandit Level 10 → Level 11 (base64) (0) | 2025.12.01 |
|---|---|
| Bandit Level 9 → Level 10 (strings) (0) | 2025.12.01 |
| Bandit Level 7 → Level 8 (grep) (0) | 2025.12.01 |
| Bandit Level 6 → Level 7 (find, 2>/dev/null) (0) | 2025.12.01 |
| Bandit Level 5 → Level 6 (find 권한 검색) (1) | 2025.12.01 |