mirror of
https://github.com/dobin/SuperMega
synced 2026-06-02 17:27:10 +00:00
refactor: more consistent log output indent
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ logger = logging.getLogger("Assembler")
|
||||
|
||||
def asm_to_shellcode(asm_in: FilePath, build_exe: FilePath) -> bytes:
|
||||
"""Takes ASM source file asm_in, compiles it into build_exe, extracts its code section and write into shellcode_out"""
|
||||
logger.info("--[ Assemble to exe: {} -> {}".format(asm_in, build_exe))
|
||||
logger.info("-[ Assemble to exe: {} -> {}".format(asm_in, build_exe))
|
||||
run_process_checkret([
|
||||
config.get("path_ml64"),
|
||||
asm_in,
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ def compile_dev(
|
||||
asm_out: FilePath,
|
||||
short_call_patching: bool = False,
|
||||
):
|
||||
logger.info("--( Compile C to ASM: {} -> {} ".format(c_in, asm_out))
|
||||
logger.info("-( Compile C to ASM: {} -> {} ".format(c_in, asm_out))
|
||||
|
||||
# Compile C To Assembly (text)
|
||||
run_process_checkret([
|
||||
@@ -54,7 +54,7 @@ def compile(
|
||||
carrier: Carrier,
|
||||
settings: Settings,
|
||||
):
|
||||
logger.info("--[ Compile C to ASM: {} -> {} ".format(c_in, asm_out))
|
||||
logger.info("-[ Compile C to ASM: {} -> {} ".format(c_in, asm_out))
|
||||
|
||||
# Compile C To Assembly (text)
|
||||
run_process_checkret([
|
||||
|
||||
+3
-3
@@ -23,7 +23,7 @@ def inject_exe(carrier_shc: bytes, settings: Settings, carrier: Carrier, payload
|
||||
exe_out = settings.inject_exe_out
|
||||
carrier_invoke_style: CarrierInvokeStyle = settings.carrier_invoke_style
|
||||
|
||||
logger.info("--[ Injecting: into {} -> {}".format(exe_in, exe_out))
|
||||
logger.info("-[ Injecting: into {} -> {}".format(exe_in, exe_out))
|
||||
|
||||
# CHECK if shellcode fits into the target code section
|
||||
carrier_shc_len = len(carrier_shc)
|
||||
@@ -42,7 +42,7 @@ def inject_exe(carrier_shc: bytes, settings: Settings, carrier: Carrier, payload
|
||||
# skip available
|
||||
addr = superpe.get_vaddr_of_iatentry(iatRequest.name)
|
||||
if addr != None:
|
||||
logger.info(" Request IAT {} is available at 0x{:X}".format(
|
||||
logger.info("---[ Request IAT {} is available at 0x{:X}".format(
|
||||
iatRequest.name, addr))
|
||||
continue
|
||||
iat_name = superpe.get_replacement_iat_for("KERNEL32.dll", iatRequest.name)
|
||||
@@ -98,7 +98,7 @@ def inject_exe(carrier_shc: bytes, settings: Settings, carrier: Carrier, payload
|
||||
shellcode_rva = align_to_page_size(shellcode_rva, carrier_shc_len - len(payload.payload_data))
|
||||
carrier_shc_offset = superpe.pe.get_offset_from_rva(shellcode_rva)
|
||||
|
||||
logger.info("---( Inject: Write Carrier to 0x{:X} (0x{:X})".format(
|
||||
logger.info("--[ Inject: Write Carrier to 0x{:X} (0x{:X})".format(
|
||||
shellcode_rva, carrier_shc_offset))
|
||||
|
||||
# Copy the shellcode
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ def get_template_names() -> List[str]:
|
||||
|
||||
|
||||
def create_c_from_template(settings: Settings, payload_len: int):
|
||||
logger.info("--( Create C from template: {} -> {}".format(
|
||||
logger.info("-( Create C from template: {} -> {}".format(
|
||||
PATH_DECODER, settings.main_c_path))
|
||||
plugin_decoder = ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user