본문 바로가기

[Wargame Write-up]/Yoire

[Yoire] [crypt] xor/1_chall_easy.php

내용을 번역하면, "Convert the solution that is encrypted with a XOR key to get the answer to this challenge."이 된다.




key에 들어가는 값이 20을 16진수로 변환한 12인지, 20인지 때문에 좀 헤맸다.




두 경우 모두 해봤는데 20을 키 값으로 하는 것이 맞았다.


1
2
3
4
5
6
7
8
 
xored = "m{a4s{`4}`5"
result = ""
 
for idx in range(len(xored)):
    result += chr(ord(xored[idx]) ^ 20)
 
print(result)
cs



실행하면 인증 키가 출력된다.




출력된 값을 입력하면,




Clear~