keyword : qr코드 파싱
qr코드 이미지들이 가득한 파일이 제공되며, 하나의 산타 이미지도 주어진다.
여기서 주어지는 산타의 ID.png파일이 있는데 그 파일을 읽으면 Now I have Xavier in 1b3ff9ed24dfa790c7a3d68902cbdaee라는 메시지가 온다.
in 뒤에오는 숫자값은 다음 파일의 이름이다. 이제 쭉 읽으면 된다... 라고 생각하였으나 이상하게 중간에 핸드폰 qr코드로는 인식이 되지만, 파이썬 qrtools로는 제대로 파싱이 되지 않는 경우가 있어다.
해서 모든 qr코드에 대하여 조사를 하는 방법을 사용하였다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import qrtools import os santa_message = ['Santa Claus'] file_names = os.listdir('./') qr = qrtools.QR() for file_name in file_names: try: f=open(file_name,'rb') if qr.decode(f): message= qr.data santa_message.append(message) if "Now" not in message and "child" not in message and "almost" not in message and "Next" not in message and "kid" not in message : print message except Exception, e: pass | cs |
그러면 ㅕ기 goo.gl/wFGwqO를 얻을 수 있지만, 서버가 닫혀 있기 때문에 지금 flag값을 얻을 수는 없다.
'CTF | wargame' 카테고리의 다른 글
xiomara 2017 / (not) guilty boyfriend (이미지 분석, png 이미지 카빙 - Stegsolve) (0) | 2017.03.09 |
---|---|
bkp 2017 / prudentialv2 (sha1 해쉬 충돌 취약점) (0) | 2017.03.09 |
3DS CTF - Warmup (간단한 reversing) (0) | 2017.03.07 |
3DS CTF - Results does not matter (연산회로) (0) | 2017.03.07 |
3DS CTF - AlienAudio? (오디오 스펙트럼 분석) (0) | 2017.03.07 |