summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordusoleil <howcansocksbereal@gmail.com>2021-09-01 00:56:40 -0400
committerdusoleil <howcansocksbereal@gmail.com>2021-09-01 00:56:40 -0400
commit4f2f653df637ee509eebfdf8a2ff4cb0f1898a43 (patch)
tree6723a37773466442d7abe74b52997d6b4ce77a20
parent4b7689b88e5dc73a722d02fd27985d4826ffb585 (diff)
downloadsploit-4f2f653df637ee509eebfdf8a2ff4cb0f1898a43.tar.gz
sploit-4f2f653df637ee509eebfdf8a2ff4cb0f1898a43.zip
Throw a BrokenPipeError on Broken Read
Signed-off-by: dusoleil <howcansocksbereal@gmail.com>
-rw-r--r--sploit/comm.py4
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