Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
for infile in glob.glob( os.path.join(pathname, '*.dll') ):
pe = pefile.PE(infile, fast_load=True)
f.write("\n" + str(infile))
if pe.OPTIONAL_HEADER.DATA_DIRECTORY[pefile.DIRECTORY_ENTRY['IMAGE_DIRECTORY_ENTRY_IMPORT']].VirtualAddress == 0:
print "nope"
else:
pe.parse_data_directories(directories=[pefile.DIRECTORY_ENTRY['IMAGE_DIRECTORY_ENTRY_IMPORT']])
for entry in pe.DIRECTORY_ENTRY_IMPORT:
f.write("\n".join(child_dll))
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.