refactor: make nicer ui, web, log

This commit is contained in:
Dobin
2024-03-08 11:09:31 +00:00
parent c990a6699d
commit 215e24ffe0
11 changed files with 60 additions and 74 deletions
+1 -3
View File
@@ -216,8 +216,6 @@ Trailing {sect_name} bytes:
for ins in trampoline.split(';'):
logger.info(f'\t{ins.strip()}')
logger.info('')
return (trampoline, addrOffset)
@@ -245,7 +243,7 @@ Trailing {sect_name} bytes:
self.compiledTrampoline = encoding
self.compiledTrampolineCount = count
logger.info('Successfully backdoored entry point with jump/call to shellcode')
logger.debug('Successfully backdoored entry point with jump/call to shellcode')
return instr.address
return 0
-2
View File
@@ -178,8 +178,6 @@ class SuperPe():
if self.arch == 'x64':
imageBaseRelocType = SuperPe.IMAGE_REL_BASED_DIR64
logger.info('Adding new relocations to backdoored PE file...')
relocsSize = self.pe.OPTIONAL_HEADER.DATA_DIRECTORY[SuperPe.IMAGE_DIRECTORY_ENTRY_BASERELOC].Size
relocsIndex = self.getSectionIndexByDataDir(SuperPe.IMAGE_DIRECTORY_ENTRY_BASERELOC)
addr = self.pe.OPTIONAL_HEADER.DATA_DIRECTORY[SuperPe.IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress