이미지를 보니 뭔가 점을 이으라는 의미같다.



이미지를 보고 소스를 보니... 좌표들이 찍혀있다.

아마 저 좌표를 다 이으라는 의미인 것 같다.



import Image, ImageDraw

first_arr = [146,399,163,403,170,393,169,391,166,386,170,381,170,371,170,355,169,346,167,335,170,329,170,320,170,
310,171,301,173,290,178,289,182,287,188,286,190,286,192,291,194,296,195,305,194,307,191,312,190,316,
190,321,192,331,193,338,196,341,197,346,199,352,198,360,197,366,197,373,196,380,197,383,196,387,192,
389,191,392,190,396,189,400,194,401,201,402,208,403,213,402,216,401,219,397,219,393,216,390,215,385,
215,379,213,373,213,365,212,360,210,353,210,347,212,338,213,329,214,319,215,311,215,306,216,296,218,
290,221,283,225,282,233,284,238,287,243,290,250,291,255,294,261,293,265,291,271,291,273,289,278,287,
279,285,281,280,284,278,284,276,287,277,289,283,291,286,294,291,296,295,299,300,301,304,304,320,305,
327,306,332,307,341,306,349,303,354,301,364,301,371,297,375,292,384,291,386,302,393,324,391,333,387,
328,375,329,367,329,353,330,341,331,328,336,319,338,310,341,304,341,285,341,278,343,269,344,262,346,
259,346,251,349,259,349,264,349,273,349,280,349,288,349,295,349,298,354,293,356,286,354,279,352,268,
352,257,351,249,350,234,351,211,352,197,354,185,353,171,351,154,348,147,342,137,339,132,330,122,327,
120,314,116,304,117,293,118,284,118,281,122,275,128,265,129,257,131,244,133,239,134,228,136,221,137,
214,138,209,135,201,132,192,130,184,131,175,129,170,131,159,134,157,134,160,130,170,125,176,114,176,
102,173,103,172,108,171,111,163,115,156,116,149,117,142,116,136,115,129,115,124,115,120,115,115,117,
113,120,109,122,102,122,100,121,95,121,89,115,87,110,82,109,84,118,89,123,93,129,100,130,108,132,110,
133,110,136,107,138,105,140,95,138,86,141,79,149,77,155,81,162,90,165,97,167,99,171,109,171,107,161,
111,156,113,170,115,185,118,208,117,223,121,239,128,251,133,259,136,266,139,276,143,290,148,310,151,
332,155,348,156,353,153,366,149,379,147,394,146,399]

second_arr = [156,141,165,135,169,131,176,130,187,134,191,140,191,146,186,150,179,155,175,157,168,157,163,157,159,
157,158,164,159,175,159,181,157,191,154,197,153,205,153,210,152,212,147,215,146,218,143,220,132,220,
125,217,119,209,116,196,115,185,114,172,114,167,112,161,109,165,107,170,99,171,97,167,89,164,81,162,
77,155,81,148,87,140,96,138,105,141,110,136,111,126,113,129,118,117,128,114,137,115,146,114,155,115,
158,121,157,128,156,134,157,136,156,136]

im = Image.open("good.jpg")

draw = ImageDraw.Draw(im)


for i in range(0, len(first_arr)-2, 2):
	a,b,c,d = first_arr[i:i+4]
	draw.line((a,b,c,d), fill=128, width=5)
	
for i in range(0, len(second_arr)-2, 2):
	a,b,c,d = second_arr[i:i+4]
	draw.line((a,b,c,d), fill=128, width=5)
	
# write to stdout
im.save("good.jpg")







cow라고 했더니 남자라고 한다. 

정답은 bull



'Challenge > Python Challenge' 카테고리의 다른 글

