From 9635fefa61f889da10feabfdd43be90e5701f314 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Fri, 17 Feb 2023 17:17:03 -0500 Subject: comm: Add default argument for writeline() The writeline function will now default to send an empty line when called without an argument. I don't believe any such default makes sense for the plain write function, as writing nothing should have no effect. Signed-off-by: Malfurious Signed-off-by: dusoleil --- sploit/comm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sploit/comm.py b/sploit/comm.py index 58504d3..0ba6e89 100644 --- a/sploit/comm.py +++ b/sploit/comm.py @@ -91,7 +91,7 @@ class Comm: if self.logonwrite : ilog(data, file=sys.stdout, color=ALT) if self.readonwrite : self.readall_nonblock() - def writeline(self, data): + def writeline(self, data=b''): self.write(data + b'\n') def interact(self): -- cgit v1.2.3