mirror of
https://github.com/dobin/SuperMega
synced 2026-06-03 01:27:11 +00:00
feature: sanity checks
This commit is contained in:
@@ -129,6 +129,15 @@ def start(settings: Settings) -> int:
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
def sanity_checks(settings):
|
||||||
|
if 'dll_loader' in settings.carrier_name:
|
||||||
|
if not settings.payload_path.endswith(".dll"):
|
||||||
|
raise Exception("dll loader requires a dll as payload, not shellcode")
|
||||||
|
else:
|
||||||
|
if not settings.payload_path.endswith(".bin"):
|
||||||
|
raise Exception("loader requires shellcode as payload, not DLL")
|
||||||
|
|
||||||
|
|
||||||
def start_real(settings: Settings):
|
def start_real(settings: Settings):
|
||||||
"""Main entry point for the application. This is where the magic happens (based on settings)"""
|
"""Main entry point for the application. This is where the magic happens (based on settings)"""
|
||||||
|
|
||||||
@@ -152,6 +161,9 @@ def start_real(settings: Settings):
|
|||||||
project.settings.plugin_guardrail)
|
project.settings.plugin_guardrail)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Tell user if they attempt to do something stupid
|
||||||
|
sanity_checks(project.settings)
|
||||||
|
|
||||||
# FIXUP DLL Payload
|
# FIXUP DLL Payload
|
||||||
# Prepare DLL payload for usage in dll_loader_change
|
# Prepare DLL payload for usage in dll_loader_change
|
||||||
# This needs to be done before rendering the C templates, as need
|
# This needs to be done before rendering the C templates, as need
|
||||||
|
|||||||
Reference in New Issue
Block a user