Skip to content
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

Unable to open PE files #20

Closed
chubbymaggie opened this issue May 18, 2015 · 1 comment
Closed

Unable to open PE files #20

chubbymaggie opened this issue May 18, 2015 · 1 comment

Comments

@chubbymaggie
Copy link

Hi,

I am unable to load pe files. The reason is that pe.sections[section_idx].get_data() always returns null. But after going through pefile library, I fixed the problem by givng the virtualaddress as the parameter for get_data().
This is the fix:
self._section_text = pe.sections[section_idx].get_data(pe.sections[section_idx].VirtualAddress)

This hack works fine for me now . I don't know whether this is correct?

Thanks.

Regards,
Maggie

@cnheitman
Copy link
Collaborator

Hi,

Regarding your hack, it seems to be correct.

I try it with several PE files and I couldn't reproduce your problem. Also, I check what get_data was loading with and without passing parameters and, in both cases, it's the same.

Cheers,
Christian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants