소스보기에 나오는 이상한 값들에 대해 구글링 해보니 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

+ Recent posts