diff options
| author | dusoleil <howcansocksbereal@gmail.com> | 2023-04-02 17:25:59 -0400 | 
|---|---|---|
| committer | dusoleil <howcansocksbereal@gmail.com> | 2023-04-02 17:25:59 -0400 | 
| commit | 3f5532857807d628a5dadaf5c30a384f873878ea (patch) | |
| tree | c88642d30652f457c6a925dc6741dfa934163760 | |
| parent | dd243d60cf75813812ac0115b6373b108b6b0ed8 (diff) | |
| download | nsploit-3f5532857807d628a5dadaf5c30a384f873878ea.tar.gz nsploit-3f5532857807d628a5dadaf5c30a384f873878ea.zip | |
comm: Fix bug where readline thinks pipe is brokenv0.4
We should strip the newline from the data after checking if we got an
empty string returned.
Signed-off-by: dusoleil <howcansocksbereal@gmail.com>
| -rw-r--r-- | sploit/comm.py | 4 | 
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 | 