Python Challenge Level 9  (1) 2015.12.20
Python Challenge Level 8  (0) 2015.12.20
Python Challenge Level 7  (0) 2015.12.20
Python Challenge Level 6  (0) 2015.06.08
Python Challenge Level 5  (0) 2015.03.28
Python Challenge Level 4  (0) 2015.03.24
  1. 2016.03.11 08:17

    비밀댓글입니다




소스를 봤더니 good.html이라는 경로와 아래의 id,pw를 알려준다.

good.html에 접속하면 인증을 요구하는데 아래의 id와 pw를 입력해도 인증이 되지 않는다.




id와 pw에 공통적으로 들어있는 BZh91AY&SYA를 구글에 입력해보았다.

bz2 라이브러리를 이용해 압축된 값 임을 알 수 있다.

python을 이용해 bz2 압축을 풀어보자.



import bz2

un='BZh91AY&SYA\xaf\x82\r\x00\x00\x01\x01\x80\x02\xc0\x02\x00 \x00!\x9ah3M\x07<]\xc9\x14\xe1BA\x06\xbe\x084'
pw='BZh91AY&SY\x94$|\x0e\x00\x00\x00\x81\x00\x03$ \x00!\x9ah3M\x13<]\xc9\x14\xe1BBP\x91\xf08'

un = bz2.decompress(un)
pw = bz2.decompress(pw)

print "[+] ID -["+un+"]"
print "[+] PW -["+pw+"]"




'Challenge > Python Challenge' 카테고리의 다른 글

Python Challenge Level 9  (1) 2015.12.20
Python Challenge Level 8  (0) 2015.12.20
Python Challenge Level 7  (0) 2015.12.20
Python Challenge Level 6  (0) 2015.06.08
Python Challenge Level 5  (0) 2015.03.28
Python Challenge Level 4  (0) 2015.03.24





이것은 공기 중에 있다고 한다.
산소? 라고 생각해 게싱해보았다.




이미지가 하나 나오는데 가운데의 부분이 수상하다.
python으로 읽어서 ascii 코드로 변환해보니 아래와 같은 문자가 나왔고,
 그 문자의 숫자를 다시 ascii 코드로 변환해보니 key가 나왔다.

from PIL import Image, ImageStat
import re

im = Image.open('oxygen.png')

pixels = list(im.getdata())
width = im.size[0]
ex_r = 0
key = ""

for i in range(0,width,7):
	r,g,b,a = im.getpixel((i,45))  
	if(r==g==b): key += chr(r)
	ex_r = r
	
print "[+] Key is - ["+key+"]"

last_key = ""
last_key_arr = re.findall("\d+", key)
for ch in last_key_arr:
	last_key+=chr(int(ch))


print "[+] Key is - ["+last_key+"]"





'Challenge > Python Challenge' 카테고리의 다른 글

Python Challenge Level 9  (1) 2015.12.20
Python Challenge Level 8  (0) 2015.12.20
Python Challenge Level 7  (0) 2015.12.20
Python Challenge Level 6  (0) 2015.06.08
Python Challenge Level 5  (0) 2015.03.28
Python Challenge Level 4  (0) 2015.03.24



왠 지퍼 사진이 하나 나온다.

혹시나 해서 주소창에 channel.zip을 치니 파일이 다운받아 진다.

압축을 풀어보니 수많은 파일들과 readme.txt가 보인다.

start from 90052 라고 하니, 90052부터 따라가며 파일을 찾아보자.


# -*- coding: utf-8 -*-
import re

arr = ['90052']
list = []
while len(arr):
	f = open("C:\\Users\\Administrator\\Documents\\zairo\\python_chall\\6\\channel\\"+arr[-1]+".txt", 'r')
	list.append(arr[-1])
	data = f.read()
	print data
	arr = re.findall("[\d]+", data)
	f.close()





마지막에 Collect the comments 라고 해서 코멘트가 어디있는건지 찾다가 zip파일에 설명을 발견했다.




오른쪽에 설명이 있는 것을 보고 Python에서 저 설명을 읽어올 수 있는 방법을 찾다가 zipfile이라는 모듈을 이용해 comment를 읽어오는 방법을 찾아 아래와 같이 코딩했다.


