From 97c48aa4badc4f56914e258f7cd989380ee2d50f Mon Sep 17 00:00:00 2001 From: Malfurious Date: Wed, 15 Dec 2021 21:12:11 -0500 Subject: sploit: Add logonwrite option to comms If enabled, data sent to the target will be printed/logged as alt text, similar to data directly printed by the user. Feature is off by default. Signed-off-by: Malfurious Signed-off-by: dusoleil --- sploit/comm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sploit/comm.py b/sploit/comm.py index 242bc3d..0bc8c6a 100644 --- a/sploit/comm.py +++ b/sploit/comm.py @@ -9,6 +9,7 @@ from sploit.until import bind class Comm: logonread = True + logonwrite = False flushonwrite = True def __init__(self, backend): @@ -60,6 +61,7 @@ class Comm: def write(self, data): self.back.stdout.write(data) if self.flushonwrite : self.back.stdout.flush() + if self.logonwrite : ilog(data, file=sys.stdout, color=ALT) def writeline(self, data): self.write(data + b'\n') -- cgit v1.2.3