From 244884bd2d373cecb783135eca51da8530d5f078 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Wed, 15 Dec 2021 05:03:53 -0500 Subject: sploit: Add startup banner This just adds a fancy 'SPLOIT' header to the beginning of Sploit's startup preamble data. It has the ability to display a few lines of text beside itself, but most of the things we've planned to put here are not available yet, so just the operating mode is printed for now. The SPLOIT text has a colored stripe which, at the moment, also indicates the operating mode. This stripe was originally chosen to balance out the amount of color present in the preamble text, but I've grown to like it. Signed-off-by: Malfurious Signed-off-by: dusoleil --- tools/sploit/sploit/main.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'tools/sploit') diff --git a/tools/sploit/sploit/main.py b/tools/sploit/sploit/main.py index 0a34429..e6c9bb3 100644 --- a/tools/sploit/sploit/main.py +++ b/tools/sploit/sploit/main.py @@ -6,6 +6,16 @@ import traceback from sploit.comm import * from sploit.log import * +def print_banner(color, line1='', line2='', line3=''): + ilog() + ilog(' ░▒█▀▀▀█░▒█▀▀█░▒█░░░░▒█▀▀▀█░▀█▀░▀▀█▀▀ ', end='', color=ALT) + ilog(line1, color=ALT) + ilog(' ░░▀▀▀▄▄░▒█▄▄█░▒█░░░░▒█░░▒█░▒█░░░▒█░░ ', end='', color=color) + ilog(line2, color=ALT) + ilog(' ░▒█▄▄▄█░▒█░░░░▒█▄▄█░▒█▄▄▄█░▄█▄░░▒█░░ ', end='', color=ALT) + ilog(line3, color=ALT) + ilog() + def main(): parser = ArgumentParser(description='Execute Sploit script against target') parser.add_argument('script', help='Exploit script to run') @@ -18,7 +28,7 @@ def main(): pipe(args.script) def pipe(script): - ilog("Running in Pipe Mode...") + print_banner(ERROR, line3='Pipe Mode') with tempfile.TemporaryDirectory() as tmpdir: while(True): try: @@ -29,7 +39,7 @@ def pipe(script): del p def target(script, target): - ilog("Running in Target Mode...") + print_banner(STATUS, line3='Subprocess Mode') runscript(script, Comm(Process(target))) def runscript(script, comm): -- cgit v1.2.3