# 解压所有样本文件
import zipfile

DIR = 'G:/malware_part1'
SAVE_DIR = ''

files = os.listdir(DIR)
print('files', files)
for file in files:
    zfile = zipfile.ZipFile(os.path.join(DIR, file), 'r')
    for filename in zfile.namelist():
        data = zfile.read(filename)
        file = open(os.path.join(SAVE_DIR, filename), 'w+b')
        file.write(data)
        file.close()