The password for the next level is stored in the file data.txt, where all lowercase (a-z) and uppercase (A-Z) letters have been rotated by 13 positions
tr 옵션
- -d : 문자열1 에서 지정한 문자를 삭제
- -s : 문자열2에서 반복되는 문자를 삭제
- -t : 문자열1을 문자열 2의 길이로 자른다
문자열 정렬 문제라서 sort 나 uniq를 사용해야하는줄 알았는데 두 명령어 다 행을 중심으로 정렬을 진행하기 때문에 해당 문제와 같이 한 줄로 된 문자열을 정렬하기 위해서는 tr 명령어 사용이 필요했다
더보기
bandit11@bandit:~$ cat data.txt
Gur cnffjbeq vf 7k16JArUVv5LxVuJfsSVdbbtaHGlw9D4
bandit11@bandit:~$ cat data.txt | tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
The password is 7x16WNeHIi5YkIhWsfFIqoognUTyj9Q4
'bandit' 카테고리의 다른 글
| [OverTheWire] bandit 19 -> 20 (0) | 2025.11.22 |
|---|---|
| [OverTheWire] bandit 12 -> 13 (0) | 2025.11.22 |
| [OverTheWire] bandit 10 -> 11 (0) | 2025.11.22 |
| [OverTheWire] bandit 9 -> 10 (0) | 2025.11.22 |
| [OverTheWire] bandit 8 -> 9 (0) | 2025.11.22 |