Search results for 'Level2'

  1. 2009.08.17 -- pythonchallenge level2
  2. 2009.08.17 -- pythonchallenge level1

pythonchallenge level2

2009. 8. 17. 20:34

level 2 : http://www.pythonchallenge.com/pc/def/ocr.html
--------------------------------------------------------------------------
Hint :
recognize the characters. maybe they are in the book,
but MAYBE they are in the page source.

--------------------------------------------------------------------------
웹페이지의 소스를 보니  특수문자들로 보이는 엄청 긴 문자열이 있고

<!--
find rare characters in the mess below:
-->

라는 주석을 볼 수 있다.

특수 문자들 사이에 있는 알파릭 문자들을 뽑아내 보았다.


str = """%%$@_$^__#)^....."""

answer = ''i=0
while 1:
 if ord(str[i]) > 96 and ord(str[i]) < 123: answer += str[i]
 i+=1
 if i == len(str): break
print answer 


숨어있는 문자들은 equality

http://www.pythonchallenge.com/pc/def/equality.html

'War game > pythonchallenge' 카테고리의 다른 글

pythonchallenge level11  (0) 2009.10.22
pythonchallenge level10  (0) 2009.10.20
pythonchallenge level9  (0) 2009.10.16
pythonchallenge level8  (0) 2009.10.16
pythonchallenge level7  (0) 2009.10.16
python challenge level6  (0) 2009.09.21
python challenge level5  (0) 2009.08.27
pythonchallenge level4  (0) 2009.08.20
pythonchallenge level3  (0) 2009.08.19
pythonchallenge level1  (0) 2009.08.17

badcob War game/pythonchallenge

pythonchallenge level1

2009. 8. 17. 18:26

사이트 url은 이곳이며 level1은 여기를 클릭.

everybody thinks twice before solving this.

g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj.

위와 같은 글귀와

K -> M
O -> Q
E -> G

라고 적혀진 노트를 볼 수 있다. 아스키 코드를 2씩 증가시키므로 

......
    word += chr(ord(txt[i])+ 2)
  i+=1
  if i == length : break
 return word

이런식으로 만들어서 디코딩을 해봤더니 아래와 같은 문장을 볼 수 있었다.
-----------------------------------------------------------------------------------------------
i hope you didnt translate it by hand. thats what computers are for. doing it in
 by hand is inefficient and that's why this text is so long. using string.maketr
ans() is recommended. now apply on the url
------------------------------------------------------------------------------------------------
그냥 끝내기가 멋적어서 string.maketrans를 써서 다시 만든 코드.


import string

def decode_str(txt):
 word = ''
 firstchar = string.uppercase + string.lowercase
 secondchar = '{'+'}'
 move_str1 = string.maketrans(firstchar, "CDEFGHIJKLMNOPQRSTUVWXYZ[\cdefghijklmnopqrstuvwxyz{}") 
 move_str2 = string.maketrans(secondchar,"ab")
 word = txt.translate(move_str1) 
 return word.translate(move_str2)

str = "g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj"
#str = "http://www.pythonchallenge.com/pc/def/map.html"

answer = ''
answer = decode_str(str)
print answer


힌트를 따라서 url에 적용한뒤 주소창에 입력. (map.html)
http://www.pythonchallenge.com/pc/def/ocr.jvon

Have you ever heard of jvon files !?

jvon 확장자라..들어본적 없다. 구글링을 해봐도 나오지 않았다;
혹시나해서 ocr.html로 입력했더니 level2 페이지를 볼 수 있었다.
http://www.pythonchallenge.com/pc/def/ocr.html

'War game > pythonchallenge' 카테고리의 다른 글

pythonchallenge level11  (0) 2009.10.22
pythonchallenge level10  (0) 2009.10.20
pythonchallenge level9  (0) 2009.10.16
pythonchallenge level8  (0) 2009.10.16
pythonchallenge level7  (0) 2009.10.16
python challenge level6  (0) 2009.09.21
python challenge level5  (0) 2009.08.27
pythonchallenge level4  (0) 2009.08.20
pythonchallenge level3  (0) 2009.08.19
pythonchallenge level2  (0) 2009.08.17

badcob War game/pythonchallenge