-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception on unnamed exports #12
Comments
Hi macgeiger, can you send the sample to check the error? |
I can't share the actual file, but have found a similar one that creates the same issue. See attached. |
Ok, I have fixed it. Thanks for suggestion! |
And thank you for the quick response and, of course, peframe. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When processing a PE file with exports that are unnamed (referenced only by ordinal value), peframe will throw the following exception because func['function'] contains None.
File "/usr/lib/python2.7/site-packages/peframe-5.0-py2.7.egg/peframe/peframe.py", line 362, in stdoutput
print func['function'][0:15].ljust(15), func['address']
TypeError: 'NoneType' object has no attribute 'getitem'
Depending on where you want to address this, one solution would be around line 361:
for func in output['pe_info'][item]:
if func['function'] is None:
print "Unnamed export".ljust(15), func['address']
else:
print func['function'][0:15].ljust(15), func['address']
Thanks.
The text was updated successfully, but these errors were encountered: