summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2021-12-15 05:03:53 -0500
committerMalfurious <m@lfurio.us>2021-12-17 22:19:39 -0500
commit244884bd2d373cecb783135eca51da8530d5f078 (patch)
treef483b4745dbaf51936eacaba8899b6cdcfbbb1f5
parentadad3ce320aa774ff274965e001bea5a096a879b (diff)
downloadlib-des-gnux-244884bd2d373cecb783135eca51da8530d5f078.tar.gz
lib-des-gnux-244884bd2d373cecb783135eca51da8530d5f078.zip
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 <m@lfurio.us> Signed-off-by: dusoleil <howcansocksbereal@gmail.com>
-rw-r--r--tools/sploit/sploit/main.py14
1 files changed, 12 insertions, 2 deletions
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):