Created
January 25, 2017 11:32
-
-
Save Sh1n0g1/a44a7c2ec3d79bf92d0d2e3bbd3e8737 to your computer and use it in GitHub Desktop.
Get the matching result of UserDB.txt(PEid) using pefile
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 sys | |
import peutils | |
import pefile | |
try: | |
pe = pefile.PE(sys.argv[1]) | |
signatures = peutils.SignatureDatabase('./sig/userdb.txt') | |
matches = signatures.match_all(pe, ep_only = True) | |
if type(matches) is list: | |
for m in matches: | |
print m | |
else: | |
print "['Unmached']" | |
except Exception as e: | |
print e | |
sys.exit(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment