Crypt 4번째 문제이다.
Caesar 아니면, 치환 문제일 것이다.
Caesar를 돌려봤는데, 제대로 된 문장이 안나온다. 후자인 듯 하다.
바로 알 수 있는 단어부터 시작해보자.
1
2
3
4
5
6
7
8 |
ciphertext = "Dc, gdcl cl h lcrcshn ckqh gz sqwqs guz."
ciphertext += " Gdcl gcrq qhyd sqggqn cl hllcomqk h ljqycacqk nqshgczmldcj ucgd hmzgdqn sqggqn. Jhll: cdhwqancqmkl"
# jhll -> pass
ciphertext = ciphertext.upper().replace('J', 'p').replace('H', 'a').replace('L', 's')
print ciphertext
|
cs |
처음부터 꽤 많은 글자들이 바뀌었다.
다음 Cs
1
2
3
4
5
6
7
8
9
10
11 |
ciphertext = "Dc, gdcl cl h lcrcshn ckqh gz sqwqs guz."
ciphertext += " Gdcl gcrq qhyd sqggqn cl hllcomqk h ljqycacqk nqshgczmldcj ucgd hmzgdqn sqggqn. Jhll: cdhwqancqmkl"
# jhll -> pass
ciphertext = ciphertext.upper().replace('J', 'p').replace('H', 'a').replace('L', 's')
# Cs -> is
ciphertext = ciphertext.replace('C', 'i')
print ciphertext
|
cs |
문장이 슬슬 보이기 시작한다.
GDis
1
2
3
4
5
6
7
8
9
10
11
12
13
14 |
ciphertext = "Dc, gdcl cl h lcrcshn ckqh gz sqwqs guz."
ciphertext += " Gdcl gcrq qhyd sqggqn cl hllcomqk h ljqycacqk nqshgczmldcj ucgd hmzgdqn sqggqn. Jhll: cdhwqancqmkl"
# jhll -> pass
ciphertext = ciphertext.upper().replace('J', 'p').replace('H', 'a').replace('L', 's')
# Cs -> is
ciphertext = ciphertext.replace('C', 'i')
# GDis -> this
ciphertext = ciphertext.replace('G', 't').replace('D', 'h')
print ciphertext
|
cs |
NQSatiZMship, Uith
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 |
ciphertext = "Dc, gdcl cl h lcrcshn ckqh gz sqwqs guz."
ciphertext += " Gdcl gcrq qhyd sqggqn cl hllcomqk h ljqycacqk nqshgczmldcj ucgd hmzgdqn sqggqn. Jhll: cdhwqancqmkl"
# jhll -> pass
ciphertext = ciphertext.upper().replace('J', 'p').replace('H', 'a').replace('L', 's')
# Cs -> is
ciphertext = ciphertext.replace('C', 'i')
# GDis -> this
ciphertext = ciphertext.replace('G', 't').replace('D', 'h')
# NQSatiZMship -> relationship, Uith -> with
ciphertext = ciphertext.replace('N', 'r').replace('Q', 'e').replace('S', 'l').replace('Z', 'o').replace('M', 'n').replace('U', 'w')
print ciphertext
|
cs |
siRilar, iKea, leWel, eaYh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 |
ciphertext = "Dc, gdcl cl h lcrcshn ckqh gz sqwqs guz."
ciphertext += " Gdcl gcrq qhyd sqggqn cl hllcomqk h ljqycacqk nqshgczmldcj ucgd hmzgdqn sqggqn. Jhll: cdhwqancqmkl"
# jhll -> pass
ciphertext = ciphertext.upper().replace('J', 'p').replace('H', 'a').replace('L', 's')
# Cs -> is
ciphertext = ciphertext.replace('C', 'i')
# GDis -> this
ciphertext = ciphertext.replace('G', 't').replace('D', 'h')
# NQSatiZMship -> relationship, Uith -> with
ciphertext = ciphertext.replace('N', 'r').replace('Q', 'e').replace('S', 'l').replace('Z', 'o').replace('M', 'n').replace('U', 'w')
# siRilar -> similar, iKea -> idea, leWel -> level, eaYh -> each
ciphertext = ciphertext.replace('R', 'm').replace('K', 'd').replace('W', 'v').replace('Y', 'c')
print ciphertext
|
cs |
마지막이다. assiOned, A를 바꿔주자.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 |
ciphertext = "Dc, gdcl cl h lcrcshn ckqh gz sqwqs guz."
ciphertext += " Gdcl gcrq qhyd sqggqn cl hllcomqk h ljqycacqk nqshgczmldcj ucgd hmzgdqn sqggqn. Jhll: cdhwqancqmkl"
# jhll -> pass
ciphertext = ciphertext.upper().replace('J', 'p').replace('H', 'a').replace('L', 's')
# Cs -> is
ciphertext = ciphertext.replace('C', 'i')
# GDis -> this
ciphertext = ciphertext.replace('G', 't').replace('D', 'h')
# NQSatiZMship -> relationship, Uith -> with
ciphertext = ciphertext.replace('N', 'r').replace('Q', 'e').replace('S', 'l').replace('Z', 'o').replace('M', 'n').replace('U', 'w')
# siRilar -> similar, iKea -> idea, leWel -> level, eaYh -> each
ciphertext = ciphertext.replace('R', 'm').replace('K', 'd').replace('W', 'v').replace('Y', 'c')
# assiOned -> assigned, A -> f
ciphertext = ciphertext.replace('O', 'g').replace('A', 'f')
print ciphertext
|
cs |
모든 대문자가 소문자로 바뀌면서, 패스워드를 보여준다.
'[Wargame Write-up] > HackThis!!' 카테고리의 다른 글
[HackThis!!] [BASIC+] LEVEL 4 (0) | 2016.12.25 |
---|---|
[HackThis!!] [BASIC+] LEVEL 3 (0) | 2016.12.25 |
[HackThis!!] [CRYPT] LEVEL 3 (0) | 2016.12.22 |
[HackThis!!] [CRYPT] LEVEL 2 (0) | 2016.12.22 |
[HackThis!!] [CRYPT] LEVEL 1 (0) | 2016.12.21 |