Created
August 22, 2018 21:52
-
-
Save geekscrapy/427aae1fea7e63658a9ee2ee2189cd7e to your computer and use it in GitHub Desktop.
Retrieve language properties from a PE
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 lief, os, sys | |
path = sys.argv[1] | |
fnames = os.listdir(path) | |
for f in fnames: | |
print('****** : {}{}'.format(path, f)) | |
exebin = lief.parse(filepath=path+f) | |
if exebin.has_resources: | |
res = exebin.resources | |
res_manager = exebin.resources_manager | |
print(res_manager.langs_available, res_manager.sublangs_available) | |
if res_manager.has_manifest: | |
print(res_manager.manifest) | |
if res_manager.has_version: | |
v = res_manager.version | |
print(v) | |
if res_manager.has_icons: | |
for icon in res_manager.icons: | |
print((icon.lang), icon.sublang) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment