You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Thank you for this great library. I'm trying to use it for removing from the import table of a .dll all the references to another library. Here's what I wrote so far
importsysimportpefilepe=pefile.PE(
"./build/mxe/usr/x86_64-w64-mingw32.shared.posix.web/bin/libgio-2.0-0.dll"
)
kill=-1newlist=pe.DIRECTORY_ENTRY_IMPORTforidx, impinenumerate(pe.DIRECTORY_ENTRY_IMPORT):
if"libz1.dll"instr(imp.dll):
kill=idxbreakifkill<0:
print("libz1.dll not found among imported descriptors")
sys.exit()
print(kill)
delpe.DIRECTORY_ENTRY_IMPORT[kill]
pe.write("libgio-2.0-0.dll")
I thought this was enough for removing any reference to libz1.dll in the library libgio-2.0-0.dll, but it looks like pe.write is not able to make persistent this change, in fact, if I load ./libgio-2.0-0.dll I can still find this imported symbols.
What am I doing wrong? Is it something pefile can help me do?
Thanks!
The text was updated successfully, but these errors were encountered:
Hi! Thank you for this great library. I'm trying to use it for removing from the import table of a
.dll
all the references to another library. Here's what I wrote so farI thought this was enough for removing any reference to
libz1.dll
in the librarylibgio-2.0-0.dll
, but it looks likepe.write
is not able to make persistent this change, in fact, if I load./libgio-2.0-0.dll
I can still find this imported symbols.What am I doing wrong? Is it something pefile can help me do?
Thanks!
The text was updated successfully, but these errors were encountered: