def check_pe_header(filepath):
try:
pe = pefile.PE(filepath)
if (pe.DOS_HEADER.e_magic == int(0x5a4d) and pe.NT_HEADERS.Signature == int(0x4550)):
return True
except (pefile.PEFormatError):
return False
except(Exception) as e:
print("LOG - Something weird %s - %s" % (str(e), filepath))
return False
return False
评论列表
文章目录