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
commita72991b2a6fe7481cefdd74cfd9f9b24a442197b (patch)
tree5674a3af357abd93e88f0a8351b0e54f4443691a
parenta958b0852779db95ba3e87ebcda68fc86ddaffaa (diff)
downloadsploit-a72991b2a6fe7481cefdd74cfd9f9b24a442197b.tar.gz
sploit-a72991b2a6fe7481cefdd74cfd9f9b24a442197b.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--sploit/main.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/sploit/main.py b/sploit/main.py
index 0a34429..e6c9bb3 100644
--- a/sploit/main.py
+++ b/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):