# -*- coding: utf-8 -*-
import re
import zipfile

arr = ['90052']
list = []
while len(arr):
	f = open("C:\\Users\\Administrator\\Documents\\zairo\\python_chall\\6\\channel\\"+arr[-1]+".txt", 'r')
	list.append(arr[-1])
	data = f.read()
	print data
	arr = re.findall("[\d]+", data)
	f.close()

zf = zipfile.ZipFile("C:\\Users\\Administrator\\Documents\\zairo\\python_chall\\6\\channel.zip")
for i in list:
	print zf.getinfo(i+'.txt').comment,




'Challenge > Python Challenge' 카테고리의 다른 글

Python Challenge Level 8  (0) 2015.12.20
Python Challenge Level 7  (0) 2015.12.20
Python Challenge Level 6  (0) 2015.06.08
Python Challenge Level 5  (0) 2015.03.28
Python Challenge Level 4  (0) 2015.03.24
Python Challenge Level 3  (0) 2015.03.24



peak hell과 어감이 비슷하다고 하여 구글에 검색을 해본 결과 pickle이라는 모듈을 발견했다

pickle 모듈은 파이썬 객체를 문자열 등으로 바꾸어 저장할 필요 없이 파일로 바로 저장할수 있도록 해주는 것 이라고 한다.

banner.p가 피클링 되어있는 것은 아닌지 알아보기 위해 파이썬으로 다음과 같이 코딩하였다.


