Can pefile get the function names in ordinal imports mode ?

42 views
Skip to first unread message

Romain Carré

unread,
Jun 28, 2008, 5:46:53 AM6/28/08
to pefile
Good morning everybody.

I've used pefile for several weeks, and I am surprised
to discover that this useful tool is not able to get
the names of functions imported by their ordinal. Then
I decided to write a few lines of code, and to suggest
you to check it and add it to the existing version.
I hope you will have time to take a look at it, I would
be very pleased to use this new feature in the next
release (considering that I need it for my work). :)

Thank you very much.

Mr Romain CARRÉ
Computer Scientist in France
romain.c...@enseirb.fr

PS : at http://cyberax51.free.fr/pefile/ you can find :

- a shell script to patch the existing version of pefile.py
- the diff file containing information to patch pefile.py
- the html version of the diff file, for you to understand easier

Michael

unread,
Sep 11, 2012, 9:40:36 PM9/11/12
to pef...@googlegroups.com
Hi, Romain,
I recently found the problem of pefile what you said in your post.
Do you have any solution for this, because my case is like yours, I need to get the symbol name which imported by ordinals.
Thanks in advance!

Best Regards
Michael

Michael

unread,
Sep 18, 2012, 6:57:43 PM9/18/12
to pef...@googlegroups.com
Hi, Romain,
I have searched your past post, and successfully fix this issues, but still I also found that the solution just work for:  DIRECTORY_ENTRY_IMPORT, and did not work for DIRECTORY_ENTRY_DELAY_IMPORT in pefile library.
Then I wonder if these two import tables need different solutions?
I would appreciated you greatly, if I can get your suggestions.

Best Regards
Michael

ronin

unread,
Nov 14, 2012, 6:18:54 PM11/14/12
to pef...@googlegroups.com
Romain, do you still have this patch available somewhere? The link you posted is a 404 at the moment.
Thank you

ronin

unread,
Nov 14, 2012, 6:20:16 PM11/14/12
to pef...@googlegroups.com
Actually Micheal, do you still have the patch? I cant find it.
Thanks

Lin Feng

unread,
Nov 15, 2012, 2:01:26 PM11/15/12
to pef...@googlegroups.com
Hi, Ronin
I have the patch, please see the attachment.
PS: I placed the original html file in the attachment, and you can read it before you use it. Meanwhile, the original patch maybe works under Windows (because the pefile author give us the general solution), and will not work under Linux. However, you can revise it so that it can also work under Linux. And I made it to let it work for DIRECTORY_ENTRY_IMPORT, but it still did not work for DIRECTORY_ENTRY_DELAY_IMPORT in pefile library.

Then if you have any suggestion, please let me know.
Thanks in advance.

Best Regards
Michael


--
You received this message because you are subscribed to the Google Groups "pefile" group.
To view this discussion on the web visit https://groups.google.com/d/msg/pefile/-/_aCy2o3VufIJ.

To post to this group, send email to pef...@googlegroups.com.
To unsubscribe from this group, send email to pefile+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pefile?hl=en.



--
Best Regards
Linfeng Liu


pefile-oridnal.tar.gz
Reply all
Reply to author
Forward
0 new messages