소스보기에 나오는 이상한 값들에 대해 구글링 해보니 Bz compress다. decompress해보자
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 un
print pw

'Wargame > pythonchallenge' 카테고리의 다른 글

pythonchallenge LEVEL 6  (0) 2017.04.14
pythonchallenge LEVEL 5  (0) 2017.04.12
pythonchallenge LEVEL 4  (0) 2017.04.12
pythonchallenge LEVEL 3  (0) 2017.04.12
pythonchallenge LEVEL 2  (0) 2017.04.12
import re

def read_file(input):
    f = open("C:/Users/Administrator/Downloads/"+input+".txt", 'r')
    dat = f.read()
    f.close()
    return dat
        
num = "".join(re.findall("[0-9]",read_file("90052"))) #start!

for i in range(910):
    if "Next nothing is" in read_file(num):
        num = "".join(re.findall("[0-9]",read_file(num)))
        print "[*] text : " + num
    else:
        print read_file(num)
        break
# -*- coding:utf-8 -*-
import re
import zipfile

def read_file(input):
    f = open("C:/Users/Administrator/Downloads/"+input+".txt", 'r')
    dat = f.read()
    f.close()
    return dat

def append_num(num):
    num_list = []
    for i in range(910):
        if "Next nothing is" in read_file(num):
            num = "".join(re.findall("[0-9]",read_file(num)))
            num_list.append(num)
        else:
            break
    return num_list

def Main():
    num = "90052"
    result = ""
    zip_file = zipfile.ZipFile("C:/Users/Administrator/Downloads/channel.zip")
    num_list = append_num(num)

    for i in num_list:
        result += zip_file.getinfo(i+'.txt').comment
    print result

if __name__ == "__main__":
    Main()

'Wargame > pythonchallenge' 카테고리의 다른 글

pythonchallenge LEVEL 8  (0) 2017.04.15
pythonchallenge LEVEL 5  (0) 2017.04.12
pythonchallenge LEVEL 4  (0) 2017.04.12
pythonchallenge LEVEL 3  (0) 2017.04.12
pythonchallenge LEVEL 2  (0) 2017.04.12
import urllib
import pickle

url = "http://www.pythonchallenge.com/pc/def/banner.p"

res = urllib.urlopen(url).read()
dat = pickle.loads(res)

for line in dat:
    string = ""
    for cnt in range(len(line)):
        char = line[cnt][0]
        for n in range(line[cnt][1]):
            string += char
    print string

'Wargame > pythonchallenge' 카테고리의 다른 글

pythonchallenge LEVEL 8  (0) 2017.04.15
pythonchallenge LEVEL 6  (0) 2017.04.14
pythonchallenge LEVEL 4  (0) 2017.04.12
pythonchallenge LEVEL 3  (0) 2017.04.12
pythonchallenge LEVEL 2  (0) 2017.04.12
import urllib2
import urllib2
import re

def http_conn(param):
    url = "http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing="
    req = urllib2.Request(url+param)
    res = urllib2.urlopen(req).read()
    return res

param = "".join(re.findall("[0-9]",http_conn("8022")))
for i in range(400):
    if "and the next nothing is" in http_conn(param):
        param = "".join(re.findall("[0-9]",http_conn(param)))
        print "[*] "+"".join(re.findall("[0-9]",http_conn(param)))
    else:
        print http_conn(param)
        break


'Wargame > pythonchallenge' 카테고리의 다른 글

pythonchallenge LEVEL 6  (0) 2017.04.14
pythonchallenge LEVEL 5  (0) 2017.04.12
pythonchallenge LEVEL 3  (0) 2017.04.12
pythonchallenge LEVEL 2  (0) 2017.04.12
pythonchallenge LEVEL 1  (0) 2017.04.12
import re

dat = """
""" # input value

print "".join(re.findall("[^A-Z]+[A-Z]{3}([a-z])[A-Z]{3}[^A-Z]+", dat))


'Wargame > pythonchallenge' 카테고리의 다른 글

pythonchallenge LEVEL 5  (0) 2017.04.12
pythonchallenge LEVEL 4  (0) 2017.04.12
pythonchallenge LEVEL 2  (0) 2017.04.12
pythonchallenge LEVEL 1  (0) 2017.04.12
pythonchallenge LEVEL 0  (0) 2017.04.12
import re

dat = """
""" # input value

print "".join(re.findall("[A-Za-z]", data))

'Wargame > pythonchallenge' 카테고리의 다른 글

pythonchallenge LEVEL 5  (0) 2017.04.12
pythonchallenge LEVEL 4  (0) 2017.04.12
pythonchallenge LEVEL 3  (0) 2017.04.12
pythonchallenge LEVEL 1  (0) 2017.04.12
pythonchallenge LEVEL 0  (0) 2017.04.12
from string import maketrans

intab = "abcdefghijklmnopqrstuvwxyz"
outtab = "cdefghijklmnopqrstuvwxyzab"
trantab = maketrans(intab,outtab)
string = "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 string.translate(trantab)

'Wargame > pythonchallenge' 카테고리의 다른 글

pythonchallenge LEVEL 5  (0) 2017.04.12
pythonchallenge LEVEL 4  (0) 2017.04.12
pythonchallenge LEVEL 3  (0) 2017.04.12
pythonchallenge LEVEL 2  (0) 2017.04.12
pythonchallenge LEVEL 0  (0) 2017.04.12

>> 2**38

274877906944


solve => http://www.pythonchallenge.com/pc/def/274877906944.html

'Wargame > pythonchallenge' 카테고리의 다른 글

pythonchallenge LEVEL 5  (0) 2017.04.12
pythonchallenge LEVEL 4  (0) 2017.04.12
pythonchallenge LEVEL 3  (0) 2017.04.12
pythonchallenge LEVEL 2  (0) 2017.04.12
pythonchallenge LEVEL 1  (0) 2017.04.12

+ Recent posts