Preview (hint: you can copy and paste the preview into Microsoft Word):
Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import pickle
>>> f = open("D:\\us\\python\\5\\banner.p",'rb')
>>> read = pickle.load(f)
>>> print read
[[(' ', 95)], [(' ', 14), ('#', 5), (' ', 70), ('#', 5), (' ', 1)], [(' ', 15), ('#', 4), (' ', 71), ('#', 4), (' ', 1)], [(' ', 15), ('#', 4), (' ', 71), ('#', 4), (' ', 1)], [(' ', 15), ('#', 4), (' ', 71), ('#', 4), (' ', 1)], [(' ', 15), ('#', 4), (' ', 71), ('#', 4), (' ', 1)], [(' ', 15), ('#', 4), (' ', 71), ('#', 4), (' ', 1)], [(' ', 15), ('#', 4), (' ', 71), ('#', 4), (' ', 1)], [(' ', 15), ('#', 4), (' ', 71), ('#', 4), (' ', 1)], [(' ', 6), ('#', 3), (' ', 6), ('#', 4), (' ', 3), ('#', 3), (' ', 9), ('#', 3), (' ', 7), ('#', 5), (' ', 3), ('#', 3), (' ', 4), ('#', 5), (' ', 3), ('#', 3), (' ', 10), ('#', 3), (' ', 7), ('#', 4), (' ', 1)], [(' ', 3), ('#', 3), (' ', 3), ('#', 2), (' ', 4), ('#', 4), (' ', 1), ('#', 7), (' ', 5), ('#', 2), (' ', 2), ('#', 3), (' ', 6), ('#', 4), (' ', 1), ('#', 7), (' ', 3), ('#', 4), (' ', 1), ('#', 7), (' ', 5), ('#', 3), (' ', 2), ('#', 3), (' ', 5), ('#', 4), (' ', 1)], [(' ', 2), ('#', 3), (' ', 5), ('#', 3), (' ', 2), ('#', 5), (' ', 4), ('#', 4), (' ', 3), ('#', 3), (' ', 3), ('#', 4), (' ', 4), ('#', 5), (' ', 4), ('#', 4), (' ', 2), ('#', 5), (' ', 4), ('#', 4), (' ', 3), ('#', 3), (' ', 5), ('#', 3), (' ', 3), ('#', 4), (' ', 1)], [(' ', 1), ('#', 3), (' ', 11), ('#', 4), (' ', 5), ('#', 4), (' ', 3), ('#', 3), (' ', 4), ('#', 3), (' ', 4), ('#', 4), (' ', 5), ('#', 4), (' ', 2), ('#', 4), (' ', 5), ('#', 4), (' ', 2), ('#', 3), (' ', 6), ('#', 4), (' ', 2), ('#', 4), (' ', 1)], [(' ', 1), ('#', 3), (' ', 11), ('#', 4), (' ', 5), ('#', 4), (' ', 10), ('#', 3), (' ', 4), ('#', 4), (' ', 5), ('#', 4), (' ', 2), ('#', 4), (' ', 5), ('#', 4), (' ', 2), ('#', 3), (' ', 7), ('#', 3), (' ', 2), ('#', 4), (' ', 1)], [('#', 4), (' ', 11), ('#', 4), (' ', 5), ('#', 4), (' ', 5), ('#', 2), (' ', 3), ('#', 3), (' ', 4), ('#', 4), (' ', 5), ('#', 4), (' ', 2), ('#', 4), (' ', 5), ('#', 4), (' ', 1), ('#', 4), (' ', 7), ('#', 3), (' ', 2), ('#', 4), (' ', 1)], [('#', 4), (' ', 11), ('#', 4), (' ', 5), ('#', 4), (' ', 3), ('#', 10), (' ', 4), ('#', 4), (' ', 5), ('#', 4), (' ', 2), ('#', 4), (' ', 5), ('#', 4), (' ', 1), ('#', 14), (' ', 2), ('#', 4), (' ', 1)], [('#', 4), (' ', 11), ('#', 4), (' ', 5), ('#', 4), (' ', 2), ('#', 3), (' ', 4), ('#', 4), (' ', 4), ('#', 4), (' ', 5), ('#', 4), (' ', 2), ('#', 4), (' ', 5), ('#', 4), (' ', 1), ('#', 4), (' ', 12), ('#', 4), (' ', 1)], [('#', 4), (' ', 11), ('#', 4), (' ', 5), ('#', 4), (' ', 1), ('#', 4), (' ', 5), ('#', 3), (' ', 4), ('#', 4), (' ', 5), ('#', 4), (' ', 2), ('#', 4), (' ', 5), ('#', 4), (' ', 1), ('#', 4), (' ', 12), ('#', 4), (' ', 1)], [(' ', 1), ('#', 3), (' ', 11), ('#', 4), (' ', 5), ('#', 4), (' ', 1), ('#', 4), (' ', 5), ('#', 3), (' ', 4), ('#', 4), (' ', 5), ('#', 4), (' ', 2), ('#', 4), (' ', 5), ('#', 4), (' ', 2), ('#', 3), (' ', 12), ('#', 4), (' ', 1)], [(' ', 2), ('#', 3), (' ', 6), ('#', 2), (' ', 2), ('#', 4), (' ', 5), ('#', 4), (' ', 2), ('#', 3), (' ', 4), ('#', 4), (' ', 4), ('#', 4), (' ', 5), ('#', 4), (' ', 2), ('#', 4), (' ', 5), ('#', 4), (' ', 3), ('#', 3), (' ', 6), ('#', 2), (' ', 3), ('#', 4), (' ', 1)], [(' ', 3), ('#', 3), (' ', 4), ('#', 2), (' ', 3), ('#', 4), (' ', 5), ('#', 4), (' ', 3), ('#', 11), (' ', 3), ('#', 4), (' ', 5), ('#', 4), (' ', 2), ('#', 4), (' ', 5), ('#', 4), (' ', 4), ('#', 3), (' ', 4), ('#', 2), (' ', 4), ('#', 4), (' ', 1)], [(' ', 6), ('#', 3), (' ', 5), ('#', 6), (' ', 4), ('#', 5), (' ', 4), ('#', 2), (' ', 4), ('#', 4), (' ', 1), ('#', 6), (' ', 4), ('#', 11), (' ', 4), ('#', 5), (' ', 6), ('#', 3), (' ', 6), ('#', 6)], [(' ', 95)]]

