From ae859766c1e678ec96ddfaacd7398ce6fac03f83 Mon Sep 17 00:00:00 2001 From: Dobin Date: Sat, 3 Feb 2024 22:38:44 +0000 Subject: [PATCH] refactor: small fix --- supermega.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/supermega.py b/supermega.py index fe374ba..75614c3 100644 --- a/supermega.py +++ b/supermega.py @@ -39,11 +39,12 @@ options_default = { } +# VERIFY # This will verify if our loader works # - Use it on a "target" machine # - payload shellcode will create a file c:\temp\a # - set: verify=True -options_test = { +options_verify = { "payload": "shellcodes/createfile.bin", "verify": True, @@ -66,7 +67,7 @@ options_test = { } -options = options_test +options = options_verify def main(): @@ -89,14 +90,15 @@ def main(): # SGN seems buggy atm #if options["obfuscate_shc_loader"]: - # obfuscate_shc_loader("main-clean.bin", "main-clean-sgn.bin") + # obfuscate_shc_loader("main-clean.bin", "main-clean.bin") # - # if options["test_obfuscated_shc"]: - # test_shellcode("main-clean-sgn.bin") + # if options["verify"]: + # if not verify_shellcode("main-clean.bin"): + # return if options["dataref_style"] == DataRefStyle.APPEND: with open("main-clean.bin", 'rb') as input1: - data_stager = remove_trailing_null_bytes(input1.read()) + data_stager = input1.read() with open(options["payload"], 'rb') as input2: data_payload = input2.read() @@ -112,7 +114,8 @@ def main(): if options["verify"]: print("--[ Verify final shellcode ]") - verify_shellcode("main-clean-append.bin") + if not verify_shellcode("main-clean-append.bin"): + return if options["exec_final_shellcode"]: print("--[ Test Append shellcode ]")