[ Bandit Level 11 → Level 12 문제 리뷰 ]

Bandit Level 11 → Level 12
레벨 목표
다음 레벨을 위한 password는 data.txt 파일의 모든 소문자와 대문자가 13개 위치만큼 회전하는 곳에 있습니다
이 문제를 풀기 위해 필요할 수도 있는 명령어들
grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd
문제 해설
(1) 13개 위치만큼 회전하는 곳
13개 위치만큼 회전하는 곳이라는 말은 곧 카이사르(caesar) 암호의 알고리즘이라는 것이다.

위의 사진처럼 data.txt 파일의 내용도 13개 주기로 변환된 것이다.
(2) tr 명령어 사용하여 변환하기
tr이란 지정한 명령어를 변환시키거나 삭제하는 명령어다.
tr [옵션] [문자열1] [문자열2]
옵션 | 설명 |
-d | 문자열1에서 지정한 문자 삭제 |
-s | 문자열2에서 반복되는 문자 삭제 |
-t | 문자열1을 문자열2의 길이로 자르기 |

cat data.txt | tr 'N-ZA-Mn-za-m' 'A-Za-z' 를 살펴보자.
cat data.txt : data.txt 파일을 출력한다.
tr 'N-ZA-Mn-za-m' 'A-Za-z' : 대문자 N-A와 A-M, 소문자 n-z와 a-m 을 대문자 A-Z, 소문자 a-z 로 변환한다.
따라서 레벨 12를 위한 password는
5Te8Y4drgCRfCx8ugdwuEX8KFC6k2EUu
이다.
'OS > LINUX' 카테고리의 다른 글
Virtual Box에 Rocky Linux 설치하기 (0) | 2024.08.07 |
---|---|
우분투 Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 4327 (unattended-upgr) 에러 해결 방법 (0) | 2023.07.18 |
OverTheWire: Level Goal: Bandit Level 10 → Level 11 (0) | 2022.05.02 |
OverTheWire: Level Goal: Bandit Level 9 → Level 10 (0) | 2022.05.02 |
OverTheWire: Level Goal: Bandit Level 8 → Level 9 (0) | 2022.05.02 |