형식을 보면 ' ', 95와 같이 공백이 95번 나온다는 의미로 해석되어 진다.

그럼 이제 피클링 되어있는 코드를 해석해보도록 하자.


>>> for string in read:
	result=""
	for char, num in string:
		result += char * num
	print result

	
                                                                                               
              #####                                                                      ##### 
               ####                                                                       #### 
               ####                                                                       #### 
               ####                                                                       #### 
               ####                                                                       #### 
               ####                                                                       #### 
               ####                                                                       #### 
               ####                                                                       #### 
      ###      ####   ###         ###       #####   ###    #####   ###          ###       #### 
   ###   ##    #### #######     ##  ###      #### #######   #### #######     ###  ###     #### 
  ###     ###  #####    ####   ###   ####    #####    ####  #####    ####   ###     ###   #### 
 ###           ####     ####   ###    ###    ####     ####  ####     ####  ###      ####  #### 
 ###           ####     ####          ###    ####     ####  ####     ####  ###       ###  #### 
####           ####     ####     ##   ###    ####     ####  ####     #### ####       ###  #### 
####           ####     ####   ##########    ####     ####  ####     #### ##############  #### 
####           ####     ####  ###    ####    ####     ####  ####     #### ####            #### 
####           ####     #### ####     ###    ####     ####  ####     #### ####            #### 
 ###           ####     #### ####     ###    ####     ####  ####     ####  ###            #### 
  ###      ##  ####     ####  ###    ####    ####     ####  ####     ####   ###      ##   #### 
   ###    ##   ####     ####   ###########   ####     ####  ####     ####    ###    ##    #### 
      ###     ######    #####    ##    #### ######    ###########    #####      ###      ######
                                                                                               
>>>


'Challenge > Python Challenge' 카테고리의 다른 글

Python Challenge Level 7  (0) 2015.12.20
Python Challenge Level 6  (0) 2015.06.08
Python Challenge Level 5  (0) 2015.03.28
Python Challenge Level 4  (0) 2015.03.24
Python Challenge Level 3  (0) 2015.03.24
Python Challenge Level 2  (0) 2015.03.24



페이지에 들어가서, 해당 이미지를 클릭하면 and the next nothing is 44827 라는 메세지와 게임이 시작된다.


이제 URL 뒤에 저기에 나온 숫자를 계속 입력하면 되는데, 몇십번을 입력해야하니 파이썬을 이용해 스크립트를 짜도록 하자.


필자는 다음과 같이 작성하였다.


Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import urllib2
>>> url = "http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing="
>>> key = "12345"
>>> request = urllib2.Request(url+key)
>>> response = urllib2.urlopen(request)
>>> data = response.read()
>>> data
'and the next nothing is 44827'
>>> import re
>>> while bool(re.search("[0-9]+", data)):
	request = urllib2.Request(url+str(re.findall("[0-9]+", data)[0]))
	response = urllib2.urlopen(request)
	data = response.read()
	print data

	
