mirror of
https://github.com/dobin/SuperMega
synced 2026-06-02 17:27:10 +00:00
refactor: fix a bug and cleanup
This commit is contained in:
@@ -132,8 +132,12 @@ class SuperPe():
|
||||
iat[dll_name].append(IatEntry(dll_name, imp_name, imp_addr))
|
||||
return iat
|
||||
|
||||
|
||||
def write_code_section_data(self, data: bytes):
|
||||
sect = self.get_code_section()
|
||||
if len(data) != sect.SizeOfRawData:
|
||||
logger.error(f'New code section data is larger than the original! {len(data)} != {sect.SizeOfRawData}')
|
||||
return
|
||||
self.pe.set_bytes_at_offset(sect.PointerToRawData, data)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user