feature: make exe to UI

This commit is contained in:
Dobin
2024-05-05 13:38:08 +01:00
parent 8ae738b841
commit 2c9a20d822
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -120,6 +120,12 @@ class SuperPe():
self.pe.set_bytes_at_offset(sect.PointerToRawData, data)
def patch_subsystem(self):
if self.pe.OPTIONAL_HEADER.Subsystem != pefile.SUBSYSTEM_TYPE['IMAGE_SUBSYSTEM_WINDOWS_GUI']:
logger.info("EXE is not a GUI application. Patching subsystem to GUI")
self.pe.OPTIONAL_HEADER.Subsystem = pefile.SUBSYSTEM_TYPE['IMAGE_SUBSYSTEM_WINDOWS_GUI']
## PE Specific Information
def get_base_relocs(self) -> List[PeRelocEntry]: