From e342ae082960cad4d05d719914801f907cd9d61d Mon Sep 17 00:00:00 2001 From: dusoleil Date: Mon, 30 Aug 2021 05:00:00 -0400 Subject: Sploit Rework MVP Structure, Packaging, and Comms First part of the MVP for the larger Sploit rework effort. Add project structure, python packaging, basic comms, and "log" hook. From in or out of the sploit directory, you can run the "sploit.py" script, run python -m sploit, or import the sploit modules from the python3 shell. You can also pip install Sploit and from anywhere you can run the sploit command, run python -m sploit, or import the sploit modules from the python3 shell. Running as a standalone application, Sploit can run in a "target" mode, a "pipe" mode, and a "pipe daemon" mode. In "target" mode, Sploit will launch a target program as a subprocess and run an exploit script against its I/O. In "pipe" mode, Sploit will create named fifos and wait for a program to connect to them to run an exploit script against them. In "pipe daemon" mode, Sploit will run similar to the "pipe" mode, but automatically recreate the fifos with the same name after each execution. Basic comm operations of read, readline, write, and writeline are available to the exploit script. A "log" hook is executed whenever data is read in from the target program. This will just print the data out, but it can be configured to decode it with a specific encoding or you could replace the function for different behavior. Signed-off-by: dusoleil --- sploitlog.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100755 sploitlog.py (limited to 'sploitlog.py') diff --git a/sploitlog.py b/sploitlog.py deleted file mode 100755 index eab1fc7..0000000 --- a/sploitlog.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python3 - -import os - -import sploitconfig as config - -#this function does not look at the run mode and will write to stdout regardless -#use sploitutil.log instead -def sploitlog(s): - if config.log_encoding != '': - s = s.decode(config.log_encoding) - print(s) - -if __name__ == '__main__': - stdin = os.fdopen(0,"rb") - for s in stdin: - sploitlog(s) -- cgit v1.2.3