and the next nothing is 45439
<font color=red>Your hands are getting tired </font>and the next nothing is 94485
and the next nothing is 72198
and the next nothing is 80992
and the next nothing is 8880
and the next nothing is 40961
and the next nothing is 58765
and the next nothing is 46561
and the next nothing is 13418
and the next nothing is 41954
and the next nothing is 46782
and the next nothing is 92730
and the next nothing is 89229
and the next nothing is 25646
and the next nothing is 74288
and the next nothing is 25945
and the next nothing is 39876
and the next nothing is 8498
and the next nothing is 34684
and the next nothing is 62316
and the next nothing is 71331
and the next nothing is 59717
and the next nothing is 76893
and the next nothing is 44091
and the next nothing is 73241
and the next nothing is 19242
and the next nothing is 17476
and the next nothing is 39566
and the next nothing is 81293
and the next nothing is 25857
and the next nothing is 74343
and the next nothing is 39410
and the next nothing is 5505
and the next nothing is 27104
and the next nothing is 54003
and the next nothing is 23501
and the next nothing is 21110
and the next nothing is 88399
and the next nothing is 49740
and the next nothing is 31552
and the next nothing is 39998
and the next nothing is 19755
and the next nothing is 64624
and the next nothing is 37817
and the next nothing is 43427
and the next nothing is 15115
and the next nothing is 44327
and the next nothing is 7715
and the next nothing is 15248
and the next nothing is 61895
and the next nothing is 54759
and the next nothing is 54270
and the next nothing is 51332
and the next nothing is 63481
and the next nothing is 12362
and the next nothing is 94476
and the next nothing is 87810
and the next nothing is 6027
and the next nothing is 47551
and the next nothing is 79498
and the next nothing is 81226
and the next nothing is 4256
and the next nothing is 62734
and the next nothing is 25666
and the next nothing is 14781
and the next nothing is 21412
and the next nothing is 55205
and the next nothing is 65516
and the next nothing is 53535
and the next nothing is 4437
and the next nothing is 43442
and the next nothing is 91308
and the next nothing is 1312
and the next nothing is 36268
and the next nothing is 34289
and the next nothing is 46384
and the next nothing is 18097
and the next nothing is 9401
and the next nothing is 54249
and the next nothing is 29247
and the next nothing is 13115
and the next nothing is 23053
and the next nothing is 3875
and the next nothing is 16044
Yes. Divide by two and keep going.
>>> key = "8022"
>>> request = urllib2.Request(url+key)
>>> response = urllib2.urlopen(request)
>>> data = response.read()
>>> data
'and the next nothing is 25357'
>>> while bool(re.search("[0-9]+", data)):
	request = urllib2.Request(url+str(re.findall("[0-9]+", data)[0]))
	response = urllib2.urlopen(request)
	data = response.read()
	print data

	
and the next nothing is 89879
and the next nothing is 80119
and the next nothing is 50290
and the next nothing is 9297
and the next nothing is 30571
and the next nothing is 7414
and the next nothing is 30978
and the next nothing is 16408
and the next nothing is 80109
and the next nothing is 55736
and the next nothing is 15357
and the next nothing is 80887
and the next nothing is 35014
and the next nothing is 16523
and the next nothing is 50286
and the next nothing is 34813
and the next nothing is 77562
and the next nothing is 54746
and the next nothing is 22680
and the next nothing is 19705
and the next nothing is 77000
and the next nothing is 27634
and the next nothing is 21008
and the next nothing is 64994
and the next nothing is 66109
and the next nothing is 37855
and the next nothing is 36383
and the next nothing is 68548
and the next nothing is 96070
and the next nothing is 83051
and the next nothing is 58026
and the next nothing is 44726
and the next nothing is 35748
and the next nothing is 61287
and the next nothing is 559
and the next nothing is 81318
and the next nothing is 50443
and the next nothing is 1570
and the next nothing is 75244
and the next nothing is 56265
and the next nothing is 17694
and the next nothing is 48033
and the next nothing is 56523
and the next nothing is 51253
and the next nothing is 85750
and the next nothing is 42760
and the next nothing is 11877
and the next nothing is 15962
and the next nothing is 75494
and the next nothing is 87283
and the next nothing is 40396
and the next nothing is 49574
and the next nothing is 82682
There maybe misleading numbers in the 
text. One example is 82683. Look only for the next nothing and the next nothing is 63579

