ui: nicer output

This commit is contained in:
Dobin
2024-02-19 20:06:52 +00:00
parent ab80be8a3d
commit bf310ca343
3 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -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
View File
@@ -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
+4
View File
@@ -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()