diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2021-09-01 00:56:40 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2021-09-01 00:56:40 -0400 |
commit | 4f2f653df637ee509eebfdf8a2ff4cb0f1898a43 (patch) | |
tree | 6723a37773466442d7abe74b52997d6b4ce77a20 | |
parent | 4b7689b88e5dc73a722d02fd27985d4826ffb585 (diff) | |
download | sploit-4f2f653df637ee509eebfdf8a2ff4cb0f1898a43.tar.gz sploit-4f2f653df637ee509eebfdf8a2ff4cb0f1898a43.zip |
Throw a BrokenPipeError on Broken Read
Signed-off-by: dusoleil <howcansocksbereal@gmail.com>
-rw-r--r-- | sploit/comm.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sploit/comm.py b/sploit/comm.py index 1f55fb6..fc220ef 100644 --- a/sploit/comm.py +++ b/sploit/comm.py @@ -14,11 +14,15 @@ class Comm: def read(self, size): data = self.back.stdin.read(size) + if(data == b''): + raise BrokenPipeError('Tried to read on broken pipe') log(data) return data def readline(self): data = self.back.stdin.readline() + if(data == b''): + raise BrokenPipeError('Tried to read on broken pipe') log(data) return data |