refactor: cleanup 1

This commit is contained in:
Dobin
2024-03-01 13:13:40 +00:00
parent d0500107c0
commit 78027916e2
7 changed files with 95 additions and 128 deletions
+10
View File
@@ -7,6 +7,7 @@ from model.defs import *
import peparser.pehelper as pehelper
from peparser.superpe import SuperPe
from peparser.misc import get_physical_address
from model.carrier import Carrier
logger = logging.getLogger("ExeHost")
@@ -169,3 +170,12 @@ class ExeHost():
gap_start -= 1
return max_gap - 1, gap_start, gap_end
def has_all_carrier_functions(self, carrier: Carrier):
is_ok = True
for iat_entry in carrier.iat_requests:
addr = self.get_vaddr_of_iatentry(iat_entry.name)
if addr == 0:
logging.info("---( Function not available as import: {}".format(iat_entry.name))
is_ok = False
return is_ok
-3
View File
@@ -14,7 +14,6 @@ class Settings():
self.short_call_patching: bool = False
# Injectable
self.inject: bool = False
self.inject_mode: int = 2
self.inject_exe_in: FilePath = ""
self.inject_exe_out: FilePath = ""
@@ -22,8 +21,6 @@ class Settings():
# Debug
self.show_command_output = False
self.verify: bool = False
self.try_start_loader_shellcode: bool = False
self.try_start_final_shellcode: bool = False
self.try_start_final_infected_exe: bool = False
self.cleanup_files_on_start: bool = True
self.cleanup_files_on_exit: bool = True