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

+ Recent posts