naksyn / PythonMemoryModule

pure-python implementation of MemoryModule technique to load dll and unmanaged exe entirely from memory
Apache License 2.0
292 stars 45 forks source link

fixes issues with MemoryModule function #2

Closed rkbennett closed 1 year ago

rkbennett commented 1 year ago

This is related to #1, caused by in invalid function reference in pefile, and also some string type issues, when running in python 3.10. This imports pythonmemorymodule.ordlookup as ordlookup to address the first issue. For the second, I added a check to see if ordinal had the decode method, and only attempts decode if it does. Then I added an explicit cast to LPCSTR, which should allow compatibility regardless of the value types are returned by importordinal.

naksyn commented 1 year ago

Thank you for you contribution @rkbennett, much appreciated!