mirror of
https://github.com/dobin/SuperMega
synced 2026-06-03 01:27:11 +00:00
refactor: cleanup, create unittest, fix get_physical_address
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ def inject_exe(
|
||||
# Special case. put it at the beginning of the exported DLL function
|
||||
logger.info("--[ Overwrite DLL function {} with shellcode".format(settings.dllfunc))
|
||||
rva = pe_backdoorer.getExportEntryPoint(settings.dllfunc)
|
||||
shellcode_offset = superpe.get_physical_address2(rva)
|
||||
shellcode_offset = superpe.get_physical_address(rva)
|
||||
logger.info(f'---[ Using DLL Export "{settings.dllfunc}" at RVA 0x{rva:X} offset 0x{shellcode_offset:X} to overwrite')
|
||||
superpe.pe.set_bytes_at_offset(shellcode_offset, main_shc)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user