mirror of
https://github.com/dobin/SuperMega
synced 2026-06-02 17:27:10 +00:00
refactor: remove DataRefStyle
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
@@ -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
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user