Skip to content

Instantly share code, notes, and snippets.

@albertzsigovits
Created April 1, 2019 07:56
Show Gist options
  • Save albertzsigovits/6434cd1c248a0f6107d7065253feaa47 to your computer and use it in GitHub Desktop.
Save albertzsigovits/6434cd1c248a0f6107d7065253feaa47 to your computer and use it in GitHub Desktop.
PE section hash generator
import pefile, os
for filename in os.listdir(os.getcwd()):
try:
pe = pefile.PE(filename)
print('Analyzing: ',filename)
for sect in pe.sections:
print(str(sect.Name),' ',str(sect.get_hash_md5()))
print('----------------------------------------------------------------')
except pefile.PEFormatError:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment