Created
January 17, 2020 07:24
-
-
Save hacksysteam/241327f3a1d6271f55b4a4c1e022be58 to your computer and use it in GitHub Desktop.
Dump Exports from DLL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import pefile | |
if __name__ == "__main__": | |
filename = sys.argv[1] | |
pe = pefile.PE(filename, fast_load=True) | |
pe.parse_data_directories(directories=pefile.DIRECTORY_ENTRY["IMAGE_DIRECTORY_ENTRY_EXPORT"]) | |
print "Dumping exports for: {0}".format(os.path.basename(filename)) | |
print "" | |
exports = [e.name for e in pe.DIRECTORY_ENTRY_EXPORT.symbols] | |
for export in exports: | |
print export |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment