mirror of
https://github.com/dobin/SuperMega
synced 2026-06-03 01:27:11 +00:00
ui: nicer output
This commit is contained in:
@@ -93,7 +93,7 @@ class ExeInfo():
|
|||||||
for func_name in needs:
|
for func_name in needs:
|
||||||
addr = pehelper.get_addr_for(self.iat, func_name)
|
addr = pehelper.get_addr_for(self.iat, func_name)
|
||||||
if addr == 0:
|
if addr == 0:
|
||||||
logging.warn("Not available as import: {}".format(func_name))
|
logging.info("Not available as import: {}".format(func_name))
|
||||||
is_ok = False
|
is_ok = False
|
||||||
return is_ok
|
return is_ok
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -15,8 +15,7 @@ def extract_code_from_exe(exe_file: FilePath) -> bytes:
|
|||||||
section = get_code_section(pe)
|
section = get_code_section(pe)
|
||||||
data: bytes = section.get_data()
|
data: bytes = section.get_data()
|
||||||
data = remove_trailing_null_bytes(data)
|
data = remove_trailing_null_bytes(data)
|
||||||
logger.info(" > 0x{:X} Code Size: {} (code section size: {})".format(
|
logger.info("---[ Extract code section size: {} / {}".format(
|
||||||
section.VirtualAddress,
|
|
||||||
len(data), section.Misc_VirtualSize))
|
len(data), section.Misc_VirtualSize))
|
||||||
pe.close()
|
pe.close()
|
||||||
return data
|
return data
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ def create_c_from_template(
|
|||||||
plugin_decoder = ""
|
plugin_decoder = ""
|
||||||
plugin_executor = ""
|
plugin_executor = ""
|
||||||
|
|
||||||
|
logger.info("--[ Create C from template: {} {} {} {} {}".format(
|
||||||
|
source_style, alloc_style, exec_style, decoder_style, payload_len
|
||||||
|
))
|
||||||
|
|
||||||
filepath = "plugins/allocator/{}.c".format(alloc_style.value)
|
filepath = "plugins/allocator/{}.c".format(alloc_style.value)
|
||||||
with open(filepath, "r", encoding='utf-8') as file:
|
with open(filepath, "r", encoding='utf-8') as file:
|
||||||
plugin_allocator = file.read()
|
plugin_allocator = file.read()
|
||||||
|
|||||||
Reference in New Issue
Block a user