summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sploit/comm.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sploit/comm.py b/sploit/comm.py
index 8078c9f..522d540 100644
--- a/sploit/comm.py
+++ b/sploit/comm.py
@@ -39,10 +39,10 @@ class Comm:
def readline(self):
data = self.back.stdin.readline()
- if data.endswith(b'\n'):
- data = data[:-1]
if(data == b''):
raise BrokenPipeError('Tried to read on broken pipe')
+ if data.endswith(b'\n'):
+ data = data[:-1]
if self.logonread : ilog(data, file=sys.stdout, color=NORMAL)
self.last = data
return data