Traceback (most recent call last):
  File "<pyshell#16>", line 3, in <module>
    response = urllib2.urlopen(request)
  File "C:\Python27\lib\urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "C:\Python27\lib\urllib2.py", line 404, in open
    response = self._open(req, data)
  File "C:\Python27\lib\urllib2.py", line 422, in _open
    '_open', req)
  File "C:\Python27\lib\urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "C:\Python27\lib\urllib2.py", line 1214, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "C:\Python27\lib\urllib2.py", line 1184, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 10060] 연결된 구성원으로부터 응답이 없어 연결��지 못했거��,>
>>> 
>>> key = "63579"
>>> request = urllib2.Request(url+key)
>>> response = urllib2.urlopen(request)
>>> data = response.read()
>>> data
'and the next nothing is 37278'
>>> while bool(re.search("[0-9]+", data)):
	request = urllib2.Request(url+str(re.findall("[0-9]+", data)[0]))
	response = urllib2.urlopen(request)
	data = response.read()
	print data

	
and the next nothing is 53548
and the next nothing is 66081
and the next nothing is 67753
and the next nothing is 56337
and the next nothing is 3356
and the next nothing is 94525
and the next nothing is 89574
and the next nothing is 4413
and the next nothing is 82294
and the next nothing is 56060
and the next nothing is 95493
and the next nothing is 80865
and the next nothing is 66242
and the next nothing is 16065
and the next nothing is 62145
and the next nothing is 23147
and the next nothing is 83763
and the next nothing is 62381
and the next nothing is 76841
and the next nothing is 91706
and the next nothing is 9268
and the next nothing is 64814
and the next nothing is 80809
and the next nothing is 14039
and the next nothing is 73355
and the next nothing is 81905
and the next nothing is 36402
and the next nothing is 27221
and the next nothing is 79607
and the next nothing is 91763
and the next nothing is 11631
and the next nothing is 76396
and the next nothing is 69905
and the next nothing is 11073
and the next nothing is 71281
and the next nothing is 54345
and the next nothing is 19047
and the next nothing is 34376
and the next nothing is 3193
and the next nothing is 74258
and the next nothing is 62712
and the next nothing is 1823
and the next nothing is 21232
and the next nothing is 87890
and the next nothing is 21545
and the next nothing is 37136
and the next nothing is 23060
and the next nothing is 5385
and the next nothing is 4620
and the next nothing is 39111
and the next nothing is 35914
and the next nothing is 60310
and the next nothing is 19178
and the next nothing is 44671
and the next nothing is 45736
and the next nothing is 9216
and the next nothing is 12585
and the next nothing is 11302
and the next nothing is 33096
and the next nothing is 13967
and the next nothing is 57004
and the next nothing is 64196
and the next nothing is 73929
and the next nothing is 24800
and the next nothing is 25081
and the next nothing is 90033
and the next nothing is 45919
and the next nothing is 54827
and the next nothing is 73950
and the next nothing is 56978
and the next nothing is 8133
and the next nothing is 61900
and the next nothing is 47769
and the next nothing is 631
and the next nothing is 2284
and the next nothing is 60074
and the next nothing is 35959
and the next nothing is 57158
and the next nothing is 90990
and the next nothing is 27935
and the next nothing is 99927
and the next nothing is 41785
and the next nothing is 32660
and the next nothing is 4328
and the next nothing is 42067
and the next nothing is 8743
and the next nothing is 38613
and the next nothing is 21100
and the next nothing is 77864
and the next nothing is 6523
and the next nothing is 6927
and the next nothing is 82930
and the next nothing is 35846
and the next nothing is 31785
and the next nothing is 41846
and the next nothing is 72387
and the next nothing is 59334
and the next nothing is 65520
and the next nothing is 93781
and the next nothing is 55840
and the next nothing is 80842
and the next nothing is 59022
and the next nothing is 23298
and the next nothing is 27709
and the next nothing is 96791
and the next nothing is 75635
and the next nothing is 52899
and the next nothing is 66831
peak.html
>>>


'Challenge > Python Challenge' 카테고리의 다른 글

