refactor: cleanup 3

This commit is contained in:
Dobin
2024-03-01 14:07:18 +00:00
parent 112964c11c
commit 9e551d9a19
8 changed files with 36 additions and 42 deletions
-2
View File
@@ -56,13 +56,11 @@ class MyPe():
def get_code_section_data(self) -> bytes:
sect = self.get_code_section()
print("CODE GET: {}".format(len(sect.get_data())))
return bytes(sect.get_data())
def write_code_section_data(self, data: bytes):
sect = self.get_code_section()
print("CODE SET {} {}".format(len(data), sect.PointerToRawData))
self.pe.set_bytes_at_offset(sect.PointerToRawData, data)