def __init__(self, filepath):
self.path = filepath
self.filename = os.path.basename(filepath)
self.stream = open(filepath, 'r').read()
if magic.Magic(mime=True).from_file(filepath) == 'application/x-dosexec':
try:
self.pe = pefile.PE(filepath)
self.pedict = self.pe.dump_dict()
except Exception as excp:
print('Failed processing %s') % filepath
# Magic
评论列表
文章目录