Python Challenge Level 6  (0) 2015.06.08
Python Challenge Level 5  (0) 2015.03.28
Python Challenge Level 4  (0) 2015.03.24
Python Challenge Level 3  (0) 2015.03.24
Python Challenge Level 2  (0) 2015.03.24
Python Challenge Level 1  (0) 2015.03.24



One small letter, surrounded by EXACTLY three big bodyguards on each of its sides.


문제를 보면 작은 문자 주위에 큰 세개의 보디가드가 있다고 한다.

이번문제도 페이지의 소스를 보면, 주석처리된 문자열이 있는데 해당 문제열을 a변수에 넣고 시작하자.


>>> arr = re.findall("[a-z]{1}[A-Z]{3}[a-z]{1}[A-Z]{3}[a-z]{1}", a)
>>> for i in arr: print i[4],

l i n k e d l i s t
>>>


'Challenge > Python Challenge' 카테고리의 다른 글

Python Challenge Level 5  (0) 2015.03.28
Python Challenge Level 4  (0) 2015.03.24
Python Challenge Level 3  (0) 2015.03.24
Python Challenge Level 2  (0) 2015.03.24
Python Challenge Level 1  (0) 2015.03.24
Python Challenge Level 0  (0) 2015.03.24

recognize the characters. maybe they are in the book, 
but MAYBE they are in the page source.


페이지 소스에 문자가 있을 수도 있다고 하여 소스를 보니 주석처리 되어있는 문자들이 있다.

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

또 그 문자들 앞에보면 위와 같이 힌트가 있는데, 해당 문자에서 레어한 문자를 찾으라고 한다.

a에 해당 문자열을 넣고 다음과 같이 하면 풀린다.


>>> for i in a:
	if i.isalpha():
		print i,

		
e q u a l i t y
>>>


'Challenge > Python Challenge' 카테고리의 다른 글

Python Challenge Level 5  (0) 2015.03.28
Python Challenge Level 4  (0) 2015.03.24
Python Challenge Level 3  (0) 2015.03.24
Python Challenge Level 2  (0) 2015.03.24
Python Challenge Level 1  (0) 2015.03.24
Python Challenge Level 0  (0) 2015.03.24


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를 한 값이다.

이를 파이썬을 이용하여 복호화 해보면 아래와 같이 나온다.



Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> from string import maketrans
>>> intab = "abcdefghijklmnopqrstuvwxyz"
>>> outtab = "cdefghijklmnopqrstuvwxyzab"
>>> trantab = maketrans(intab, outtab)
>>> st = "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."
>>> print st.translate(trantab);
i hope you didnt translate it by hand. thats what computers are for. doing it in by hand i
s inefficient and that's why this text is so long. using string.maketrans() is recommended
. now apply on the url.
>>>


문장을 읽어보면 이제 URL에도 적용해보라고 한다. 적용해보면 다음과 같다.


>>> st = 'map'
>>> print st.translate(trantab);
ocr
>>>


주소에 ocr.html로 접속하면 다음 문제로 넘어간다

'Challenge > Python Challenge' 카테고리의 다른 글

Python Challenge Level 5  (0) 2015.03.28
Python Challenge Level 4  (0) 2015.03.24
Python Challenge Level 3  (0) 2015.03.24
Python Challenge Level 2  (0) 2015.03.24
Python Challenge Level 1  (0) 2015.03.24
Python Challenge Level 0  (0) 2015.03.24


Hint: try to change the URL address.


Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> 2**38
274877906944L
>>>


힌트대로 주소에 274877906944.html를 입력하면 다음 문제로 넘어간다.

'Challenge > Python Challenge' 카테고리의 다른 글

Python Challenge Level 5  (0) 2015.03.28
Python Challenge Level 4  (0) 2015.03.24
Python Challenge Level 3  (0) 2015.03.24
Python Challenge Level 2  (0) 2015.03.24
Python Challenge Level 1  (0) 2015.03.24
Python Challenge Level 0  (0) 2015.03.24

+ Recent posts