refactor: rename verify std to peb

This commit is contained in:
Dobin
2024-02-15 18:08:08 +00:00
parent abe757507b
commit 5a0e1f0fb9
+2 -4
View File
@@ -22,7 +22,6 @@ main_exe_file = os.path.join(build_dir, "main.exe")
main_shc_file = os.path.join(build_dir, "main.bin") main_shc_file = os.path.join(build_dir, "main.bin")
# ANSI escape sequences for colors # ANSI escape sequences for colors
class LogColors: class LogColors:
HEADER = '\033[95m' HEADER = '\033[95m'
@@ -34,7 +33,6 @@ class LogColors:
BOLD = '\033[1m' BOLD = '\033[1m'
UNDERLINE = '\033[4m' UNDERLINE = '\033[4m'
# Custom formatter to include colors in log output # Custom formatter to include colors in log output
class CustomFormatter(logging.Formatter): class CustomFormatter(logging.Formatter):
#format = "%(asctime)s - %(name)-12s - [%(levelname)-8s] - %(message)s (%(filename)s:%(lineno)d)" #format = "%(asctime)s - %(name)-12s - [%(levelname)-8s] - %(message)s (%(filename)s:%(lineno)d)"
@@ -53,7 +51,6 @@ class CustomFormatter(logging.Formatter):
formatter = logging.Formatter(log_fmt, datefmt="%Y-%m-%d %H:%M:%S") formatter = logging.Formatter(log_fmt, datefmt="%Y-%m-%d %H:%M:%S")
return formatter.format(record) return formatter.format(record)
# Configure logging # Configure logging
handler = logging.StreamHandler() handler = logging.StreamHandler()
handler.setFormatter(CustomFormatter()) handler.setFormatter(CustomFormatter())
@@ -83,7 +80,7 @@ def main():
project.try_start_final_shellcode = False project.try_start_final_shellcode = False
project.try_start_final_infected_exe = False project.try_start_final_infected_exe = False
if args.verify == "std": if args.verify == "peb":
project.source_style = SourceStyle.peb_walk project.source_style = SourceStyle.peb_walk
project.inject = True project.inject = True
project.inject_mode = "1,1" project.inject_mode = "1,1"
@@ -142,6 +139,7 @@ def start():
if project.exe_capabilities.has_all(): if project.exe_capabilities.has_all():
project.source_style = SourceStyle.iat_reuse project.source_style = SourceStyle.iat_reuse
else: else:
logger.info("--[ Some imports are missing for the shellcode to use IAT_REUSE")
project.source_style = SourceStyle.peb_walk project.source_style = SourceStyle.peb_walk
#observer.add_json("capabilities_a", project.exe_capabilities) #observer.add_json("capabilities_a", project.exe_capabilities)