Bandit

22.01.23 level 11→12. tr 'A-Za-z' 'N-ZA-Mn-za-m'

슈팅스타제제 2022. 1. 23. 14:51

cat data.txt

이게 뭐신고? 

문제에 나와있는 힌트 문서를 읽어보니 알파벳 26글자를 반으로 나눠서 13개씩 반대로 rotated한 것이었다. 

참고문서에 따르면 tr 명령어를 사용해서 문자열 변환을 할 수 있었다. 

Gur을 보고 아 tr 명령어를 써서 이것도 13씩 로테이션되는거를 바꿔야 하는구나 깨달았다. 

cat data.txt | tr 'A-Za-z' 'N-ZA-Mn-za-m'

A로 시작해서 Z로 끝나는 알파벳 순서와는 다르게 N부터 시작해서 Z로 끝나고 다시 A부터 M까지 끝나는 순서로 rotated를 바꿔버리겠다 라는 뜻이다. 

5Te8Y4drgCRfCx8ugdwuEX8KFC6k2EUu

굿

 

참고문서링크 

https://en.wikipedia.org/wiki/ROT13#tr

 

ROT13 - Wikipedia

Simple encryption method ROT13 replaces each letter by its partner 13 characters further along the alphabet. For example, HELLO becomes URYYB (or, conversely, URYYB becomes HELLO again). ROT13 ("rotate by 13 places", sometimes hyphenated ROT-13) is a simpl

en.wikipedia.org