728x90
반응형
1. intro
2. code 및 분석
2.1. code
2.2. 분석
리버싱을 위해 하는 크립토 공부.
가입부터 크립토를 요구한다 ㅋㅋㅋ
Roman emperor's cipher는 Ceasar cipher를 이야기하며,
아래 링크와 같이 shift cipher다.
https://en.wikipedia.org/wiki/Caesar_cipher
Caesar cipher - Wikipedia
From Wikipedia, the free encyclopedia Simple and widely known encryption technique The action of a Caesar cipher is to replace each plaintext letter with a different one a fixed number of places down the alphabet. The cipher illustrated here uses a left sh
en.wikipedia.org
단순하기에 고민할 필요가 없다.
코딩만 잘 하면 된다.
3. exploit
몇번째 shift인지 알 수 없으니 A~Z까지 다 해서 정상적인 단어만 찾으면 된다.
e = 'DWZLOKD SQNOGX FZQLDMS BQNTBG'
d = ''
for i in range(1,24):
for j in range(len(e)):
if ord(e[j]) == 0x20:
d += e[j]
else:
check = ord(e[j]) + i
if check > 0x5a:
d += chr(check - 0x5a + 0x40)
else:
d += chr(check)
print(d)
d = ''
728x90
반응형
'Wargame > Cryptohack' 카테고리의 다른 글
Base64 (0) | 2023.01.31 |
---|---|
Hex (0) | 2023.01.31 |
ASCII (0) | 2023.01.31 |
Great Snakes (0) | 2023.01.31 |
Finding Flags (0) | 2023.01.31 |