refactor: remove DataRefStyle

This commit is contained in:
Dobin
2024-04-14 18:19:31 +01:00
parent d4e4507e19
commit 4fb7b9f88e
4 changed files with 2 additions and 7 deletions
-4
View File
@@ -29,10 +29,6 @@ class DecoderStyle(Enum):
XOR_1 = "xor_1"
class DataRefStyle(Enum):
APPEND = 1
class CarrierInvokeStyle(Enum):
ChangeEntryPoint = "change AddressOfEntryPoint"
BackdoorCallInstr = "hijack branching instruction in entrypoint"
-1
View File
@@ -11,7 +11,6 @@ class Settings():
# Settings
self.source_style: FunctionInvokeStyle = FunctionInvokeStyle.peb_walk
self.decoder_style: DecoderStyle = DecoderStyle.XOR_1
self.dataref_style: DataRefStyle = DataRefStyle.APPEND
self.short_call_patching: bool = False
self.dllfunc: str = "" # For DLL injection
+1 -1
View File
@@ -225,7 +225,7 @@ class SuperPe():
return res
def get_exports_full(self):
def get_exports_full(self) -> List[Dict]:
"""Return a list of exported functions (names) from the PE file"""
d = [pefile.DIRECTORY_ENTRY["IMAGE_DIRECTORY_ENTRY_EXPORT"]]
self.pe.parse_data_directories(directories=d)
+1 -1
View File
@@ -160,7 +160,7 @@ def start_real(settings: Settings):
shellcode_out = settings.main_shc_path)
# Merge: shellcode/loader with payload (SHC + PAYLOAD -> SHC)
if settings.dataref_style == DataRefStyle.APPEND:
if True:
phases.assembler.merge_loader_payload(
shellcode_in = settings.main_shc_path,
shellcode_out = settings.main_shc_path,