다음과 같은 암호(?)가 주어집니다.

We are given the following ciphertext(?).


처음에 보고 약간 멘붕에 빠졌던 문제.

A little confused after peeking at the problem.

수많은 wasd와 간혹 있는 e를 보고 제목의 의미를 알겠더군요.

A lot of "wasd"s and a few "e" made the name of the question clear. Nice!

wasd를 보니 키보드가 생각이 나서 w는 상, s는 하, a는 좌, d는 우 일 것 같다는 생각이 났어요.

I thought of the keyboard where w is up, s is down, a is left, d is right.

그래서 파이썬으로 그려봤습니다. 그런데 이상한 그림이 나오더군요.

So I drew it with python. But a little bizzare image came out.

import Image
s = open('sawed.txt', 'rt').read()

new = Image.new('RGB', (5000,5000),'white')

x = 2500
y = 2500
for i in s:
	if i=='d':
		x += 1
	elif i=='s':
		y += 1
	elif i=='a':
		x -= 1
	elif i=='w':
		y -= 1
	new.putpixel((x,y), (0,0,0))
new.show()

정체를 알 수가 없어서 PWNIOC>TPS7 등 여러 가지를 시도해보았으나 fail..

Couldn't understand what it said, so I tried a couple of things like PWNIOC>TPS7 but all failed..

그래서 admin에게 마지막 글자가 1인지 7인지 물어봤는데 둘 다 아니라고 하더군요.

So I asked admin whether the last character is 1 or 7, but he replied it is neither.

그리고 모두 대문자인지 물어보니, e를 무시하지말라고 하셨어요.

And I asked them if they're all big letters, and he said "don't ignore the significance of e".

그래서 팀원들에게 뭘지 막 물어보다가, e는 일종의 스위치 역할을 한다는 것을 알아냈습니다.

So I bothered my teammates asking about e, and found out that it acts like a kind of switch.

즉, 처음에 e가 나오면 그리는 것을 멈추고 커서만 이동합니다. 그리고 다시 e가 나오면 그리기 시작하고요.

That is, when you meet e for the first time, you stop drawing and just move cursor. And when you meet e again, you start drawing.

그렇게 그림을 그리니 다음과 같이 깔끔하게 글자가 나오는 것을 확인했습니다.

So I drew like that and nice and clear image came out.

import Image
s = open('sawed.txt', 'rt').read()

new = Image.new('RGB', (5000,5000),'white')

x = 2500
y = 2500
ignore = False
for i in s:
	if i=='e':
		ignore = not ignore
	if i=='d':
		x += 1
	elif i=='s':
		y += 1
	elif i=='a':
		x -= 1
	elif i=='w':
		y -= 1
	if not ignore:new.putpixel((x,y), (0,0,0))
new.show()


Flag: PWNING>FPS!

+ Recent posts